Last post listing on index page
Posted by Brian Moon
All files from this thread
File Name | File Size | Posted by | Date | ||
---|---|---|---|---|---|
lastforumpost.zip | 1.9 KB | open | download | Brian Moon | 08/19/2004 | Read message |
August 19, 2004 12:36AM |
Admin Registered: 22 years ago Posts: 4,495 |
I just made this module. I made it mainly to test a new function I put in mysql.php just for module writers and the new index hook I added to index.php. But, it is also a common feature on many other systems. It just puts the last post into the index.php page for each forum on the page. It is linked and shows the author. Currently it just hacks the info into the forum description. It could be modified to move it to the date column if you wished like phpBB does.
Oh, you will need latest cvs for index.php and mysql.php to use this.
Oh[2], you can see what it looks like (for now) at the dev test forum. [dev.phorum.org]
Edited 2 time(s). Last edit at 08/19/2004 12:46AM by brianlmoon.
Oh, you will need latest cvs for index.php and mysql.php to use this.
Oh[2], you can see what it looks like (for now) at the dev test forum. [dev.phorum.org]
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Edited 2 time(s). Last edit at 08/19/2004 12:46AM by brianlmoon.
Re: Last post listing on index page August 19, 2004 07:43AM |
Moderator Registered: 19 years ago Posts: 634 |
August 19, 2004 10:03AM |
Admin Registered: 22 years ago Posts: 4,495 |
oops. I made the zip and everything.
That issue is fixed in CVS.
Edited 1 time(s). Last edit at 08/19/2004 10:04AM by brianlmoon.
That issue is fixed in CVS.
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Edited 1 time(s). Last edit at 08/19/2004 10:04AM by brianlmoon.
August 22, 2004 12:20AM |
Registered: 19 years ago Posts: 666 |
How would I move it to the date column? I know I'd have to edit lastforumpost.php, but I'm not sure what to replace with what exactly.
Edit: Nevermind, I got it. I'd tried last_post_time, lastpost, all kinds of things, until I got to last_post, hehe. :)
-------------------------------------------
"Everything we see or seem, is but a dream within a dream." -Edgar Allan Poe
Edited 1 time(s). Last edit at 08/22/2004 12:45AM by portal of curiousity.
Edit: Nevermind, I got it. I'd tried last_post_time, lastpost, all kinds of things, until I got to last_post, hehe. :)
-------------------------------------------
"Everything we see or seem, is but a dream within a dream." -Edgar Allan Poe
Edited 1 time(s). Last edit at 08/22/2004 12:45AM by portal of curiousity.
August 22, 2004 06:46PM |
Admin Registered: 22 years ago Posts: 4,495 |
Yeah, you can see the correct value in the template.
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Last post listing on index page August 23, 2004 02:52PM |
Registered: 21 years ago Posts: 109 |
Re: Last post listing on index page September 04, 2004 02:13AM |
Registered: 18 years ago Posts: 60 |
Hi,
last cvs: phorum5-cvs-2004090400.tar.gz
module: lastforumpost version 1.2
Did a fresh install and i've have converted from phorum3 to phorum5. All works fine.
Did only "Mark all Messages Read" in all forums. I've wrote no new messages.
Then i gone to Admin and have activated (enabled) the lastforumpost module. Back to Phorum index and get following error:
Parse error: parse error, unexpected T_IF in /home/www/public_html/phorum/mods/lastforumpost/lastforumpost.php on line 12
Edit 1:
Found the problem in line 10 of lastforumpost.
Missing ; at the end
change
$messages = phorum_db_get_recent_messages(1, $forum["forum_id"])
in
$messages = phorum_db_get_recent_messages(1, $forum["forum_id"]);
Now the next error i have:
Warning: Wrong parameter count for array_shift() in /home/www/public_html/phorum/mods/lastforumpost/lastforumpost.php on line 13
Hopefully i can fix it for myself.
Edit 2:
Line 13:
change
$message = array_shift();
in
$message = array_shift($messages);
No warranty. I'm a n00b in php etc.
Please correct me if i was wrong with these
changes.
Regards, Stoebi
Edited 2 time(s). Last edit at 09/04/2004 02:56AM by Stoebi.
last cvs: phorum5-cvs-2004090400.tar.gz
module: lastforumpost version 1.2
Did a fresh install and i've have converted from phorum3 to phorum5. All works fine.
Did only "Mark all Messages Read" in all forums. I've wrote no new messages.
Then i gone to Admin and have activated (enabled) the lastforumpost module. Back to Phorum index and get following error:
Parse error: parse error, unexpected T_IF in /home/www/public_html/phorum/mods/lastforumpost/lastforumpost.php on line 12
Edit 1:
Found the problem in line 10 of lastforumpost.
Missing ; at the end
change
$messages = phorum_db_get_recent_messages(1, $forum["forum_id"])
in
$messages = phorum_db_get_recent_messages(1, $forum["forum_id"]);
Now the next error i have:
Warning: Wrong parameter count for array_shift() in /home/www/public_html/phorum/mods/lastforumpost/lastforumpost.php on line 13
Hopefully i can fix it for myself.
Edit 2:
Line 13:
change
$message = array_shift();
in
$message = array_shift($messages);
No warranty. I'm a n00b in php etc.
Please correct me if i was wrong with these
changes.
Regards, Stoebi
Edited 2 time(s). Last edit at 09/04/2004 02:56AM by Stoebi.
September 04, 2004 09:34AM |
Admin Registered: 22 years ago Posts: 4,495 |
where did you get that version of the module?
the version on this page does not have either one of those problems.
the version on this page does not have either one of those problems.
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Last post listing on index page September 04, 2004 12:16PM |
Registered: 18 years ago Posts: 60 |
Hi,
@brianlmoon
I havve download it from here:
[dev.phorum.org]
You can see it here:
[dev.phorum.org]
Regards, Stoebi
Edited 1 time(s). Last edit at 09/04/2004 12:19PM by Stoebi.
@brianlmoon
I havve download it from here:
[dev.phorum.org]
You can see it here:
[dev.phorum.org]
Regards, Stoebi
Edited 1 time(s). Last edit at 09/04/2004 12:19PM by Stoebi.
Re: Last post listing on index page September 04, 2004 03:27PM |
Admin Registered: 20 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.