Firefox PHP

Display Last 5 Phorum Posts -script

Posted by dagon 
Re: Display Last 5 Phorum Posts -script
June 29, 2004 01:36PM
Nevermind, I got it.
Re: Display Last 5 Phorum Posts -script
July 09, 2004 01:25PM
O.K. I'm lost too. Need the same thing as Magi - I want to pick from a specific board, and display it in another. Any ideas? I suppose it'd be something like WHERE forum_id = ??
Re: Display Last 5 Phorum Posts -script
July 13, 2004 12:17PM
The one I use now is:

$result = mysql_query("SELECT * FROM $table m, $forum_table f WHERE m.forum_id = f.forum_id AND f.forum_id != 31 AND f.forum_id != 2 AND f.parent_id !=22 AND m.status != '-2' ORDER BY m.datestamp DESC limit $number") or die("Failed Query of " . $result. mysql_error());

Pretty much tells it to take all but from certain forums (31 and 2) and from forums in folder 22. m.status != '-2' means it ignores hidden messages, and won't display them.
Re: Display Last 5 Phorum Posts -script
July 13, 2004 12:53PM
> m.status != '-2' means it ignores hidden messages, and won't display them.

but it would show unapproved messages.


Thomas Seifert
Re: Display Last 5 Phorum Posts -script
July 13, 2004 12:55PM
I don't know, it works for me. I tested it out by hiding one of my messages. I had left out that part, and it showed all messages, including the hidden. Then I added it in, and it showed all messages except for the hidden one. All hidden messages in my database have the status number of -2.
Re: Display Last 5 Phorum Posts -script
July 13, 2004 01:03PM
unapproved are -1 in moderated forums ... so set status > 0 to get only messages which are visible in the forum.


Thomas Seifert
Re: Display Last 5 Phorum Posts -script
July 13, 2004 01:22PM
Now others will know, and mine'll still just work for me I suppose. Regular posts in my status are '2', unapproved are '-2', and having != '-2' keeps the unapproved from showing.



..the world works in mysterious ways? =P
Re: Display Last 5 Phorum Posts -script
July 13, 2004 01:24PM
there are "hidden" an "unapproved" messages, you are only talking about hidden ones. unapproved messages appear in moderated forums, not by hiding them.


Thomas Seifert
Re: Display Last 5 Phorum Posts -script
July 13, 2004 01:30PM
Yes, when I say hidden, I mean unapproved, hidden from view. What other hidden is there?

Edit: Aren't hiding messages and replies unapproving them, or are you referring to the posts in forums where they have to wait to be approved before being shown? I could see that.



Edited 1 time(s). Last edit at 07/13/2004 01:31PM by portal of curiousity.
Re: Display Last 5 Phorum Posts -script
July 13, 2004 01:33PM
> are you referring to the posts in forums where they have to wait to be approved before being shown?

yeah these are unapproved messages, the others are just hidden messages. these have a different flag.


Thomas Seifert
Sorry, only registered users may post in this forum.

Click here to login