Topic: Active post how to?
hello guys am a new here, i would like to ask favor on how can i display atleast ten new post to my site home page from my forum page... a step by step procedure will greatly help me...
thanks
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Active post how to?
hello guys am a new here, i would like to ask favor on how can i display atleast ten new post to my site home page from my forum page... a step by step procedure will greatly help me...
thanks
read the notes in extern.php in your forum's root.
Moved to integration
is the home page apart of punbb?
this is the code for lastest topics
drop this in the include/user folder/latesttopics.php
do a
<pun_include "latesttopics.php">
in the main.tpl where you want this to show up ...
Q
<div class="block">
<h2><span>latest Topics</span></h2>
<div class="box">
<div class="inbox">
<p>
<?
$result = $db->query('SELECT subject, id FROM '.$db_prefix.'topics ORDER BY last_post DESC LIMIT 10') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
while($cur_topic = $db->fetch_assoc($result))
{
?>
<li><a href="viewtopic.php?id=<?php echo $cur_topic['id']; ?>"><?php echo $cur_topic['subject']; ?></a> </li>
<?
}
?>
</p>
</div>
</div>
</div>
shouldn't you start the list first?
ul or ol?
If I were to modify this to not use the set html there, I could print it with my own css, and not require regular punbb files other than include/common, correct?
is the home page apart of punbb?
this is the code for lastest topics
drop this in the include/user folder/latesttopics.php
do a
<pun_include "latesttopics.php">
in the main.tpl where you want this to show up ...
Q<div class="block"> <h2><span>latest Topics</span></h2> <div class="box"> <div class="inbox"> <p> <? $result = $db->query('SELECT subject, id FROM '.$db_prefix.'topics ORDER BY last_post DESC LIMIT 10') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error()); while($cur_topic = $db->fetch_assoc($result)) { ?> <li><a href="viewtopic.php?id=<?php echo $cur_topic['id']; ?>"><?php echo $cur_topic['subject']; ?></a> </li> <? } ?> </p> </div> </div> </div>
thanks, but my homepage is not part of the punbb.. so how will it be? thanks again...
hello guys what i did id like this in the homepage of my site i just copy this code to extern.php:
<div class="box">
<p><strong>Active forum</strong></p>
<?php include('http://lessonko.com/forums/extern.php?action=active'); ?> </div>
but nothing happens, it did not shows anything at all do i have to made some changes to extern.php file?
by the way how to add moderator to a forum? i cannot moderate all forum... thanks
About extern.php: is your homepage a php file?
About moderation: move whomever you'd like to be a moderator to the "Moderators" group and check off all forums you'd like him or her to moderate in the "Administration" section of his or her profile.
Is it not possible to use php includes in main.tpl?
Then how do you get latest topics, board stats, etc. in the miniportal?
put ur php files in the include/user folder
call them in the main.tpl
my placing a <pun_include "nameof.php">
Q
Can I inlcude this
include('http://host.com/forums/extern.php?action=stats');
with pun_include?
[edit]
Got it working by placing the above include into a php file called stats.php and using pun include.
Thanks
Gotta say, I'm always pleased with the results with punbb. My portal looks great with very little effort.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → Active post how to?
Powered by PunBB, supported by Informer Technologies, Inc.