Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page Details »
Sidebar Anywhere Enhancement - Custom Blocks Per Forum or Page
Mod Version: 1.00, by addamroy (Designer) addamroy is offline
Developer Last Online: Jan 2018 I like it Show Printable Version Email this Page

vB Version: 4.1.x Rating: (1 vote - 5.00 average) Installs: 10
Released: 14 Mar 2013 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code Translations  

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add to the very BOTTOM of each template:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will restrict the main forum sidebar blocks to your forum's homepage (index page), change 'index' to suit your needs if your forum is modified as such.

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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace xx with the forumid of the forum you want to display this block in.

At the very BOTTOM of this new template, ADD the following code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Save your new template now.

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

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 14 Mar 2013, 14:37
tanzeelniazi tanzeelniazi is offline
 
Join Date: Apr 2012
Any screenshoot ?
Reply With Quote
  #3  
Old 14 Mar 2013, 16:25
addamroy addamroy is offline
 
Join Date: Sep 2010
Originally Posted by tanzeelniazi View Post
Any screenshoot ?
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.

http://www.vbulletin.org/forum/showthread.php?t=283307
Reply With Quote
  #4  
Old 15 Mar 2013, 22:32
Manuel94 Manuel94 is offline
 
Join Date: Jan 2013
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!
Reply With Quote
  #5  
Old 15 Mar 2013, 23:53
addamroy addamroy is offline
 
Join Date: Sep 2010
what?
Reply With Quote
  #6  
Old 27 Mar 2013, 11:12
BlogTwits BlogTwits is offline
 
Join Date: May 2012
This looks great. is anybody using this? Any live sites using this?
Reply With Quote
  #7  
Old 26 Sep 2013, 11:37
obglobal.net obglobal.net is offline
 
Join Date: Jan 2013
So can I get this working on 4.2.1?

Cheers.
Reply With Quote
  #8  
Old 12 Nov 2013, 16:14
NoamRodrik NoamRodrik is offline
 
Join Date: Aug 2011
Real name: Rotem
Re-upload like please?
Reply With Quote
  #9  
Old 08 Feb 2014, 20:28
vicking74 vicking74 is offline
 
Join Date: Apr 2010
Hi Addamroy

I am interested in this mod let me configure of course pay.

Thanks
Reply With Quote
  #10  
Old 15 Jun 2014, 10:42
behcet behcet is offline
 
Join Date: Apr 2007
tnx, worked.
How to "this forumid" in block ?
Reply With Quote
  #11  
Old 21 Mar 2015, 04:59
silverd silverd is offline
 
Join Date: Dec 2006
If addition to using blocks on certain pages, if you want to add a custom block thats NOT a "custom html/php" block, just use $blockinfo['blockid'] == xx to the condition.

The block id # can be found by:

Forum Blocks Manager -> find the block you want to use -> hover over the "edit" button -> block id # is at the end of the url
__________________
Coder / Developer
Reply With Quote
  #12  
Old 15 May 2015, 15:20
thenicehorizon thenicehorizon is offline
 
Join Date: Dec 2012
thx but it doesn't work with 4.2.1
Reply With Quote
  #13  
Old 15 May 2015, 15:47
thenicehorizon thenicehorizon is offline
 
Join Date: Dec 2012
can you help me please
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 19:24.

Layout Options | Width: Wide Color: