The Arcive of vBulletin Modifications Site. |
|
links on forumhome if user is logged in??? Details »»
|
|||||||||||||||||||||||||
How can i set links which are stored in a template to be shown on forumhome if the user is logged in? If he is a guest or not looged in it should not be shown!
I made a template called forumhomelinks with that code: PHP Code:
PHP Code:
What do I have to change? Thanks in advance. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Where have you added that code, and did you add $forumhomelinks to youro forumhome template?
|
|
#3
|
||||
|
||||
|
hi Firefly,
i tried several things. I added that code to index.php, global.php, to template phpinclude. And i also added the variable $forumhomelinks to template forumhome_forumbit_level2_post ???? |
|
#4
|
||||
|
||||
|
Globalize $forumhomelinks in the makeforumbit() function.
|
|
#5
|
||||
|
||||
|
i added $forumhomelinks in forumdisplay.php to the global variables but it still doesn`t work. Can you tell exactly what i should do?
|
|
#6
|
||||
|
||||
|
Replace this:
Code:
function makeforumbit($forumid,$depth=1,$permissions='') {
global $DB_site,$bbuserinfo,$iforumcache,$ipermcache,$imodcache,$session,$accesscache,$usergroupdef,$noperms;
Code:
function makeforumbit($forumid,$depth=1,$permissions='') {
global $DB_site,$bbuserinfo,$iforumcache,$ipermcache,$imodcache,$session,$accesscache,$usergroupdef,$noperms[high],$forumhomelinks[/high];
|
|
#7
|
||||
|
||||
|
OK!
I did: 1) added the code from my first post to index.php 2) made a new template with the code from my first post and saved as forumhomelinks 3) added $forumhomelinks to template forumhome_forumbit_level2_post 4) added $forumhomelinks to forumdisplay.php at the place you wrote in the post above. i want to show the links in forumhome on the index page! What else can i do? |
|
#8
|
||||
|
||||
|
Please help :-) Thanks!
|
|
#9
|
||||
|
||||
|
hmm, try that:
put the code PHP Code:
PHP Code:
|
|
#10
|
||||
|
||||
|
Hi Xenon,
you're the best! :-) It works! Thaaaaaaaaannnnnkkkkkkssss! |
![]() |
|
|