The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page Details »» | |||||||||||||||||||||||||||
Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page
Developer Last Online: Jan 2018
I came up with this after downloading and installing the Sidebar Anywhere by BOP5 mod.
I didn't get permission from him or anyone to post this here, I hope the title isn't a big deal it's just a template mod I made up that allowed me to further build upon the features that mod made possible. That MOD in a nutshell lets you display your forum sidebar on any or all pages of your forum. ie forumdisplay pages, showthread pages, profile pages, etc. The problem was the sidebar was the exact same on each page, there is no way to show one block here, and a different block there, while keeping the sidebar on the homepage the same. Basically I wanted to create 'different sidebars' on the various forum pages. Well unfortunately with the way vbulletin works, manual template edits could only get me so far but this DOES give me new options to work with. Here's what is accomplish with this: 1 - Display the standard sidebar blocks on your HOMEPAGE only. ie the Forum Threads, Forum Posts, Group Discussions, and Tag Cloud blocks. 2 - Create any number of Custom HTML/PHP blocks that only show in certain forums or on certain pages, etc. Essentially what's happening here, is your main sidebar stays the same on your homepage and remains unaffected, HOWEVER you will have the ability to create new custom sidebars on any forum pages using Custom HTML/PHP blocks. You could display certain advertisements, sponsors, links, graphics etc in certain sections giving you the ability to further customize your forum utilizing the Sidebar Anywhere mod by BOP5. Instructions: Edit your default block_ templates. Styles & Templates > Style Manager > Your Style > Edit Templates > Block_Templates You need to ADD the following code bits to the TOP AND BOTTOM of each of the following block templates (block_newposts, block_threads, block_tagcloud, block_sgdiscussions) Add to the very TOP of each template: Code:
<vb:if condition="THIS_SCRIPT == 'index'"> Code:
</vb:if> Create a new template with conditionals FOR EACH block you'd like to create that displays only in certain sections, on certain pages, to certain usergroups etc. STEP 1 - Copy the contents of your block_html template STEP 2 - Create a new template. Style Manager > Your Style > Add New Template In the title field, call it block_html_SOMETHINGHERE replace SOMETHINGHERE with an identifier you choose. For example if you want this block to show only in your classifieds section if you have one, you might call your template block_html_classifieds In the template field, paste the copied content from your existing block_html template from step 1. BEFORE YOU SAVE THE TEMPLATE, do step 3. STEP 3 - This is where the magic happens, we're going to simply wrap conditionals around everything to display the block where you want it, and to who you want. At the very TOP you will add your opening conditionals. For the sake of example, we will show this block only in a certain forum, and only to guests. (Your classifieds section maybe) At the very TOP of this new template, ADD the following code: Code:
<vb:if condition="$GLOBALS[forumid] == xx"> <vb:if condition="$show['guest']"> At the very BOTTOM of this new template, ADD the following code: Code:
</vb:if> </vb:if> STEP 4 - Add your new Block to the Sidebar. Forums & Moderators > Forum Blocks Manager > Add Block Use block type: Custom HTML/PHP Enter the content of your new custom block as you normally would. In the "Template To Use" field at the bottom of the new block page, enter the name of the template you created in step 2 and 3. ie in this example, we would enter block_html_classifieds here Save the block. That's it! This new block will display only in the forum you selected and to guests. For a larger list of conditionals you can play around with to really get your sidebar(s) going there is a good list here http://www.forumthemes.com/helpful-t...nals-list.html It's a 4 step process per forum block you want to add. You could always use a conditional to show the block on every page EXCEPT the homepage, or every forum EXCEPT one or two, etc etc. If any section of the forum doesn't have any sidebar blocks that will display there, even with the Sidebar Anywhere mod activated, no sidebar will be shown at all and the page will be unaffected . I hope this helps some of you! If I was better at coding I'd like to be able to include instructions for conditionalizing the forum posts, forum threads, tag cloud and discussions blocks to use with sidebar anywhere, unfortunately the Custom HTML/PHP block is the only one reasonably easy to customize as needed because it gives you the option to utilize a specific template we create. Check out my other Template Modifications for 4.x! [Postbit-Legacy Hack] Attractive User Info Boxes for Posts Link Private Forums to thread instead of error message Change Thread Title Color for Specific Forums on Homepage Change Background Color for Specific Forums on Homepage Change Title Color of Specific Forums on Homepage Thread Starter Image in Postbit for OP CUSTOM BUTTONS that look like your forum! Custom User Rank Box in Posts Show Your Support
|
Comments |
#2
|
|||
|
|||
Any screenshoot ?
|
#3
|
|||
|
|||
It will look no different from the sidebar you currently have. Only difference is it will show custom html/php blocks using conditionals.
For screenshots of how the sidebar itself looks in general, see BOP5's thread for the Sidebar Anywhere Mod. I didn't code the MOD or alter the appearance, simply enabled a way to wrap conditionals around the forum blocks. https://vborg.vbsupport.ru/showthread.php?t=283307 |
Благодарность от: | ||
Gecuba |
#4
|
|||
|
|||
You can create a mod that puts the sidebar on every page without changing the custom graphics? Using the plugin so far put the sidebar always change. People are looking for a mod that does not change the sidebar that every person you customize!
|
#5
|
|||
|
|||
what?
|
#6
|
|||
|
|||
This looks great. is anybody using this? Any live sites using this?
|
#7
|
|||
|
|||
So can I get this working on 4.2.1?
Cheers. |
#8
|
|||
|
|||
Re-upload like please?
|
#9
|
|||
|
|||
Hi Addamroy
I am interested in this mod let me configure of course pay. Thanks |
#10
|
|||
|
|||
tnx, worked.
How to "this forumid" in block ? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|