vBulletin Modifications

Admin CP Access Outside Admin CP

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 07-09-2006, 08:52 AM   #1
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

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.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 07-10-2006, 05:22 AM   #2
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default hmmm...

what about just adding under the correct template thing like:
You must first be a registered member to view any code.
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" ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:25 AM   #3
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

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 05:31 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:29 AM   #4
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

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.

Last edited by Idan; 07-10-2006 at 05:33 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:31 AM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Thanks,

Do know which template it uses for the error message?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:39 AM   #6
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

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:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:43 AM   #7
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

ok so i'll stick that in php then
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 05:53 AM   #8
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

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:
You must first be a registered member to view any code.
or

You must first be a registered member to view any code.
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:
You must first be a registered member to view any code.
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):
You must first be a registered member to view any code.
__________________
Idan / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers

Last edited by Idan; 07-10-2006 at 06:01 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-10-2006, 02:31 PM   #9
Coder
gio~logist's Avatar
Join Date: Jul 2005
Location: Miami, Florida
gio~logist is on a distinguished road

Default

If you're using php, i think that what you guys want is the print_no_permission(); function.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

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


All times are GMT -3. The time now is 12:56 AM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)