The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show Mods And Admin on Non-vb PHP Page
I have a line on my home page that offers links to various parts of my site (i.e. Home, News, Links, Resource, Quizzes, etc.) but I would like to add a further section to the line (namely 'Admin') that will only appear in the list if one of the people browsing the page is either myself or one of the moderators from my forum.
How could I do this? |
#2
|
||||
|
||||
if it's a vB-powered page then you can use the is_member_of function() in a conditional
alternatively you can go old school with PHP Code:
|
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
then in that case check the session.php see if it defines the usergroup in the cookies and then use $_COOKIE['usergroupid']
alternatively you could include the vb-global.php just for that piece of code. |
#5
|
|||
|
|||
Quote:
vBulletin's structure is way beyond my understanding. What steps are necessary to do this? |
#6
|
||||
|
||||
chick this with marco or someone else that will come in this thread but
PHP Code:
|
#7
|
|||
|
|||
No you can NOT use unset on a file, only on a variable. (lol not a master coder myself )
Quote:
|
#8
|
|||
|
|||
Well, I messed around with an example page. Just used this:
PHP Code:
I got the following errors: Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/linguami/public_html/forum/global.php on line 18 Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/linguami/public_html/forum/global.php on line 18 Now what? |
#9
|
|||
|
|||
Change to:
PHP Code:
|
#10
|
|||
|
|||
Quote:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|