Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
CMS Disabler Details »»
CMS Disabler
Version: 2.00, by Trek Trek is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.2.x Rating:
Released: 12-17-2009 Last Update: 07-24-2012 Installs: 70
Uses Plugins
Re-useable Code Translations  
No support by the author.

Reason why I wrote this mod

When vB4 gold comes out, I'd like to switch to it, get my forums working first and foremost. While that work is going on, I have content authors that need to create content, but I don't want this done on a live site where my users can see them working. I also need to skin the CMS, etc.

Once things are skinned, content is written, all of that. I want to simply "turn it on" and everything is live and ready to go.

What this mod does
  • Allows you to set usergroups that can access your CMS.
  • If a user is not of this usergroup, they are forwarded to the forums.php page.
  • It will not display the "Home" button on the tabnav if the user is not in the allowed usergroups list as well.
Notes

Thanks


BirdOPrey5, for updating the mod to work with vb 4.2 as well as fixing some other issues. I'm no longer supporting the mod and the code is reusable and I've updated the download to reflect his code/changes.

To Lynne for telling me what I needed to do when I asked the question, but not specifically telling me how to do it (doing it for me). Learning is fun, sometimes.


Installation:

Install the XML as you would any other vB mod.

Download Now

File Type: xml product-cmsdisabler_BOP5.xml (2.6 KB, 33 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
BirdOPrey5, Jamzyb, Zero13

Comments
  #42  
Old 01-14-2010, 04:00 AM
Brother Malachi Brother Malachi is offline
 
Join Date: Jun 2008
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Axel Foley View Post
I don't need the CMS for my forum (not yet), so I simply did this:

1. Edited index.php in the forum root, commenting require('content.php'); and uncommenting require('forum.php');

2. Went to ACP->Plugins & Products->Manage Products and disabled the vBulletin CMS product.

Now the CMS disappeared, the button on the navbar too.

Hope it helps someone else with my same need. I'll tag this mod and see how it evolves.
Do you understand the PURPOSE of this mod?
As of right now when the CMS is enabled EVERYONE sees it.
The purpose of this mod is to allow the admin to pick only CERTAIN USERGROUPS to see it...hence effectively disabling it

Your method TURNS off the cms. This method allows the admin to develop the cms without anyone actually knowing it is enabled.
Without this mod there is no built in way (in vb) to hide the cms from users if it is enabled.
Reply With Quote
  #43  
Old 01-14-2010, 04:43 AM
Brother Malachi Brother Malachi is offline
 
Join Date: Jun 2008
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh by the way, this mod doesn't work correctly.
In the adminCP options page for this mod it says:
"Enter user groups that you want to have access to your CMS.

Separate usergroups with a comma.
Example: 6,5"

However, it is not coded correctly to work w/ more than one usergroup so inputting more than usergroup id will beak the board.

is_member_of() requires you to input usergroup ids, not an array. So you can't use this:
Code:
<vb:if condition="is_member_of($vbulletin->userinfo, $vbulletin->options['cms_disabler_usergroups'])">

Here's what I did to fix the issue. In the plugin titled "CMS - Redirector" add the following to the top:
PHP Code:
// Generate an array w/ all the usergroups
$cms_disabler_usergroups explode(","$vbulletin->options['cms_disabler_usergroups']);

// Get rid of white spaces
function trim_value(&$value) { 
    
$value trim($value); 
}
array_walk($cms_disabler_usergroups'trim_value'); 


then replace this line:
PHP Code:
if (!is_member_of($vbulletin->userinfo$vbulletin->options['cms_disabler_usergroups'])) { 
with this line:
PHP Code:
if ( !in_array($vbulletin->userinfo['usergroupid'], $cms_disabler_usergroups) ) { 
Reply With Quote
  #44  
Old 01-14-2010, 04:57 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that fix, I'll try and get it into an updated release shortly. Just been pressed for time on other projects. But again, thank you!
Reply With Quote
  #45  
Old 01-14-2010, 05:24 AM
Brother Malachi Brother Malachi is offline
 
Join Date: Jun 2008
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem.

...i've actually been trying to figure out how to make the change to the template lol.
I guess with the new vb version you can't put in_array($bbuserinfo[usergroupid], $some_array) in a template. It keeps spitting out an error saying that $some_array isn't an array.
Reply With Quote
  #46  
Old 01-14-2010, 05:34 AM
Brother Malachi Brother Malachi is offline
 
Join Date: Jun 2008
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, to fix the template replace
Code:
<vb:if condition="is_member_of($vbulletin->userinfo, $vbulletin->options['cms_disabler_usergroups'])">
with:
Code:
<vb:if condition="$cms_disabler">
then add a new plugin.
Hook location: global_start
Code:
PHP Code:
// Generate an array w/ all the usergroups
$cms_disabler_usergroups explode(","$vbulletin->options['cms_disabler_usergroups']);
$cms_disabler in_array($vbulletin->userinfo['usergroupid'], $cms_disabler_usergroups);
vB_Template::preRegister('vbcms_navbar_link',array('cms_disabler' => $cms_disabler)); 
and that should take care of it
Reply With Quote
  #47  
Old 01-14-2010, 02:16 PM
Axel Foley's Avatar
Axel Foley Axel Foley is offline
 
Join Date: Nov 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brother Malachi View Post
Do you understand the PURPOSE of this mod?
As of right now when the CMS is enabled EVERYONE sees it.
The purpose of this mod is to allow the admin to pick only CERTAIN USERGROUPS to see it...hence effectively disabling it

Your method TURNS off the cms. This method allows the admin to develop the cms without anyone actually knowing it is enabled.
Without this mod there is no built in way (in vb) to hide the cms from users if it is enabled.
Have you even bothered to read what I wrote in my post (#30)?

I explained that I was looking for a way to COMPLETELY disable the CMS, and I stumbled upon this mod but it was not exactly what I needed; since I thought that other people could have my same requirement I thought it was useful to post what I discovered.

I thanked the dev, and I explained why I posted those instructions; I really don't see why you wrote your post...completely useless.

Anyway...no problem...forums unfortunately are full of posts like yours.

Take care.
Reply With Quote
  #48  
Old 01-15-2010, 01:40 AM
radmoose's Avatar
radmoose radmoose is offline
 
Join Date: Jul 2006
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One item for the documentation.

Make sure you set vBCms Comments forum permissions to only allow the selected usergroups to have access to the comments as by default (at least in my case) everyone could see the comments.
Reply With Quote
  #49  
Old 01-20-2010, 07:52 PM
Old-Git Old-Git is offline
 
Join Date: Dec 2009
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Brother Malachi, Re the user ID array. Thanks for the code update. I got around the problem quickly by setting the Moderators group as the group with access and then adding the mod groups as a secondary user group on the Admin's account. This way I get all my mods and my admins on the CMS. I guess I could also have set-up another user group called CMSviewers and then added that as a secondary group to everyone I wanted to see the CMS, probably a bit tidier and easier to delete when I'd finished. Either way it's allowed me to do what I needed to do....But thanks all the same for the code update, I really appreciate you getting this done and adding to the thread, it's certainly a much tidier way of doing it.

Rgds

Pete
Reply With Quote
  #50  
Old 05-25-2010, 01:17 PM
sportsfroma2 sportsfroma2 is offline
 
Join Date: Aug 2006
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now that my forums are all set for a little bit I have some time to finally work on the CMS thanks to this mod.. I used impex to port over all the stuff from the old CMS, but it wasn't a completely clean transfer. This mod allows me to begin formatting everything correctly at my pace so it doesn't inconvenience anyone else/nobody else needs to know anything is changing until it's ready for all to see

thanks a lot!
Reply With Quote
  #51  
Old 05-25-2010, 01:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not just disable the plugin for it?
Reply With Quote
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 10:48 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.04744 seconds
  • Memory Usage 2,353KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_code
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete