<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Forum Topic: php code in template</title>
<link>http://www.kbpublisher.com/forums/</link>
<description>Forum Topic: php code in template</description>
<language>en</language>
<pubDate>Wed, 19 Nov 2008 11:38:28 +0000</pubDate>

<item>
<title>chrisbjax on "php code in template"</title>
<link>http://www.kbpublisher.com/forums/topic/php-code-in-template#post-270</link>
<pubDate>Wed, 22 Oct 2008 17:14:22 +0000</pubDate>
<dc:creator>chrisbjax</dc:creator>
<guid isPermaLink="false">270@http://www.kbpublisher.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;br /&#62;
I'm trying to do something similar, and I don't think I am understanding what the syntax is.&#60;/p&#62;
&#60;p&#62;I would like to include a php file on the the knowledgebase (Its a simply adldap recognition function that prints firstname last name)&#60;/p&#62;
&#60;p&#62;If I understand correctly, I would open the page.html template and add my {recog} block where I want it.&#60;/p&#62;
&#60;p&#62;:: Heres where i'm fuzzy ::&#60;/p&#62;
&#60;p&#62;I then open Index.php and add my inclusion?&#60;br /&#62;
include_once(&#34;../includes/adldap/whoami.php&#34;);&#60;/p&#62;
&#60;p&#62;Where am I converting it to the template variable?&#60;/p&#62;
&#60;p&#62;I tried $tpl-&#38;gt;tplAssign('recog'); But I know this isnt correct, because this is not even references my inclusion.&#60;br /&#62;
I'm guessing I need to add a function??&#60;br /&#62;
May I get some insight?
&#60;/p&#62;</description>
</item>
<item>
<title>onesign on "php code in template"</title>
<link>http://www.kbpublisher.com/forums/topic/php-code-in-template#post-159</link>
<pubDate>Mon, 05 May 2008 23:39:33 +0000</pubDate>
<dc:creator>onesign</dc:creator>
<guid isPermaLink="false">159@http://www.kbpublisher.com/forums/</guid>
<description>&#60;p&#62;In template:&#60;br /&#62;
{my_add_block}&#60;/p&#62;
&#60;p&#62;In appropriate view class:&#60;br /&#62;
chdir(&#34;/var/wkscript/www/ads&#34;); // why this?&#60;br /&#62;
include_once(&#34;/var/wkscript/www/ads/mysimpleads.php&#34;);&#60;br /&#62;
$tpl-&#38;gt;tplAssign('my_add_block',  show_ad_group(4));&#60;/p&#62;
&#60;p&#62;By the way in version 3.0 there is &#34;Global Variable&#34;&#60;br /&#62;
example of adding global variable to template&#60;br /&#62;
in template you should have a template tag, for example - {global_test}&#60;/p&#62;
&#60;p&#62;in index.php after $page = &#38;#38;new KBClientPageRenderer($view, $manager);&#60;/p&#62;
&#60;p&#62;$page-&#38;gt;assign('global_test', '&#38;lt;b&#38;gt;test global variable&#38;lt;/b&#38;gt;');
&#60;/p&#62;</description>
</item>
<item>
<title>feroxltd on "php code in template"</title>
<link>http://www.kbpublisher.com/forums/topic/php-code-in-template#post-158</link>
<pubDate>Mon, 05 May 2008 21:45:29 +0000</pubDate>
<dc:creator>feroxltd</dc:creator>
<guid isPermaLink="false">158@http://www.kbpublisher.com/forums/</guid>
<description>&#60;p&#62;When trying to add some peace of php code it only shows up as blank.&#60;/p&#62;
&#60;p&#62;[code]&#38;lt;?php chdir(&#34;/var/wkscript/www/ads&#34;); include_once(&#34;/var/wkscript/www/ads/mysimpleads.php&#34;);show_ad_group(4); ?&#38;gt; [/code]&#60;/p&#62;
&#60;p&#62;The cose is from my ad server.&#60;/p&#62;
&#60;p&#62;Anyone know how I can the php code to work and display the ads correctly?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
