Firefox PHP

Latest X Posts in a templated Phorum-Page

Posted by Thomas Seifert 
Re: Latest X Posts in a templated Phorum-Page
April 25, 2006 10:51PM
You can go to [hdrpg.com] Not sure how much you'll see without registering. Use the Site Nave menu on the top left to see the 10 latest posts, 20, 50, 100.

Steel Rat
[infinite-realities.com]
Re: Latest X Posts in a templated Phorum-Page
April 26, 2006 03:19AM
Quote
Steel Rat
Wouldn't that just be a matter of changing the SQL to a <> instead of an = ? I haven't looked so I don't know.

Heh no, sorry. Newflags are much more complicated than a simple <> or = query.

I guess one could use the query which is used on the index-page for showing the newcount to retrieve the new messages for *a given* forum. but I didn't look at it and for all forums you would still need a query per forum.


Thomas Seifert
Re: Latest X Posts in a templated Phorum-Page
April 26, 2006 09:14AM
So I would need to iterate through all forums, leaving out those which the current user has no visibility. Makes sense.

Steel Rat
[infinite-realities.com]
Re: Latest X Posts in a templated Phorum-Page
April 26, 2006 03:57PM
Quote
Steel Rat
You can go to [hdrpg.com] Not sure how much you'll see without registering. Use the Site Nave menu on the top left to see the 10 latest posts, 20, 50, 100.

So you just create a link like this [www.hdrpg.com] on your page and that's it!

That's helpful!

Thanks

[opensourceCMS.com]
[ongetc.com]
Chanh Ong
Re: Latest X Posts in a templated Phorum-Page
April 29, 2006 11:46AM
Quote
chanh
Quote
Steel Rat
You can go to [hdrpg.com] Not sure how much you'll see without registering. Use the Site Nave menu on the top left to see the 10 latest posts, 20, 50, 100.

So you just create a link like this [www.hdrpg.com] on your page and that's it!

That's helpful!

Thanks

Not quite it. Follow the installation instructions and it will work for you. I made a slight modification to allow for viewing more than 10, 25, 50 posts, and I wanted some different functionality too.

Steel Rat
[infinite-realities.com]
Re: Latest X Posts in a templated Phorum-Page
November 08, 2006 01:31PM
I have a couple of questions on this mod...

1. Can the output be sorted by forum then by date? If so, how? I'm not reeeeeaaaaallll good at using arrays.

2. Can messages that have already been read be filtered out? I figured out how to do this in the template but it screws up the number of post that are shown per page. How would you do this in the php code?

Thanks
Re: Latest X Posts in a templated Phorum-Page
November 08, 2006 02:40PM
#1

i figure it would work to just build the array like...

forum_posts[forum_id][post_id] = post

then to get them out it's like

foreach forum_posts as forum_id => posts
foreach posts as post_id => post

endforeach
endforeach

#2

not sure



Edited 1 time(s). Last edit at 11/08/2006 02:41PM by rheo.
Re: Latest X Posts in a templated Phorum-Page
November 16, 2006 05:26PM
this add on seems to not work with the real_names module.

is it maybe missing a needed hook or something?
Re: Latest X Posts in a templated Phorum-Page
November 16, 2006 07:39PM
The real_name module needs to know what to rewrite in the page. The latest version of the mod has a compact rewriting language (see the rewrite rules file) which defines what to rewrite.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Latest X Posts in a templated Phorum-Page
November 16, 2006 08:01PM
I haven't looked at that template in awhile.
Turns out I must have altered it a long time ago due to some users have really long names and messing up the display.

for the author name in the newest template I have put this..

<?php print substr($PHORUM["TMP"]["ROWS"]["author"],0,14); ?>

This should give me a substring of exactly what is stored in the author field.
However, it seems the real_name mod does not actually save the real_name in the author field of the database table.

why is that? is there any reason why the author field of p5_message has to be the p5_users.username? I would have thought the user_id would be enough for anything important.



Edited 1 time(s). Last edit at 11/16/2006 08:04PM by rheo.
Sorry, only registered users may post in this forum.

Click here to login