[pmwiki-users] PHP in .tmpl file

Little, Charles Charles.Little2 at BellSouth.com
Tue Mar 7 12:35:21 CST 2006


Hi-

I'm sure I'm missing something, but I wanted to include an link to the
comments section in the page footer, but only if the pagename does not
include -comments.  So I included the following code in the .tmpl file
for the customized skin:

<!--PageFooterFmt-->
  <div id='wikifoot'>
  <div id='utility'>
    <div class='footnav'>
      <a href='$PageUrl?action=edit'>$[Edit]</a> -
      <a href='$PageUrl?action=diff'>$[History]</a> -
<?php
if !(strbrk([$FullName],"-Comments")==0)
      echo "<a href='$ScriptUrl/$[$FullName]-Comments'>$[Comments]</a>
-"
?>
      <a href='$PageUrl?action=print' target='_blank'>$[Print]</a> -
      <a href='$ScriptUrl/$[$Group/RecentChanges]'>$[Recent Changes]</a>
-
      <a href='$ScriptUrl/$[$SiteGroup/Search]'>$[Search]</a></div>
    <div class='lastmod'>$[Page last modified on
$LastModified]</div></div></div>
<!--/PageFooterFmt-->


But it's not working.  What am I doing wrong?  In the final page it
shows up as:

<!--PageFooterFmt-->
  <div id='wikifoot'>

  <div id='utility'>
    <div class='footnav'>
      <a
href='http://wiki.gamera.cc/index.php?n=AGameOfThrones-WinterChills.Home
Page?action=edit'>Edit</a> -
      <a
href='http://wiki.gamera.cc/index.php?n=AGameOfThrones-WinterChills.Home
Page?action=diff'>History</a> -
<?php
if !(strbrk([AGameOfThrones-WinterChills.HomePage],"-Comments")==0)
      echo "<a
href='http://wiki.gamera.cc/index.php?n=AGameOfThrones-WinterChills.Home
Page-Comments'>Comments</a> -"
?>
      <a
href='http://wiki.gamera.cc/index.php?n=AGameOfThrones-WinterChills.Home
Page?action=print' target='_blank'>Print</a> -
      <a
href='http://wiki.gamera.cc/index.php?n=AGameOfThrones-WinterChills.Rece
ntChanges'>Recent Changes</a> -
      <a
href='http://wiki.gamera.cc/index.php?n=Site.Search'>Search</a></div>

    <div class='lastmod'>Page last modified on March 07, 2006, at 12:41
PM</div></div></div>
<!--/PageFooterFmt-->

In a page that is supposed to include the comment link.

Thanks!
Charles

*****
"The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.  If you received this in error, please contact the sender and delete the material from all computers."  118





More information about the pmwiki-users mailing list