News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Using SMF SSI to list all posts from a single topic.

Started by tvfl, March 19, 2008, 03:09:30 PM

Previous topic - Next topic

tvfl

Hello,

Basically I want to use a ssi function, to list all posts from a certain topic

The variable topic I want to be able to change

So $topic

It displays all posts with the newest first, and oldest last, with ALL content inside each post, in a a long list.

Thank you

tvfl

So I finally did it


A new question!


I want my posts to be shown to contain links only, how do I do this?

I have this code:

$row['body'] = preg_replace(array('~\[quote(.+?)\[/quote\]~i', '~\[code(.+?)\[/code\]~i', '~\[img(.+?)\[/img\]~i'), '', $row['body']);

For stripping tags, but I need code to work out where "http://" and keep all the links only,...

PLEASE HELP!

tvfl

So..

I have done everything I want to so far...

-----
At the moment I have a function using db_query that finds all posts from a topic and displays them.

I keep persistantly getting the error "No database selected" if I click lots of times to view this function.

Specifically on the line
__FILE__, __LINE__

I tried to remove this bit, but the db_query needs the parts...

Is there any explanations for this?


Spaceman-Spiff

Hi tvfl,

Did you put your code inside SSI.php, or on a separate file? Try to use the $db_prefix var, as it contains the database name too.

Eliana Tamerin

Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Advertisement: