![]() |
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? |
why not use an ifcondition in the postbit template?
HTML Code:
<if conditon="$post[userid] != 1 OR $bbuserinfo[userid] == 1">$value_template |
i had a feeling i was doing some major begginers mistake, thanks very very much Xenon, much appreciated!!
|
No prob, you're welcome :)
|
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:
|
never mind i got it :)
|
All times are GMT. The time now is 11:10 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|