The Arcive of vBulletin Modifications Site. |
|
![]() |
|||||||||||||||||||||||||
Insert this into phpinclude template:
Code:
// hide feature from unregistered if ($bbuserinfo['userid']<"1") { $unregopen = "<!-- "; } else { $unregopen = ""; } // hide feature from unregistered // hide feature from unregistered if ($bbuserinfo['userid']<"1") { $unregclose = " -->"; } else { $unregclose = ""; } // hide feature from unregistered $unregopen before it and $unregclose after it. This is someone elses hack to show the register button to guests and the cp button to members, but i changed it for this, I feel quietly pleased with myself. ![]() Show Your Support
|
Comments |
#2
|
||||
|
||||
![]()
Just noticed too, by doing it this way I'm getting:
Logged in as me: (11.37% PHP - 88.63% MySQL) with 35 queries. Logged Out: (9.99% PHP - 90.01% MySQL) with 28 queries. I was actually worried I'd add some time too but, nope. ![]() |
#3
|
|||
|
|||
![]() PHP Code:
It doesnt work!!! ![]() everybody means: it must work, but it doesnt! for exemple: in phpinclude-template I wrote: $test = "hallo"; in postbit-template I use the variable $test, but nothing happend (empty)!!! what do I wrong??? please help... thxxxx greez sven |
#4
|
||||
|
||||
![]()
ProgS - you do not put anything of your own into the phpinclude template - you put the code exactly as Tim has posted in the first post.
Then, in any template, like he said, if you don't want something to show up for an unregistered user, you comment it out with HTML using the function that you have just pasted by adding the commenting out tags. Read his first post carefully - he explains it quite well. Good idea Tim. You can make this into a hack, by placing the same code in global.php. ![]() |
#5
|
|||
|
|||
![]()
@Erwin
you havent understand what I mean!!! ![]() but in the other thread of me I got the answer for my problem! I had exactly this script included like in the first post! I can use this variables in the header-template, okay... but NOT in the postbit-template!!! I dont know why, but it is so... but thank you for your answer!!! ![]() |
#6
|
||||
|
||||
![]()
I've tested it and you're right ProgS.
You can't use the variables defined in phpinclude in the postbit template.... think i have to take a look why it's so as it is ![]() |
#7
|
||||
|
||||
![]()
this is the code i use in my phpinclude:
Code:
// Make feature just show for logged ins // And code just for unregistred users if ($bbuserinfo['userid']<1) { $justloggedinopen = "<!-- "; $justloggedinclose = " -->"; $justunregopen = ""; $justunregclose = ""; } else { $justloggedinopen = ""; $justloggedinclose = ""; $justunregopen = "<!-- "; $justunregclose = " -->"; } it think it has something to do with the repeating... i hope i'll find out ![]() |
#8
|
|||
|
|||
![]() Quote:
nice to see that somebody understand me!!! ![]() ![]() I still spend to much time for this prob... I hope in version 3 it is solved, and then the pics an links are only to see if the user has the permissions for it.... ![]() |
#9
|
||||
|
||||
![]()
damn, it's so obvious...
think i have had to less time yesterday when trying this out. the postbit template is parsed within the getpostbit-FUNCTION so all variables which are not global would be nulled. so in your admin/functions.php in getpostbit section you have to add PHP Code:
PHP Code:
|
#10
|
|||
|
|||
![]()
great idea, i can also see how a slight modification of this hack would assist in creating a usergroup with limited features.
for instance, i have a user on my board that insists on using a post icon designated for mature/adult type posts only and does so on every one of his posts out of context despite being asked not to repeatedly. i don't want to ban him but with a mod of this hack, i can remove the post icon section entirely from his view, plus other features like smilies and any other features that are abused. i have yet to install this hack but i will try tonight. last night i tried and fubared my functions.php file (don't ask) but i was not at my own computer with all my backup files like i will be tonight. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|