Firefox PHP

Display Last 5 Phorum Posts -script

Posted by dagon 
Re: Display Last 5 Phorum Posts -script
June 15, 2004 04:52PM
Each link to the mod on Page 1 of the thread except for the one offered by sts includes something like

"$count = 40; //words per message for body to show"

and something to truncate it with "..."
Re: Display Last 5 Phorum Posts -script
June 15, 2004 04:58PM


oops.. maybe i got this from another thread originally.. sorry.

Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:09PM
No, it's okay, adding $row[body] displays the messages, but I don't know how to properly truncate it without getting an error message instead. I had tried using something from the original mod, but I got a message saying 'unexpected $', and when I tried to take out a part, it said 'bad arguments'. Heh, still fiddling.
Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:14PM

here's another go..

Attachments:
open | download - newest.php (2.1 KB)
Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:23PM
Ah, sweet! One more question. If I wanted to remove the break tags that show up from when a person has gone down a few lines in their posts, so that it's one block of text (with the spaces still in), would

if ($PHORUM[mods][bbcode] ==1){
$row[body] = preg_replace( "|</*[a-z][^>]*>|i", "", $row[body]);
$row[body] = preg_replace( "|[/*[a-z][^\]]*\]|i", "", $row[body]);
}

be what I need to modify? Or no? I didn't know if altering the bbcode thing in the mod may do anything.
Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:28PM

i wouldn't touch the mod.

$row[body]=str_replace("<br />"," ",$row[body]);

within.

like this
Attachments:
open | download - newest.php (2.2 KB)
Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:29PM
Please, add the forum id, that messages from a concrete forum were displayed.
Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:48PM

i don't know what you mean.

anyone know how to convert to the correct zone?

Re: Display Last 5 Phorum Posts -script
June 15, 2004 05:59PM
Your script shows messages from all forums.
I need messages form one selected forum.
Re: Display Last 5 Phorum Posts -script
June 15, 2004 06:19PM

i need them from all. ;-)
Sorry, only registered users may post in this forum.

Click here to login