PDA

View Full Version : $vbulletin->forum['forumid']


felixthekat85
12-02-2010, 12:58 PM
:(:( Does not work:

$foroid = $vbulletin->forum['forumid'];

if ($foroid != 24)
{
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "followusernotify (userid, message)
VALUES
($tousername, '$subject: <a href = $forumurl/showthread.php?t=$threadid&p=$postid>$threadtitle</a> $subject')
");}

Help Me!!

--------------- Added 1291304552 at 1291304552 ---------------

I explained wrong.
When user create a thread, calls this function

$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "followusernotify (userid, message)
VALUES
($tousername, '$subject: <a href = $forumurl/showthread.php?t=$threadid&p=$postid>$threadtitle</a> $subject')
")


I want to do is:
if the user creates a thread in forum ID=24 is not fulfilled.

then I did so:
$foroid = $vbulletin->forum['forumid'];

if ($foroid != 24)
{....}

but no work!!!
because, although the user create a thread in the forum ID=24 this is true

Lynne
12-02-2010, 01:54 PM
That variable probably doesn't exist there. What hook location? Go look in the php files and find that hook location. Do you see anywhere around there that the variable $vbulletin->forum is mentioned? You probably just want to use $thread or $threadinfo.

felixthekat85
12-02-2010, 02:39 PM
Hey friend, Thank you for response.
In the php file does not mention the $ vbulletin-> forum
how do I call or hooked?

I am sorry, I'm lost

Lynne
12-02-2010, 04:51 PM
You need to use whatever variable is available there. Look at the code there and see where the forumid is defined and use that. Like I said, probably $thread['forumid'] or $threadinfo['forumid']. Just look in the code and see.

felixthekat85
12-06-2010, 09:19 PM
$thread['forumid'] and $threadinfo['forumid'] not work
In the php, forumid is not defined.
¿How do I define? or any other suggestions?
Thank you

Lynne
12-06-2010, 10:27 PM
You need to tell us where you are putting the code in your first post then - all of it. Where is the php code going. Where is the template code going. We need more details.

vbenhancer
12-08-2010, 10:52 AM
did you put a global in your function ?!... because clearly you are calling that script inside a function...