![]() |
Modify functions_threadmanage.php
functions_threadmanage.php builds the $jumpforumbits variable, for use, obviously, in the "Forum Jump" select/option list.
I want a similar variable that includes only the "Category" forums, those with parentid = -1 in the database. I could obviously "hack" the PHP file to contain my own function, and then hack the other files to call this function when/where I needed. I'm wondering, though, if I wanted to use the PlugIn system, where I would place this code? I want the new thread template to be able to use this variable. Another way of asking: which HOOK do I use to add a function to the functions_threadmanage.php file, and which hook do I use to call that function, returning a variable that is accessible in the New Thread template? EDIT: Ok... no answers. Maybe the question isn't clear. Another try: I add the following plugin code to the "newthread_post_start" hook. Code:
global $mycatbits; Then, in the "newthread" template, I expect to be able to put: Code:
<select>$mycatbits</select> EDIT: Ok... here's what finally "worked", though I still have a question. 1st, it's important to find the correct hook. I was using "newthread_post_start", which isn't the right hook. In hook location "newthread_start": Code:
global $mycatbits; I added a phrase called "cat_feature" via the Phrase Manager. Then, in the "newthread" template, I added the following code, after the "subject field" comment: Code:
<if condition="$show['catlist']"> My question: Code:
$myCats = $db->query_read("SELECT forumid, title from vb_forum where parentid = -1 and forumid != 42"); |
All times are GMT. The time now is 02:28 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|