The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Showthread.php $post[userid]...
This is a little bit of a cry for help, so please feel free to move it to the approriate forum because i couldnt find one except this...
I have a hack that displays a stat on the posbit/postbit_legacy.. lets call it valueable_posts Well this is my problem. I am an admin, i dont want people (including myself) to see what valueable_posts i have or havnt got (coz the value is almost always 0 for the whole admin team :nervous: ) I tried to use the following code PHP Code:
I did a simple "echo $post[userid]" before my if statement, and it showed up correctly at the top of the page. I then put in another "echo $post[userid]" statement during the if statement and for some unknown reason, the results always came back as '1'..no matter what user logged in. Could you please help me as to how i can acheive my goal? |
#2
|
||||
|
||||
why not use an ifcondition in the postbit template?
HTML Code:
<if conditon="$post[userid] != 1 OR $bbuserinfo[userid] == 1">$value_template
|
#3
|
||||
|
||||
i had a feeling i was doing some major begginers mistake, thanks very very much Xenon, much appreciated!!
|
#4
|
||||
|
||||
No prob, you're welcome
|
#5
|
||||
|
||||
Sorry to bother you again, but only one more thing i need some help with...
I want to be able to enable/disable all my hacks, especially this one, so i made a table called hack_enabled with the hackname and a tinyint where 0 = off and 1 = on..i copied some code from forum.php and just modded it to my needs, but i dont know how to get PHP to read the value's of the Yes/No and change them into 1 for yes and 0 for no... Any ideas on this code, or even if you got an easier way of doing it, just like you had the templates.. PHP Code:
|
#6
|
||||
|
||||
never mind i got it
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|