[MTOS-dev] PHP SSI on Dynamic still broken in Beta5?
Brad Choate
brad at sixapart.com
Wed May 7 18:30:04 PDT 2008
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 | www.gizmodo.com.au | www.kotaku.com.au | 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/20080507/7288b64a/attachment-0001.html
More information about the MTOS-dev
mailing list