Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Signature Limit Mod
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Fixxxer
Starting Member

10 Posts

Posted - 08 November 2004 :  00:43:53  Show Profile
I have been looking for a mod that will limit signatures to a specified number of characters. Anyone know of one?

laser
Advanced Member

Australia
3859 Posts

Posted - 08 November 2004 :  06:59:05  Show Profile
I haven't done it, but you could just use a Left function when displaying the sig. There would be 2 places in topic.asp you would need to apply the change to.
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 08 November 2004 :  09:40:53  Show Profile  Visit rasure's Homepage
I did something similar to limit the characters when people were
adding links you could apply the same method. Basically what it does
is limit how many characters people can use in their sigs or other
text area boxes if you want and also prevents people from copy and
pasting in extra characters, if they do then it will trim it down to
the max character limit when the mouse lifted from the text area.

In inc_header.asp before the includes put this...
Response.Write "<script language=""JavaScript"" type=""text/JavaScript"">" & vbNewLine
Response.Write "function limitText(textArea, length) {" & vbNewLine
Response.Write " if (textArea.value.length > length) {" & vbNewLine
Response.Write " textArea.value = textArea.value.substr(0,length);" & vbNewLine
Response.Write " }" & vbNewLine
Response.Write "}" & vbNewLine
Response.Write "</script>"

The in inc_profile.asp find and change this...
<td bgColor=""" & strPopUpTableColor & """><textarea name=""Sig"" cols=""25"" rows=""4"">" & Trim(cleancode(strTxtSig)) & "</textarea></td>" & vbNewLine & _

to this...
<td bgColor=""" & strPopUpTableColor & """><textarea name=""Sig"" cols=""25"" rows=""4"" onKeyPress=""limitText(this,499);"" onBlur=""limitText(this,499);"">" & Trim(cleancode(strTxtSig)) & "</textarea></td>" & vbNewLine & _

change the numbers in green to the number of characters you want to allow.

Psychic & Spiritual Development Resources

Edited by - rasure on 08 November 2004 19:01:40
Go to Top of Page

Fixxxer
Starting Member

10 Posts

Posted - 08 November 2004 :  18:06:49  Show Profile
Thanks for the help. I will give it a try.
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 27 December 2004 :  10:09:50  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
Seems like it's working, thanks alot! =)

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 27 December 2004 :  12:56:56  Show Profile  Visit dayve's Homepage
I took a rather drastic step recently because I was getting tired of the large signatures. Most of the time it was only signatures with images, but there are those with text signatures (and many carriage returns) that have large signatures. So my approach was to encapsulate the signature area within a layer and forced a height attribute as well as an overflow attribute. The result was pretty good in my opinion because the signature areas were set to a fixed size and anyone that went over the limit I set had their signature cut off. When they saw their signature cut off, they adjusted it accordingly so it made for a very good experience for all my users. The exact layer structure I used was...
<div style="height:75px; overflow:hidden;"> ... signature area ... </div>

This is done in two areas of topic.asp where the signature code resides.


Edited by - dayve on 27 December 2004 12:58:03
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 27 December 2004 :  18:44:45  Show Profile  Visit muzishun's Homepage
I think I'll be applying this to my own forum as well, combining both methods. That way, both text and picture sigs will be limited. If there's interest, I may even make a MOD of it. Add a table to the database to hold the height and character limits and make an Admin interface. Maybe put a box in the pop_profile.asp page that ticks off how many characters are remaining when making your profile.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 28 December 2004 :  04:59:20  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
muzishun: That would be great =)
I don't have many users with pictures in their signatures, but I guess I'll have soon as everyone else has them..

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 28 December 2004 :  07:27:51  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
Active inforcment of sig rules does the trick on our forum. I give all our mods access to this code to remove images from folks sigs as and when they see them.

link

I've modded the original as per my posts in the above thread and I've also added on code to allow only one sig to be displayed and updated at a time (saves having to load all images in the admin page.
Go to Top of Page

FraserM
Starting Member

6 Posts

Posted - 08 February 2005 :  11:03:30  Show Profile  Visit FraserM's Homepage
quote:
Originally posted by dayve

<div style="height:75px; overflow:hidden;"> ... signature area ... </div>

This is done in two areas of topic.asp where the signature code resides.



Dayve / All,

I`ve not been able to find out where you put this code ... I can't find exactly where the SIG gets inserted.. all I can see is where the Content + Sig are written to the page in one big block.

Any hints on where this code should go?

Thanks!
Fraser
Go to Top of Page

Bassman
Junior Member

Netherlands
256 Posts

Posted - 09 February 2005 :  04:10:04  Show Profile  Visit Bassman's Homepage
quote:
FraserM: I`ve not been able to find out where you put this code



Open topic.asp

Around line 698 you find this:

"<td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Reply_MemberSig) & "</span></font></td>" & vbNewLine & _


Replace it with this:

"<td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><div style=""height:75px; overflow:hidden;""><span class=""spnMessageText"">" & formatStr(Reply_MemberSig) & "</span></div></font></td>" & vbNewLine & _


Around line 902 look for this:

"<td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><span class=""spnMessageText"">" & formatStr(Topic_MemberSig) & "</span></font></td>" & vbNewLine & _


And replace it with this:

"<td valign=""bottom""><hr noshade size=""" & strFooterFontSize & """><font color=""" & strForumFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><div style=""height:75px; overflow:hidden;""><span class=""spnMessageText"">" & formatStr(Topic_MemberSig) & "</span></div></font></td>" & vbNewLine & _



Change green px size to fit your needs in the forum.
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 09 February 2005 :  10:52:44  Show Profile
Here's a JS way to prevent them from entering more than a specified ammount of chars.

<script>
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</script>
<textarea name="Sig" cols="60" rows="6" onKeyDown="textCounter(this.form.Sig,this.form.remLen,125);" onKeyUp="textCounter(this.form.Sig,this.form.remLen,125);">
Sig from DB goes here.
</textarea>
<input readonly type="text" name="remLen" size="3" maxlength="3" value="125"> characters left

KawiForums.com


Go to Top of Page

FraserM
Starting Member

6 Posts

Posted - 11 February 2005 :  04:17:26  Show Profile  Visit FraserM's Homepage
[quote]Originally posted by Bassman

Open topic.asp

Bassman - thanks - but I had already tried this. It seemed that the section of code never got read, because the Topic_MemberSig variable was always empty!

I just had a look in the Admin Config though, and have now learnt that Snitz has a "Dynamic Signatures" option which we have turned off for some reason! I assume this is why I always see the posting / signature read as one big block, and the actual signature field as being empty
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 11 February 2005 :  08:28:00  Show Profile
quote:
Originally posted by dayve

I took a rather drastic step recently because I was getting tired of the large signatures. Most of the time it was only signatures with images, but there are those with text signatures (and many carriage returns) that have large signatures. So my approach was to encapsulate the signature area within a layer and forced a height attribute as well as an overflow attribute. The result was pretty good in my opinion because the signature areas were set to a fixed size and anyone that went over the limit I set had their signature cut off. When they saw their signature cut off, they adjusted it accordingly so it made for a very good experience for all my users. The exact layer structure I used was...
<div style="height:75px; overflow:hidden;"> ... signature area ... </div>

This is done in two areas of topic.asp where the signature code resides.


I did install this on my forum, but then it forces EVERY sig to 75px. Is there a way where a 1 line sig only uses 1 line, but a member with a 100 line sig gets chopped off at the 75px limit ?

Basically I need something that can resize lower and use less real estate, but will use a maximumsize of 75px.
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 17 February 2005 :  06:30:33  Show Profile
quote:
Is there a way where a 1 line sig only uses 1 line, but a member with a 100 line sig gets chopped off at the 75px limit ?



*BUMP*
Go to Top of Page

rasure
Junior Member

289 Posts

Posted - 22 February 2005 :  20:04:43  Show Profile  Visit rasure's Homepage
I would find this useful too

Psychic & Spiritual Development Resources
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07