- Moderated by:
- Support
-
- rank:
-
Freshman
- registered:
- January 2003
- Status:
- offline
- last visit:
- 16.04.05
- Posts:
- 26
It has been quite a while since i worked with a themeing engine, especially Smarty (it seems like xanthia is Smarty based but i might be wrong)
anyways what are the tags to insert PHP into the template files.
I had an older version of PostNuke up until yesterday, now im trying to change my theme back to what it was, and that requires inserting PHP.
would it be the "literal" tag like in regular Smarty, or would it be another one?
i tried search for PHP, but you realize that turned up a bunch of stuff that had nothing to do with what i wanted. -
- rank:
-
Developer
- registered:
- January 2003
- Status:
- offline
- last visit:
- 27.11.08
- Posts:
- 851
Not exactly, it is echo "test";
The better way would be to write a plugin. So you can use the PHP code in more than one template very easily.
--
"He is not dangerous, he just wants to play...." -
- rank:
-
Freshman
- registered:
- January 2003
- Status:
- offline
- last visit:
- 16.04.05
- Posts:
- 26
im not quite smart enough in "Smarty" to do that :/ -
- rank:
-
Freshman
- registered:
- January 2003
- Status:
- offline
- last visit:
- 16.04.05
- Posts:
- 26
i put in the following code, but for some reason it will not recognize
Code
<!--[php]-->
if( <!--[$bid]--> == "1")
{
echo "<table border=\"0\" class=\"blockrightcontent1\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
} elseif ( <!--[$bid]--> == "11") {
echo "<table border=\"0\" class=\"blockrightcontent_poll\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
} elseif ( <!--[$bid]--> == "19") {
echo "<table border=\"0\" class=\"blockrightcontent_stat\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
} elseif (<!--[$bid]--> == "3") {
echo "<table border=\"0\" class=\"blockright_online\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
} elseif ( <!--[$bid]--> == "20") {
echo "<table border=\"0\" class=\"blockright_aff\" cellpadding=\"3\" cellspacing=\"0\" width=\"140\">";
} elseif ( <!--[$bid]--> == "18") {
echo "<table border=\"0\" class=\"blockright_shout\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
} else {
echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";
}?>
<!--[/php]--> -
- rank:
-
Steering Committee
- registered:
- August 2002
- Status:
- offline
- last visit:
- 03.03.08
- Posts:
- 1221
Smarty version :
Code
<!--[if $bid eq 1]-->
<table border="0" class="blockrightcontent1" cellpadding="3" cellspacing="0" width="100%">
<!--[elseif $bid eq 11]-->
<table border="0" class="blockrightcontent_poll" cellpadding="3" cellspacing="0" width="100%">
<!--[elseif $bid eq 19]-->
<table border="0" class="blockrightcontent_stat" cellpadding="3" cellspacing="0" width="100%">
<!--[elseif $bid eq 3]-->
<table border="0" class="blockright_online" cellpadding="3" cellspacing="0" width="100%">
<!--[elseif $bid eq 20]-->
<table border="0" class="blockright_aff" cellpadding="3" cellspacing="0" width="140">
<!--[elseif $bid eq 18]-->
<table border="0" class="blockright_shout" cellpadding="3" cellspacing="0" width="100%">
<!--[else]-->
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<!--[/if]-->
:wink:
--
Chestnut !
Support via Private message won't be answered...
http://dev.pnconcept.com
http://www.postnuke-france.org
