Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
Hide VBA Columns in UserCP Details »»
Hide VBA Columns in UserCP
Version: .5, by Crimm Crimm is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Category: Portal Software - Version: 3.7.0 RC 3 Rating:
Released: 11-04-2008 Last Update: Never Installs: 5
Template Edits
Re-useable Code  
No support by the author.

Description: Do you have users on your VBA site that don't like the left/right columns? I recently setup a site for some friends that did. Playing around I figured out how to add an option in the UserCP to allow the users to Hide the Columns from their view. I thought I would share with everyone. If this is done somewhere else ... I apologize. I did some searching, but I didn't see anything like this

Difficulty: 3/10 This is pretty easy, but you will be making template changes, so make sure you backup your site or do it on a test site. I won't be held responsible for any damage that occurs.

Support: I'm around the boards, but really busy. I'll support the best I can

Required:
- vBadvanced
- vBulltin

Installation Instructions:
This is more of a set of Template Modifications. I tried to make it a product, but I'm having trouble figuring out the Product system. I'm still reading all those documents.

NOTE: I'm writing this as if you have both columns enabled. If you do not have both columns enabled then you can skip that column's steps.

Step 1: You need to create your user options field by going to your Admin CP -> Dropping down User Profile Field and Click User Profile Field Manager as seen here:



Or you can do this:

http://www.yoursite.com/forum/adminc....php?do=modify

Step 2: We need to add the User Profile field. Click the Add User Profile Field on the left hand side in the User Profile Field Menu.

Step 3: For the Profile Field Type Choose Single Selection Radio Buttons.

Step 4: Click Continue

Step 5: Fill out the boxes like this:

- Title: Hide Left Column
- Description: Hiding the Left Column of vBadvanced
- Category is up to you.
- Items per line: 0
- Options:
No
Yes
- Set Default: Yes
- Field Required: No
- Private: No
- Searchable: No
- Show on Member's List: No
- Allow User Input: No
- Display Page: Options: Other

Step 6: Click Save

Step 7: Let's do it again for the Right Column if you have one. Click Add again on the left hand side.

Step 8: For the Profile Field Type Choose Single Selection Radio Buttons.

Step 9: Click Continue

Step 10: Fill out the boxes like this:

- Title: Hide Right Column
- Description: Hiding the Left Column of vBadvanced
- Category is up to you.
- Items per line: 0
- Options:
No
Yes
- Set Default: Yes
- Field Required: No
- Private: No
- Searchable: No
- Show on Member's List: No
- Allow User Input: No
- Display Page: Options: Other

Step 11: Click Save

Now both our options are created for our users to select.

Let's look back at or fields that we created. Click User Profile Field Manager on the left hand side again to see this:



You can see our two newly created fields. See the numbers in the Name Column?

They say: field6 and field13. These will differ on your site from mine, so write them down... you will need them. 6 for the left in this example, and 13 for the right in this example.

Now we can move into the template modification.

Step 12: Go into your Style Manager by entering the Admin CP and clicking the Styles and Templates Menu.

Step 13: Edit the Templates of your style you want to this for by click Edit Templates in the drop down like this:



Step 14: Under the "vBadvanced CMPS Templates" you will see "adv_portal" - Customize it.

Step 15:
Find:

Code:
<if condition="$show['left_column']">
			<td width="$vba_style[portal_leftcolwidth]"<if condition="$show['center_column'] OR $show['right_column']"> style="padding-$stylevar[right]: $vba_style[portal_colspacing]px"</if>>
				$home[leftblocks]
			</td>
		</if>
and Replace it with:

Code:
<if condition="$bbuserinfo['fieldX']== 'No' OR $bbuserinfo['fieldX']== ''">
		<if condition="$show['left_column']">
			<td width="$vba_style[portal_leftcolwidth]"<if condition="$show['center_column'] OR $show['right_column']"> style="padding-$stylevar[right]: $vba_style[portal_colspacing]px"</if>>
				$home[leftblocks]
			</td>
		</if>
</if>
Don't forget to change the X above with the number of your newly created profile field. Mine was 6 in the example above. See this screenshot again:



Make sure to use which ever one is used on your site for Hide Left Column.

Step 16:
Find:
Code:
<if condition="$show['right_column']">
			<td valign="top" width="$vba_style[portal_rightcolwidth]"<if condition="$show['center_column'] OR $show['left_column']"> style="padding-$stylevar[left]: $vba_style[portal_colspacing]px"</if>>
				$home[rightblocks]
			</td>
		</if>
and Replace with:

Code:
<if condition="$bbuserinfo['fieldX']== 'No' OR $bbuserinfo['fieldX']== ''">
		<if condition="$show['right_column']">
			<td valign="top" width="$vba_style[portal_rightcolwidth]"<if condition="$show['center_column'] OR $show['left_column']"> style="padding-$stylevar[left]: $vba_style[portal_colspacing]px"</if>>
				$home[rightblocks]
			</td>
		</if>
</if>
Don't forget to change the X above with the number of your newly created profile field. Mine was 13 in the example above. See this screenshot again:



Make sure to use which ever one is used on your site for Hide Right Column.

Now once you make sure you change out the X's for numbers you can hit save.

Step 17: Now you can tell your users to go to their User CP. Click Edit Options. Scroll to the bottom and they will see an option to hide the left/right column. Or you can just give them the link to the options: http://www.yoursite.com/forum/profil...do=editoptions

I guess that's it. See that was simple wasn't it? I probably made it seem daunting, but I wanted to be as detailed as possible. I have been playing around with vBulletin for a few years now, but never tried to release anything here... I thought I could try for the first time. Please be gentle with your criticism If you like it let me know and maybe I'll spend some time putting down other things that I have found.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-05-2008, 04:38 PM
KW802's Avatar
KW802 KW802 is offline
 
Join Date: Jul 2003
Location: A galaxy far, far away...
Posts: 1,450
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting solution but it looks like it will also disable the columns on the 'normal' vBa pages as well (eg: the standard portal 'home' page).
Reply With Quote
  #3  
Old 11-05-2008, 05:32 PM
Crimm's Avatar
Crimm Crimm is offline
 
Join Date: Feb 2007
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes.

For now it's all or nothing.

I guess I forgot to mention that part.

Maybe I can update it to determine which page to hide the columns on.

The wheels are already spinning Thanks!
Reply With Quote
Reply

Thread Tools

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 11:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03865 seconds
  • Memory Usage 2,220KB
  • Queries Executed 16 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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