php-variable in {news}
Posted: Wed Apr 04, 2007 12:57 pm
Hey!
Not really much of a question but I trying to make a archive for my {news} entries. Basically, I want to send a variable in {news} like this: {news start=$variable}. This obviously does not work but I hope you get my idea. I'm sending the code aswell.
{php}
if (!isset($_GET['archive'])) {
$archive = 0;
}
else {
$archive = (int)$_GET['archive'];
}
$archivenext = ($archive + 5);
$archiveprevious = ($archive - 5);
$n = mysql_query("SELECT news_id FROM cms_se_module_news WHERE news_category_id = '1'");
$num = mysql_num_rows($n);
echo "";
if ($archiveprevious >=0)
{
echo "Previous";
echo " ";
}
if ($archivenext Next";
}
echo "";
{/php}
{news category="news" detailpage="article" number="5" start=_$ARCHIVE_}
Not really much of a question but I trying to make a archive for my {news} entries. Basically, I want to send a variable in {news} like this: {news start=$variable}. This obviously does not work but I hope you get my idea. I'm sending the code aswell.
{php}
if (!isset($_GET['archive'])) {
$archive = 0;
}
else {
$archive = (int)$_GET['archive'];
}
$archivenext = ($archive + 5);
$archiveprevious = ($archive - 5);
$n = mysql_query("SELECT news_id FROM cms_se_module_news WHERE news_category_id = '1'");
$num = mysql_num_rows($n);
echo "";
if ($archiveprevious >=0)
{
echo "Previous";
echo " ";
}
if ($archivenext Next";
}
echo "";
{/php}
{news category="news" detailpage="article" number="5" start=_$ARCHIVE_}