The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Template To Use Option for ALL BLOCKS
I just wanted to start a thread and see if maybe there's other people out there with the same opinion. Maybe we can get a discussion going, possibly find a workaround, maybe put a good feature request in etc.
Anyway I'd love to see the 'template to use' option available for ALL the block types, not just custom html/php. Mainly because I can create new custom html/php templates with conditionals, where as I cannot create multiple standard blocks the same way. For example having the ability to customize the 'template to use' option with html/php blocks, I can show one sidebar block to guests, and another to members. It's as simple as creating 2 new sidebar block templates, identical to the existing html block template except with conditionals. I don't know why vbulletin stopped at only allowing that template selection option to custom blocks |
Благодарность от: | ||
findingpeace |
#2
|
||||
|
||||
I agree 100% with this - I had to just use conditionals in the block templates themselves, dedicating "New Threads" to certain usergroups and "New Posts" to others, in order to accomplish what I wanted. It would be great to use "New Posts" for both, but I know this can't happen with the current system.
I wouldn't even bother with a feature request. vB5 is probably eating up all of their time/resources. But a mod would be awesome over here |
Благодарность от: | ||
addamroy |
#3
|
|||
|
|||
I agree, it would be nice to have some sort of condition field for each block, or maybe a template to use field. But I think it's possible to do a work-around, although it's not very pretty. You could edit the existing templates and put in conditionals. It looks like each of the block types registers a "blockinfo" parameter to the template which contains a blockid and the title, so you could check those and do different things for different blocks, even if they use the same template. For example, if you had a New Posts block with id 5 that you wanted only to show to members, you could edit the block_newposts template and do something like:
Code:
<vb:if condition="!in_array($blockinfo['blockid'], array(5))" OR $show['member']"> // existing code </vb:if> The logic could get a little complicated if you had multiple blocks of that type that you wanted to show in different circumstances, but it could be done. It also has the disadvantage that all the work will always be done to create the block whether or not it's shown, although they are cached so that shouldn't be a major concern. |
Благодарность от: | ||
findingpeace |
#4
|
|||
|
|||
Figured I'd make a reply and let you guys know I submitted a modification request.
https://vborg.vbsupport.ru/showthrea...53#post2410153 |
Благодарность от: | ||
findingpeace |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|