Hello, I've got question on integration last 10 posts from punBB.
In themes.inc.php file I put {FORUM} to pagefooter function
$template_vars = array(
'{CUSTOM_FOOTER}' => $custom_footer,
'{SYS_MENU}' => theme_main_menu('sys_menu'),
'{SUB_MENU}' => theme_main_menu('sub_menu'),
'{FORUM}' => cpg_get_custom_include_3(),
and also added to the same file themes.inc.php next code:
function cpg_get_custom_include_3()
{
echo "<ul>";
require("http://www.mysite.com/forum/extern.php?action=active&show=10");
echo "$cpg_get_custom_include_3";
echo "</ul>";
}
After all this I can see the the last 10 posts from my forum, but not in the part of template where I put {FORUM}, the posts appears just below the gallery.
How can I arrange them to be shown in place, where I put {FORUM} tag in my template.
You should concatenate and return what you want displayed, not echo it directly.
I would suggest using include() instead of require(). If there are any issues, require() will result in a fatal error instead of an error message. I don't think the forum posts listing is vital to the functioning of your gallery so it's better to use include(), in my opinion.
TranzNDance, thank You. I changed it to include().
Nibbler, how should I do it for example. I'am not familiar with PHP.
Don't edit include/themes.inc.php, but themes/yourtheme/theme.php