Topic: PunPortal Recent Topics
Hi,
I want to show 5 or 10 recent Topics on my Index (Miniportal). It doesn't work with extern.php, so I need to use a part of PunPortal (<PUNPORTAL_RECENT_TOPICS>)
I already installed the mod, uploaded files lang/portal.php and plugins/AP_PunPortal.php
But now there are some problems:
1. I don't want to use the included PunPortal.tpl and the included index.php
2. my header.php looks different than the one in the readme.txt
I did everything in readme, exept this one...
This is the Readme.txt:
#
#-------------[ 3. Find ]----
#
else if (defined('PUN_HELP'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
#
#-------------[ 4. Add AFTER ]----------------
#
else if (defined('PUN_PORTAL'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/PunPortal.tpl');
And this is my header.php:
// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
{
if(is_file(PUN_ROOT.'include/template/'.$pun_user['style'].'/admin.tpl'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/'.$pun_user['style'].'/admin.tpl');
else
$tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
}else if (defined('PUN_HELP'))
{
if(is_file(PUN_ROOT.'include/template/'.$pun_user['style'].'/help.tpl'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/'.$pun_user['style'].'/help.tpl');
else
$tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
}else
{
if(is_file(PUN_ROOT.'include/template/'.$pun_user['style'].'/main2.tpl'))
$tpl_main = file_get_contents(PUN_ROOT.'include/template/'.$pun_user['style'].'/main2.tpl');
else
$tpl_main = file_get_contents(PUN_ROOT.'include/template/main2.tpl');
}
//else if (defined('PUN_PORTAL'))
// $tpl_main = file_get_contents(PUN_ROOT.'include/template/main2.tpl');
This is my actual code, I commented it out , because it didn't work
(I'm using 2 main.tpl files, one for index (main2.tpl) and another one for everything else)
I don't really know, where do put the code in header.php...Is there a way do make it working?
Thanks for any response and sorry for my english *g*