Quote:
Originally Posted by Alfa1
This was not quite what I meant, because I got this far. I have 3 tabs linking to 3 different categories in LDM; Video, Audio and Documents. All sections make use of local_links, so I can not use THIS_SCRIPT to identify the categories.
This is why I want to use category-id's. I have done this for the tabs linking to forums. This worked like this:
Code:
<if condition="in_array($foruminfo['forumid'], array(176, 190, 174))">
I have tried to translate the method to LDM, like below, but was unsuccessful:
Code:
<if condition="in_array($foruminfo[catid], array(126,39, 43))">
If you can correct this line for me, then I am set.
|
Yes, there's a small problem with this approach, because the standard coding for the tabs hack sets up its display *before* LDM gets started. Consequently, standard LDM variables have not yet been set.
The following approach works:
1) Instead of putting $tabbars in the navbar template, put it in the links_header template, immediately after $navbar.
2) Create a new plugin tied to the *ldm_maindisplay_end* hook, and make its code identical to the code which the tabs hack ties to the *parse_templates* hook
3) You can code your in_array() check using the $viewcatid variable.
This will work for the main LDM displays. You will have to work out how to get this to work in other parts of vBulletin, i.e. which templates you can patch with $tabbars, etc.