1 (edited by AG 2007-03-25 21:12)

Topic: Getting the forum ID

I'd like to get the forum id, and post id of the topic. Is there a way through set variables to determine this?

If not, I can use mysql to figure it out, but I'd just like to know if there is an easier way tongue

Re: Getting the forum ID

Where would you like to use this?

3 (edited by AG 2007-03-25 21:39)

Re: Getting the forum ID

Well, I wanted to allow html for a certain forum for certain members. So I'll simply check what forum it is, what member group they are, and then choose to parse everything, or allow html in it.

Actually, I checked the parser.php, and was confused where the html was parsed in the message parse function. If I find it, I could make a new function to parse everything but the html. Could anyone tell me what I would need to take out?
Edit: Actually, I just replaced the "\n" with a line break, so that should be good enough. smile

Re: Getting the forum ID

You'd need to put a check around the pun_htmlspecialchars() function call. I suggest you pass on these variables in viewtopic.php. It should be possible smile

5 (edited by AG 2007-03-26 00:25)

Re: Getting the forum ID

I've been trying to use the database to determine the forum id, but I am having some trouble. But it must get the variable when viewing the page cause otherwise, it would not know the name of the forum for the navigation.

EDIT: Okay, I got the forum id working, but now i'm having trouble getting the poster's id. I tried using the variables such as $cur_post['poster_id'] but it didn't work...

Re: Getting the forum ID

$fid for forum ID, $cur_post['uid'] for user ID and $cur_post['g_id'] for group ID.

7

Re: Getting the forum ID

Thanks! It worked beautifully smile