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 12-16-2009, 03:19 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Disable CMS, but only for users, not admins

What I want to do is get the forums working first, then enable the CMS later. But I don't want to enable the CMS and have to skin it while it's live. I want to be able to skin it and whatnot, then enable it when it's completed so the end user experience isn't total crap. =)

Anyone know if this is possible?

Someone suggested removing perms to the CMS from people, but then everyone will get a "You do not have permssion" message when accessing the main page of the site. Not what I would consider an acceptable solution for it as this would still show the unskinned site somewhat too.

Anyone have any other ideas?
Reply With Quote
  #2  
Old 12-16-2009, 03:28 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd first turn off the tab in the navbar or put a condition around it to only show to the admins. Then I'd create a plugin that checks what page and the usergroup and if it isn't an admin on THIS_SCRIPT == vbcms, then give them no permission. Something like that should work although I've never tried it.
Reply With Quote
  #3  
Old 12-16-2009, 03:58 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, that might work. I gotta figure out HOW to do it, but.... sounds like it would work. Instead of no permissions, I guess I could just forward them to the forums somehow? (I don't want them to see a no permissions anything)
Reply With Quote
  #4  
Old 12-16-2009, 04:35 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If they have no link to the page (since the tab is gone), then you shouldn't have to forward them because they really should never end up there in the first place.

Anyway, I plan on doing this on my site - having the CMS there only for the mods and admins so I can set it up after we go live with the upgrade - and that is how I plan on going about it.
Reply With Quote
  #5  
Old 12-16-2009, 05:01 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I have the tab removed unless you're an admin now.

Quote:
Originally Posted by Lynne View Post
If they have no link to the page (since the tab is gone), then you shouldn't have to forward them because they really should never end up there in the first place.
Not sure what you mean here?

By default when you goto the website the CMS page is loaded, right now the tab isn't there when I'm logged out, but I'm still on the main CMS "The Front Page". If I don't forward someone to the forums page, what would I do?

Sorry, I just don't get how the logic works. =)

How do I deny them permission? Maybe that's the part I'm missing? What I'd really like to do is just get them to the forums seamlessly.

I created a plugin as so:

Code:
if (THIS_SCRIPT == 'vbcms') {
  if (is_member_of($user,6) == true) {
    echo("<!-- Is admin! -- >");
  }
  else {
    echo("<!-- Is NOT admin! -- >");
  }
}
Which works fine I just don't know what to do on the NOT admin part of the condition.
Reply With Quote
  #6  
Old 12-16-2009, 01:36 PM
odonel odonel is offline
 
Join Date: Sep 2006
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why not redirect to forum.php Trek ??
Reply With Quote
  #7  
Old 12-16-2009, 03:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open your index.php page and change the lines to this:
PHP Code:
// Use the CMS as the default script
//require('content.php');

// Use the forum as the default script
require('forum.php'); 
That will make it so when users come to your index.php page, they are directed to the forums, not the cms.
Reply With Quote
  #8  
Old 12-16-2009, 03:35 PM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by odonel View Post
why not redirect to forum.php Trek ??
Wasn't sure how.

Quote:
Originally Posted by Lynne View Post
Open your index.php page and change the lines to this:
PHP Code:
// Use the CMS as the default script
//require('content.php');

// Use the forum as the default script
require('forum.php'); 
That will make it so when users come to your index.php page, they are directed to the forums, not the cms.
Thanks Lynne!
Reply With Quote
  #9  
Old 12-18-2009, 08:26 PM
Old-Git Old-Git is offline
 
Join Date: Dec 2009
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was going to ask this question myself... thanks guys!
Reply With Quote
  #10  
Old 12-23-2009, 09:31 PM
Old-Git Old-Git is offline
 
Join Date: Dec 2009
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

can you spell out for me how I should go about disabling the HOME button from the Nav Tab bar?
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 01:57 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.04283 seconds
  • Memory Usage 2,258KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete