Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2013, 01:06 PM
addamroy addamroy is offline
 
Join Date: Sep 2010
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
Благодарность от:
findingpeace
  #2  
Old 03-14-2013, 01:12 PM
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Posts: 268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Благодарность от:
addamroy
  #3  
Old 03-14-2013, 03:42 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
findingpeace
  #4  
Old 03-15-2013, 03:55 PM
addamroy addamroy is offline
 
Join Date: Sep 2010
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Figured I'd make a reply and let you guys know I submitted a modification request.

https://vborg.vbsupport.ru/showthrea...53#post2410153
Reply With Quote
Благодарность от:
findingpeace
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04521 seconds
  • Memory Usage 2,196KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete