Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » Support Center » vBulletin Support » Admin CP Access Outside Admin CP
Reply

 

  • Thread Tools
Old 07-09-2006, 11:52 AM   #1
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default Admin CP Access Outside Admin CP
Basically what i want to do is display a page only to people who can acess the admin cp otherwise it leaves and error message sayin gyou can't access this. Error message like this: when you try and reply to a post in the paid request section if your not a super mod or charter member.

Regards,
Nick.
Reply With Quote
Old 07-10-2006, 08:22 AM   #2
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default hmmm...
what about just adding under the correct template thing like:
Code:
<if condition="$show['admincplink']">
your normal page
<else />
$some_php_var_passed_from_php_code
</if>
and then just make the main php that shows it (showthread.php for example) to make this var do change in browser location so it would point unwanted visitor to some page like "sorry, no access" ?
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here
Reply With Quote
Old 07-10-2006, 08:25 AM   #3
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
Do know which template it uses for the error message? Is the $show['admincplink'] global?

Last edited by Nick R; 07-10-2006 at 08:31 AM.
Reply With Quote
Old 07-10-2006, 08:29 AM   #4
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
as far as i recall it's global for any template.
just 1 things needs to be checked is that var named is identical for both 3.0.x & 3.5.x since i know for 100% it's named like this in 3.0.xx, but not sure for 100% it same with the 3.5.x.
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here

Last edited by Idan; 07-10-2006 at 08:33 AM.
Reply With Quote
Old 07-10-2006, 08:31 AM   #5
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
Thanks,

Do know which template it uses for the error message?
Reply With Quote
Old 07-10-2006, 08:39 AM   #6
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
it has global error template all it needs is new phrase added.
just need to make new phrase for error, and then from php code sent to template using:
Code:
eval(print_standard_error('error_YourNewPhraseName'));
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here
Reply With Quote
Old 07-10-2006, 08:43 AM   #7
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
ok so i'll stick that in php then
PHP Code:
if ($show['admincplink'])
{

} else {
    eval(
print_standard_error('error_YourNewPhraseName'));
    exit;
} 
Reply With Quote
Old 07-10-2006, 08:53 AM   #8
Idan
Coder
Idan's Avatar

Activity Longevity
0/20 18/20
Today Posts
0/3 sssss1484
Location: Israel
Age: 29
Idan is on a distinguished road
Status: Offline Default
EDIT:
well..., sole check inside php always work, assuming thats unique php that belongs only for the page & not common for other pages
just needs to check which globar var state your admin status.
as well, this way you can even redirect him from php with no template with something like:
PHP Code:
$_REQUEST['forceredirect'] = 1;
$url = "index.php";
eval(
print_standard_redirect('redirect_you_are_taken_back_to_main_page_no_permission_phrase')); 
or

PHP Code:
eval(print_standard_error('error_YourNewPhraseName')); 
One thing though, is the $show['admincplink'] i mentioned is global for TEMPLATE, not sure u can use it inside php code as well...
i was thinking about something like:

1. add to the template that shows the correct page you want:
Code:
<IF condition="$show['admincplink']">
<else />
$some_dummy_var
</if>
2. now about next line, i'm not so sure, so it needs checking verify the synatx is indeed correct, as usually i use it with no var assign & for vars i did used assign, i was using it with with fetch_template() function.
anyway i was thinking about something like this (into php code that goes with that template):
PHP Code:
eval('$some_dummy_var .= "' . print_standard_error('error_YourNewPhraseName'). '";'); 
Regards,
Idan.

* Support will only be given via forums !
* If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here

Last edited by Idan; 07-10-2006 at 09:01 AM.
Reply With Quote
Old 07-10-2006, 05:31 PM   #9
gio~logist
Coder

gio~logist's Avatar

Activity Longevity
0/20 16/20
Today Posts
0/3 ssssss253
Location: Miami, Florida
gio~logist is on a distinguished road
Send a message via AIM to gio~logist
Status: Offline Default
If you're using php, i think that what you guys want is the print_no_permission(); function.
Reply With Quote

Reply

« Annoucements no longer showing? | Help edditing, got stuck »

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

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only admin and Mod forum !!! cyberman vBulletin Modification Requests 6 11-25-2006 08:36 AM



All times are GMT. The time now is 06:17 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!