The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Change showthread by showthread_2 in some forums
I am creating a product that depending on the forum he changes the Showthread, ah I would like to know, how do I get in the forum that I've chosen, instead of Showthread he shows a template Showthread_2?
Someone could give me a tip for that plugin, I created a plugin with the following code: PHP Code:
If I can help. |
#2
|
|||
|
|||
The data manager only controls the data during adding/editing/deleting.
It would be best to look at the showthread.php PHP code and see what is happening and what variables are involved. You probably want a condition like if($forum['forumid'] == X) or something. |
#3
|
||||
|
||||
I believe you could do pretty much everything just by calling another template. I mean, I was using both postbit and postbit legacy depending on the forum using a condition like the one Opserty told you.
You could do the same for showthread template. |
#4
|
|||
|
|||
Postbits are created using a class, showthread is done by procedural code.
|
#5
|
||||
|
||||
yes, but even so, his showthread template could have a condicional
Code:
<if condition="in_array($forumid, array(1,2,3))"> showthread2 template <else /> normal showthread template </if> You see that in the first post his concern is how to display the showthread 2 template, he doesn't want to change the core. |
#6
|
|||
|
|||
There is no need to change the core... this could probably be done using the Plugin System.
Using that conditional would mean the showthread template would be extremely long (twice the length of what it normally). It is probably more efficient to create a second separate template and overwrite the original one at runtime, as suggested by the OP. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|