News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Hide Signatures from Guests

Started by Suki, March 04, 2010, 11:01:45 PM

Previous topic - Next topic

Suki

This mod is now updated for SMF 2.0 and 1.1.x
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

antoniosaucedo

This mod is great! 

Can I change to "Hide Signatures from regular members"  because I'm using your mod: Hide Topics from Guests and then I not need hide signatures from Guests  ;)

Thank you

Suki

do you want to hide the signatures from all your users?  or for certain user groups only?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

antoniosaucedo

Thanks.

Actually I want to separate in to categories

Suscription members (Miembro Gold)     and   free members  (regular users)

Administrator       
Global Moderator      
Moderador      
Colaborador      
Miembro Gold      

Post count based groups (regular users)
Nuevo      1953   
10 mm      70   
18 mm      78   
24 mm      88   
35 mm      41
50 mm      33
85 mm      27
100 mm      9   
135 mm      8   
200 mm      6   



I don't want  the free members (regular users and Post count based groups) can see the signatures, only the Suscription members (Miembro Gold)

Thanks

Suki

you will need the ID of those user groups who cannot see the signature then do an array:

$groups = array(1,2,3,4,5);

global $user_info;   
      if (in_array($user_info['groups'][0], $groups) || in_array($user_info['groups'][1], $groups))      
      $profile['signature'] = '';



where 1,2,3,4,5  are the group IDs you don't want to show the signature to.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

antoniosaucedo

Thanks for answer:

The Post count based groups (regular users) are:  4,6,7,8,9,10,12,13,14,19

I supposed that I do something wrong because didn't work

I paste the following between:

// Hide signature from guest and groups mod

::::::::::::::::::::::::::::::::::::

$groups = array(4,6,7,8,9,10,12,13,14,19);

global $user_info;   
      if (in_array($user_info['groups'][0], $groups) || in_array($user_info['groups'][1], $groups))     
      $profile['signature'] = '';

::::::::::::::::::::::::::::::::::::

// Set things up to be used before hand.]]></add>

But now anyone can see the signatures.

Suki

did you do the file edit on Sources/Load.php ?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Douglas

In theory, this should also work for SMF 2.1, though you can now achieve this via membergroup permissions as well, I believe.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* HBCUAC.org Web Developer, the NAIA's only HBCU Athletic Conference
* Former Sports Photographer and Media Personality and Former CFB Historian
* Tech Admin for one 2.9M+ post and one 11.6M+ post sites. Used to own a 1M+ post site.
* WordPress Developer (Junkie / Guru / Maven / whatever)

Suki

Thank you for letting me know, will keep this mod compatibility with 2.0 only.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: