News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

BBC: find user

Started by MarcoK, July 29, 2010, 07:04:28 AM

Previous topic - Next topic

MarcoK

I'm try to install a new bbc but it not work.

'tag' => 'soloper',
       'type' => 'unparsed_content',
        'content' => '$1',
        'validate' => create_function('&$tag, &$data, &$disabled, $user_info', 'if($user_info["is_guest"]==1){$data="Testo nascosto";}'),

My idea is that if user is guest, the text into [soloper] tag was hidden, or sostituted by a $data text.

Any ideas?

Tks!

mirahalo

try this one:

array('tag' => 'soloper',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, &$disabled',
'if($context[\'user\'][\'is_guest\'])
{$data="Testo nascosto";}'),
),

MarcoK

tanks. i have solved by calla global variable $user_info:

'tag' => 'soloper',
       'type' => 'unparsed_content',
        'content' => '$1',
        'validate' => create_function('&$tag, &$data, &$disabled, $user_info', '
        global $user_info
         if($user_info["is_guest"]==1){$data="Testo nascosto";}'
       ),

mirahalo

ok, marked as solved then :)

Advertisement: