Hide Signatures from Guests

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

Previous topic - Next topic

Suki

Hide Signatures from Guests





Written by: Miss All sunday
Current version: 2.0
Suitable for: SMF 1.1.x, SMF 2.0 x

Link to Mod





Summary

Hide Signatures from Guests hides all signatures from guests. Members still see signatures.

Installation

Just install the mod with the packager manage, no settings, no text strings, just install and enjoy ^^

Support

Questions should be address to the mod support topic.



Changelog

1.0 - 26 January 2011
-The mod is now source edit only, it will work with all themes.

1.0 - 22 January 2010
First release of Hide Signatures from Guests

Files modified by Hide Signatures from Guests
./Sources/Load.php
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Arantor

Well done, you managed to make this a theme edit, so extra support requests, as well as breaking the "Hide signatures" option in look and layout.

Better solution would have been to put this in Load.php where the signature is parsed.

Find:
// Set things up to be used before hand.

Add Before:
global $user_info;
if (empty($user_info['id']))
$profile['signature'] = '';


Plus this gives you a performance boost since you're not calling the behemoth that is parse_bbc with data it doesn't have to actually parse. It's even the same edit in both versions, too.
Holder of controversial views, all of which my own.


altdot

This didn't work for my forum (running 1.1.11). However, this did:

   if ($user_info['is_guest'])
      $profile['signature'] = '';


Is there any reason not to code it that way?

Arantor

Depends where you're doing it.

There's no major reason why not - just depends on making sure you call it in the right place.
Holder of controversial views, all of which my own.


altdot

Ah-- I did it where you recommended, in Load.php. global $user_info; was already defined and populated at that point. I'm not sure why checking empty($user_info['id']) didn't work, unless the id is 0 instead of empty for guests, which it looked like might be the case.

Arantor

id is 0 for guests, or empty, either way empty() on the id should have worked, since empty checks for not defined/0/'0'/''/array()
Holder of controversial views, all of which my own.


altdot

Weird. I don't know why it didn't work, then. No matter, the code's working fine now. Thanks!

Cal O'Shaw

Any chance this can be given the extra ability to disable the display of signatures for selected membergroups? We have a few people who we'd rather they could not create signatures, or if they create them, no one sees them (effectively the same result).

Grazie,

Cal

Suki

Hi, I just recently got this mod,  this can be done however, theres already another mod that does what you want.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cal O'Shaw

I'm running 1.1.12.  Could you point me to that MOD (I searched on "signature" and the closest was one limiting links but I want to prevent a class of members from being able to display signatures).

Grazie!

Suki

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Cal O'Shaw

Grazie.  I posted asking if the author would consider 1.1.12, but I'm not counting on him doing so.

Any chance your MOD could provide a way to add to the logic "if membergroup X don't display signature to anyone" when you check if the viewer is a guest?  If you already read from the AdminCP to see if the MOD is enabled, perhaps add a field asking for the membergroup number? (Trying to suggest as easy a way as possible to implement).

I appreciate your help.  Grazie mille!

Cal

Suki

I'll see about it, my goal for now is to make this mod sources edit only so it can work with every theme.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

MaXiForum.cz


Suki

this mod is now updated, will work with 2.0 Rc4 or 1.1.x,  no theme edits.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

odtukmt

Mod link returns to SMF community website homepage, is there a problem about the modification?

Matthew K.

No...it's just the link was not setup. Click [Here].
Quote from: odtukmt on February 05, 2011, 11:16:54 AM
Mod link returns to SMF community website homepage, is there a problem about the modification?

odtukmt

Quote from: Labradoodle-360 on February 05, 2011, 11:48:55 AM
No...it's just the link was not setup. Click [Here].
Quote from: odtukmt on February 05, 2011, 11:16:54 AM
Mod link returns to SMF community website homepage, is there a problem about the modification?


Thank you so much :)

Matthew K.

Not a problem.
Quote from: odtukmt on February 05, 2011, 01:32:50 PM
Quote from: Labradoodle-360 on February 05, 2011, 11:48:55 AM
No...it's just the link was not setup. Click [Here].
Quote from: odtukmt on February 05, 2011, 11:16:54 AM
Mod link returns to SMF community website homepage, is there a problem about the modification?


Thank you so much :)

Suki

Quote from: odtukmt on February 05, 2011, 11:16:54 AM
Mod link returns to SMF community website homepage, is there a problem about the modification?

I fixed it.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: