![]() |
Link questions
Is it possible to put a link on the menu only visible to admins?
Such as a link to the administration area. |
RE: Link questions
Users you are not authorized to access the admin area with get an error if they click on the admin link so it really can be placed anywhere
|
RE: Link questions
Yes there is go to your functions.php page and in your sidebar function place this(right before the $sidebar = "):
PHP Code:
PHP Code:
|
RE: Link questions
@ Seapyramid. I know they can't access it, and that's not the issue, I'd just like that button to not even be there for them, as it might lead to confusion.
@Bloodrun. That gave me the white screen of death. :/ PHP Code:
|
RE: Link questions
Quote:
You didn't end the &sidebar correctly the ".$admin." goes within the ($sidebar = " ";) |
RE: Link questions
So $sidebar = "<b><u>$admin."
??? |
RE: Link questions
Quote:
PHP Code:
|
RE: Link questions
Thank you, works great now.
|
RE: Link questions
Quote:
|
RE: Link questions
I searched the Forums and this was the most relevant topic I could find so I am posting this here.
I am trying to create links in the links bar that are only visible to users when logged in. First I commented out this so that it wouldn't pull links from the database. PHP Code:
PHP Code:
PHP Code:
|
RE: Link questions
The second and third pieces of code you have, what files are you placing these in? If you're placing it in the getlinks function in functions.php you might have to call the logincheck() function before using the code, such as this:
PHP Code:
Brandon |
RE: Link questions
That worked, thanks Brandon!
|
All times are GMT -5. The time now is 08:32 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.