Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Can Signatures Have A Character Limit?
Avatar
Matthew Selznick
Long Beach, California, USA
Member
Free Members
sp_UserOfflineSmall Offline
Oct 1, 2012 - 11:03 pm

Forgive me if I just can't find this setting, but is it possible to limit signatures to a set number of characters? All I can see is the image setting for signatures.

Many thanks,

Matt

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 1, 2012 - 11:39 pm

Not directly via option, but we do provide filters that allow you to filter the content and set such a limit.

If familiar with filters (they are standard to wp) let us know and we can show you.

On road until Wed so won't be before then.

Avatar
Matthew Selznick
Long Beach, California, USA
Member
Free Members
sp_UserOfflineSmall Offline
Oct 2, 2012 - 1:04 pm

Mr Papa said
If familiar with filters (they are standard to wp) let us know and we can show you.

That would be great. I'll do some due diligence in the mean time, but I'm guessing I'll need the help!

Thanks much.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2012 - 6:37 pm

so the filter you want would be:

sph_display_signature_filter

so something like this in your spFunctions.php file of your theme (use your own, not ours):

add_filter('sph_display_signature_filter', 'my_sig_filter');
function my_sig_filter($content) {
    // add your code to limit words or chars here
}

so its up to you how you might limit the character count.. lots of stuff on the net... or you could use the wp function for limiting the word count wp_trim_words() (http://codex.wordpress.org/Fun.....trim_words)...  but lots of help on google for other various methods...

Avatar
Matthew Selznick
Long Beach, California, USA
Member
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2012 - 6:51 pm

Thanks! I'll give it a gander.

Any thought to offering this feature in a future update?

Thanks again!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2012 - 7:08 pm

we can certainly consider it...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online: robrtg
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625