The Arcive of vBulletin Modifications Site. |
|
Admin text Hack all vb2 Details »»
|
|||||||||||||||||||||||||
ok this hack added new bbcode
for exsample if some user want to say something only that only admins will see then he do [admin] what he want to say [/admin] and "what he want to say" will be viewable only for admins so lets start : open admin/functions.php find : PHP Code:
PHP Code:
PHP Code:
PHP Code:
open root/newreply.php Find : PHP Code:
PHP Code:
Enjoy. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Interesting!
I could use that! Cool ![]() So if i wanted to add supermoderators or another usergroup i just change this: if ($bbuserinfo['usergroupid']!=6) { to this?: if ($bbuserinfo['usergroupid']!=5 AND $bbuserinfo['usergroupid']!=6 AND $bbuserinfo['usergroupid']!=7) { |
|
#3
|
|||
|
|||
|
if (($bbuserinfo['usergroupid']!=5) or ($bbuserinfo['usergroupid']!=6) or ($bbuserinfo['usergroupid']!=7)) {
this is the right syntex i dont think some1 can be in 3 usergroups
|
|
#4
|
||||
|
||||
|
Hmm thanks, but that doesn't work for me, ackwardly enough, mine does though :-)
--------------------------------------------------------- function admin($admintext) { global $post, $bbuserinfo, $DB_site; if ($bbuserinfo['usergroupid']!=5 AND $bbuserinfo['usergroupid']!=6 AND $bbuserinfo['usergroupid']!=7) { $adminktext=""; } return "$admintext"; } --------------------------------------------------------- If i am not mistaken (i could be though) the script above means (simply said): If user is NOT in groupid 5 and NOT in group id 6 and NOT in group id 7 show nothing, if he is, show admin text. Forgive me i am trying to learn PHP abit, and i hope i doing ok ![]() And i have another question, how do you design the $admintext? Can i use stylesheet for that? If i try this, it will show the div class box for people that aren't allow to see it. return "<div class=\"admtxt\">$talktext</div>"; Thanks again! /Aaron - |
|
#5
|
|||
|
|||
|
AND is not the correct syntax but it will work (I guess)
Use && instead of AND, but if it works for you, good Dimitry |
|
#6
|
|||
|
|||
|
admin text is not desgined its return it as normal text like all other threads text
if u want to desgin its throw the templte engine u can call to admin text car with gettemplte engine and 1 more thing when u past parts of code please use the php tags so unlincened users wont be able to see parts of code thanx |
|
#7
|
||||
|
||||
|
Sorry Miz, you are right, i forgot about it!
Can you take a look if i am close on using a template for this? I already created a special template with the $admintext in it. But not sure about the code in functions.php I attached the code this time :-) |
|
#8
|
|||
|
|||
|
nop
u ++++ed up the text hehe its get the admin text any way change it to be like that PHP Code:
|
|
#9
|
||||
|
||||
|
Woohaa! To cool, that worked Miz! :-)
Thanks for the help! Appreciated! |
|
#10
|
|||
|
|||
|
np, if u liked this hack please press the install button ;]
|
![]() |
|
|