[MTOS-dev] PHP SSI on Dynamic still broken in Beta5?

Kaan Kivilcim kaan at alluremedia.com.au
Wed May 7 18:38:38 PDT 2008


Hey Brad,

 

Thanks for this, re-reading the SSI documentation I see that SSI
includes aren't exactly what I thought they were.

 

Problem solved! =) 4.15 is looking more amazing each Beta release...

 

Kaan Kivilcim
Technical Lead, Allure Media 

	
 

	203/177-185 William St, Darlinghurst NSW 2010
Phone 02 9947 2920 Fax 02 9947 2921 Email kaan at alluremedia.com.au
www.defamer.com.au <http://www.defamer.com.au/>  | www.gizmodo.com.au
<http://www.gizmodo.com.au/>  | www.kotaku.com.au
<http://www.kotaku.com.au/>  | www.lifehacker.com.au
<http://www.lifehacker.com.au/>  

 

From: Brad Choate [mailto:brad at sixapart.com] 
Sent: Thursday, 8 May 2008 11:30 AM
To: Kaan Kivilcim
Cc: mtos-dev at sixapart.com; Chris Janz
Subject: Re: [MTOS-dev] PHP SSI on Dynamic still broken in Beta5?

 

The problem here is that you're using MT tags inside PHP code. You
should know that for dynamic publishing, MT tags are converted into PHP
blocks, so the code below winds up changing to this:

 

<?php .... $entryID = '<?php ....

 

Also, a SSI module is not going to be aware of the current entry in
context. I recommend leaving this module as a plain MT module. If you
do, you can do this:

 

<?php

$entryID = $this->tag('EntryID');

.....

 

The "$this" variable is a reference to the Smarty class being used to
render the template.

 

-Brad

 

 

On May 7, 2008, at 6:16 PM, Kaan Kivilcim wrote:





Hey all,

 

Has anyone had success with PHP includes under Dynamic Publishing on
Beta 5?  I've still not having any luck with it.

 

I have the following template:

 

<?php

$entryID = '<$mt:EntryID$>';

require_once('/usr/local/alluremedia/mt/init.php');

$commentCount = CommentHandler::getCommentCount($entryID);

echo($commentCount);

?>

 

It's included like so:

 

<$mt:Include module="Comment - Count"$>

 

I receive the error when viewing the page that states:

 

Page Not Found

 

    Smarty error: [in evaluated template line 8]: syntax error:
unrecognized tag '/php' (Smarty_Compiler.class.php, line 580)

 

I'm assuming it's reading the '<?php' tag and failing. I'll try
experimenting with changing that tag to {php} but that means this
template will now break in the sections of my site that are publishing
statically.

 

Any ideas? Anything I can provide you guys to help troubleshoot it?

 

Kaan Kivilcim
Technical Lead, Allure Media

	

<image001.gif>

	203/177-185 William St, Darlinghurst NSW 2010
Phone 02 9947 2920 Fax 02 9947 2921 Email kaan at alluremedia.com.au
www.defamer.com.au <http://www.defamer.com.au/>  | www.gizmodo.com.au
<http://www.gizmodo.com.au/>  | www.kotaku.com.au
<http://www.kotaku.com.au/>  | www.lifehacker.com.au
<http://www.lifehacker.com.au/> 

 

_______________________________________________
MTOS-dev mailing list
MTOS-dev at sixapart.com
http://www.sixapart.com/mailman/listinfo/mtos-dev

 

--

Brad Choate

Engineering Manager, Movable Type, Six Apart, Ltd.

http://www.sixapart.com/movabletype/

Mobile: (925) 271-0105  -  AIM: bschoate

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.sixapart.com/pipermail/mtos-dev/attachments/20080508/aa703c53/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1107 bytes
Desc: image001.gif
Url : http://www.sixapart.com/pipermail/mtos-dev/attachments/20080508/aa703c53/attachment.gif 


More information about the MTOS-dev mailing list