vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Disable CMS, but only for users, not admins (https://vborg.vbsupport.ru/showthread.php?t=230296)

Trek 12-16-2009 03:19 AM

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?

Lynne 12-16-2009 03:28 AM

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.

Trek 12-16-2009 03:58 AM

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)

Lynne 12-16-2009 04:35 AM

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.

Trek 12-16-2009 05:01 AM

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

Quote:

Originally Posted by Lynne (Post 1931523)
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.

odonel 12-16-2009 01:36 PM

why not redirect to forum.php Trek ??

Lynne 12-16-2009 03:04 PM

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.

Trek 12-16-2009 03:35 PM

Quote:

Originally Posted by odonel (Post 1931661)
why not redirect to forum.php Trek ??

Wasn't sure how. :o

Quote:

Originally Posted by Lynne (Post 1931701)
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!

Old-Git 12-18-2009 08:26 PM

I was going to ask this question myself... thanks guys!

Old-Git 12-23-2009 09:31 PM

Lynne,

can you spell out for me how I should go about disabling the HOME button from the Nav Tab bar?


All times are GMT. The time now is 07:11 PM.

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.01177 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete