No, that's all in there. Let me show you what I have: (please note, Instead of "test" i have been using getUrl for everything.)
So when I tried looking at index.php?action=getUrl i saw the php echo $_SERVER thing was being printed and not rendered either. So I started using "<script>document.write(location.href);</script>" in the writeContent. This works when I view the new page.
Still, the Like button is not rendering {getUrl}.
Here's all I have:
getUrl.php (placed in FAQ root):
Code: Select all
<?php
$getUrlTitle = 'Get The URL!';
$getUrlContent = '<script>document.write(location.href);</script>';
for($i=0; $i<10; $i++) {
$getUrlContent .= 'Line '.$i.'<br />';
}
$tpl->processTemplate ('writeContent', array(
'getUrlTitle' => $getUrlTitle,
'getUrlContent' => $getUrlContent
)
);
$tpl->includeTemplate('writeContent', 'index');
?>
getUrl.tpl (placed in faq/template/ directory):
Code: Select all
<!-- Start Test Content -->
<h2>{getUrlTitle}</h2>
<span>{getUrlContent}</span>
<!-- End Test Content -->
And in inc/constants.php I now have:
Code: Select all
$allowedVariables = array(
'add' => 1,
'artikel' => 1,
'ask' => 1,
'contact' => 1,
'help' => 1,
'instantresponse' => 1,
'mailsend2friend' => 1,
'news' => 1,
'open' => 1,
'register' => 1,
'save' => 1,
'savecomment' => 1,
'savequestion' => 1,
'savevoting' => 1,
'search' => 1,
'send2friend' => 1,
'sendmail' => 1,
'show' => 1,
'sitemap' => 1,
'thankyou' => 1,
'translate' => 1,
'writecomment' => 1,
'getUrl' => 1,
);
Now, in your tutorial, you said this should go in "config/constants.php" -- but I'm guessing that was for an older version of phpMyFaq. I only see constants.php in INC directory. Should it be somewhere else?