The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
hide code
ok i tried and failed badly at making a code to hide text from guests
i run rc2 i tried this if(preg_match([hideg], $this->post['message'])) { $this->post['message'] = preg_replace([hideg], '<if condition="$bbuserinfo['usergroupid'] != in_array($bbuserinfo[usergroupid],array(1))"> '$this->post['message']); } just gave me a lot of errors at the start any ideas i want to have the code [hideg][/hideg] i tried with a bbcode but it just didnt work :ermm: |
#2
|
||||
|
||||
Try this (untested)
bbcode_create PHP Code:
|
#3
|
|||
|
|||
so i just change ['userid'] to ['1']
to hide from guests? |
#4
|
||||
|
||||
Change nothing.
|
#5
|
|||
|
|||
HTML Code:
$this->tag_list['no_option']['hidea']['callback'] = 'handle_external'; $this->tag_list['no_option']['hidea']['external_callback'] = 'handle_bbcode_hidea'; $this->tag_list['no_option']['hidea']['strip_empty'] = true; if (!function_exists('handle_bbcode_hidea')) { function handle_bbcode_hideg(&$parser, $text) { $parser->options['cachable'] = false; if (!$parser->registry->userinfo->usergroup['6']) { return $text; } return ''; } } ps the hide from guests worked perfectly thanks |
#6
|
||||
|
||||
is this for vb 3.5 RC2.or am i missing some thing? we tried this but it did not work??
|
#7
|
|||
|
|||
rc2 put it in plugins under bbcode_create
i want to see does it work im not trying lol i lost my test board yesterday due to a bad code i made |
#8
|
||||
|
||||
it worked........me and my friend SEZ just tried it...on a test forum and its like a charm .............its a very easy hide link for unregisterd .....many thanks 2shae and kirbyDE......
|
#9
|
|||
|
|||
the one i did should only show to admins 8-|
|
#10
|
||||
|
||||
no what we did is exactly as kidrbyDE wrote...and its ONLY for unrigesterd members....
and it works great.. @kirbyDE.........from all the hide links we tried ....non worked..because the old ones used files NOT available in VB 3.5 RC2 why dont you releas this as an new hack.....for it..and if you can add to it so that it shows links visible for registerd user......phrase to appeare ....it would be a complet hide link from unrigestered.. i really would like this one to be added to your name KirbyDE rgds |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|