The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Call a template within a template
i would like to combine two mods. what's the easiest way to do this? i was thinking maybe i can call the one template from within the main mods template?
thanks for your help |
#2
|
|||
|
|||
What mods are you talking about?
And you cannot call a template from within another template, but you can grab a template from within a plugin and store the data into a variable that you can display in another template. But if you are talking about combining two mods I doubt it will be as simple as that. |
#3
|
|||
|
|||
thanks for your quick reply.
i would like Latest Album Pictures (https://vborg.vbsupport.ru/showthrea...ighlight=album) to display in All Albums (https://vborg.vbsupport.ru/showthread.php?t=172215) |
#4
|
|||
|
|||
You would have to modify the way both mods work in order to do it, if you are not a coder then you may find this difficult.
Basically you have to change the plugin that generates the latest albums and have it execute on the all albums page first. Then change it from making automatic template edits and have it store the data in a variable. And last you would have to modify a template from the all albums mod to add that variable in. |
#5
|
|||
|
|||
i was looking at the plugins but i didn't see an All Albums hook. i thought maybe i could make a new plugin based off of Latest Album and then make it use an All Albums hook or something.
idk, i might have to revisit this another time. i just don't have the time to research and make this happen right now i guess. thanks again for your replies. |
#6
|
|||
|
|||
There isn't an 'all albums' hook... The best way would be to change the hook location to 'global_start' or one of the global hooks, check the THIS_SCRIPT define and only allow the rest of the code to execute when THIS_SCRIPT is defined as what it is defined as in the all albums file. You would also have to modifify the 'Latest Album Picture' plugin that executes on the hook location 'cache_templates' and change the THIS_SCRIPT check against that value as well instead of 'index' as it does now.
|
#7
|
|||
|
|||
Here I just made some quick tests and here is a quick fix for the Album Pictures mod with changes to make it work on the all albums page...
You will need to edit the 'album_all_album_list' template and add '$pblatestalbums' to where you want the Album Pictures mod to display at. I have also attached a modified version of the 'all albums' product which has it showing right below the navbar if that is where you want it to display. |
#8
|
|||
|
|||
DUDE!!! THAT'S PERFECT!!!
you rock, bro! best thread and answer i've experienced in vbulletin |
#9
|
|||
|
|||
lol.. your welcome
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|