Firefox PHP

Latest X Posts in a templated Phorum-Page

Posted by Thomas Seifert 
Re: Latest X Posts in a templated Phorum-Page
August 03, 2004 11:47PM
This is a nice little add-on, but it had a security issue which I fixed by adding this after the initial includes:

if(!phorum_check_read_common()) {
return;
}
Attachments:
open | download - newest10.php (3.7 KB)
Re: Latest X Posts in a templated Phorum-Page
August 06, 2004 09:21AM
Got this error with latest CVS when trying to access newest10.php:

Fatal error: Call to undefined function: phorum_db_read_newflags() in /home/virtual/site97/fst/var/www/html/phorum5/newest10.php on line 72
Re: Latest X Posts in a templated Phorum-Page
August 06, 2004 09:23AM
yeah, newflags have changed some days ago.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Latest X Posts in a templated Phorum-Page
August 06, 2004 09:39AM
Updated version for working with current CVS (aka 5.0.8-dev).
It won't work with an earlier version!

(newer version in later post)


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting




Edited 1 time(s). Last edit at 08/23/2004 11:54PM by ts77.
Re: Latest X Posts in a templated Phorum-Page
August 23, 2004 11:52PM
Ok, here it is ... another update done for 5.0.8-RC.
It uses the new internal function for retrieving new posts -> [phorum.org]

Also it works now if called with no forum-id or forum-id = 0 ... it retrieves posts from ALL forums in this case.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting




Edited 1 time(s). Last edit at 03/25/2006 05:00PM by ts77.
Re: Latest X Posts in a templated Phorum-Page
August 29, 2004 01:48PM
Updated version.
Now it shows in the view for all forums the forum-name and a link to the forum too.
Also the new-flags in that view are correct now (retrieving the newflags for all involved forums)


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Attachments:
open | download - newest10.zip (3.1 KB)
Re: Latest X Posts in a templated Phorum-Page
August 29, 2004 04:33PM
I upgraded to 5.0.8-RC and also updated to this new version. When clicking on the link I just get the header repeating several times and the web page locks up. Any suggestions?

Thanks.
Re: Latest X Posts in a templated Phorum-Page
August 29, 2004 04:36PM
No, try to remove your compiled templates or touch all of the ones in the default-template.
thats not related to that add-on as it doesn't mess in any way with the templates.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Latest X Posts in a templated Phorum-Page
August 29, 2004 11:03PM
I cleared old files and re-uploaded the new files and it works now. When I call the newest10.php?0 to get the last 10 posts from all forums they all show up as new messages.

Thanks for your help.
noe
Re: Latest X Posts in a templated Phorum-Page
September 16, 2004 09:03PM
Does anyone know how to hack this script, so that there are the latest x *unread* Posts shown only?

Would be great if anyone could help me!

Sorry, only registered users may post in this forum.

Click here to login