1

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

My site at Lessonko|Text Quotes at Text Paradise |Ultimate Bounds

Re: Active post how to?

read the notes in extern.php in your forum's root.

~James
FluxBB - Less is more

Re: Active post how to?

Moved to integration

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Active post how to?

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>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Active post how to?

shouldn't you start the list first?
ul or ol?

FluxBB - v1.4.8

Re: Active post how to?

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?

7

Re: Active post how to?

quaker wrote:

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...

My site at Lessonko|Text Quotes at Text Paradise |Ultimate Bounds

Re: Active post how to?

use extern.php instead, open it and read how it is done.

9

Re: Active post how to?

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?

My site at Lessonko|Text Quotes at Text Paradise |Ultimate Bounds

10

Re: Active post how to?

by the way how to add moderator to a forum? i cannot moderate all forum... thanks

My site at Lessonko|Text Quotes at Text Paradise |Ultimate Bounds

Re: Active post how to?

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.

Looking for a certain modification for your forum? Please take a look here before posting.

12

Re: Active post how to?

Is it not possible to use php includes in main.tpl?

Then how do you get latest topics, board stats, etc. in the miniportal?

13

Re: Active post how to?

put ur php files in the include/user folder
call them in the main.tpl
my placing a <pun_include "nameof.php">

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

14 (edited by dude07 2007-07-13 22:39)

Re: Active post how to?

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.