The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Getting Var to Work on forumhome
How can I get the $thread variable to work on the index/forumhome. For example: $thread['closed']. I need to check whether or not the last thread shown on the forumbit is closed or not. Thanks in advance.
|
#2
|
|||
|
|||
An idea... Check the following function:
Code:
function construct_forum_bit located in functions_forumlist.php Code:
if ($vbulletin->forumcache["$lastpostarray[$forumid]"]['lastpost'] > 0) |
#3
|
||||
|
||||
I was playing around with this code in that if-block:
PHP Code:
|
#4
|
|||
|
|||
Right before the if-block, find and add the part in bold on a test board, and make sure to read the comments:
Code:
// dates & thread title $lastpostinfo = $vbulletin->forumcache["$lastpostarray[$forumid]"]; // this is just an example and you may need to reduce the queries! // do _NOT_ do it this way because there can be a query per forum! $forumhome_threadid = $lastpostinfo['lastthreadid']; $forumhome_threadinfo = fetch_threadinfo($forumhome_threadid); $forumhome_open = $forumhome_threadinfo['open']; // if $forumhome_open is the number one, then the thread is open |
#5
|
||||
|
||||
Thanks Calorie -- this should be a good starting point for me.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|