vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Dealing with long signatures (https://vborg.vbsupport.ru/showthread.php?t=67896)

Spinball 08-01-2004 10:00 PM

Dealing with long signatures
 
Hi Folks,
I don't know if you consider SQL tips as hacks, but if so then please accept the following for vB 3.x.
We have a problem on our forum with people putting in rediculously long signatures. Some of these look ok, though, as the occasional responsible people are using only a few carriage returns and make use of the [size] tag to make their signature text smaller.

This SQL script is very simple but for people not accustomed to SQL, it might be useful. It doesn't deal with carriage returns (yet) but does deal with otherwise lengthy signatures by wrapping a size tag round them but ONLY if the user hasn't used a size tag already :

PHP Code:

update usertextfield set signature concat('[size=1]',signature,'[/size]'where signature not like '%[size%' and length(signature) > 100

This only changes signatures containing over 100 characters. Obviously you can change the 100 to any figure. Some of our members have signatures over 400 characters in size. At least if the text is small it doesn't take up a whole page.

Logician 08-02-2004 12:32 PM

I think you haven't noticed the vb option "Maximum Length of Signature" in your admin cp? ;)

zajako 08-02-2004 07:49 PM

this doesnt help with people having large, or many images in signitures though :/ doesnt help me much, but thanks :)

drumsy 08-02-2004 09:03 PM

Hmmm, so if I wanted to limit font size in signatures, I could use this query by changing 100 to 1? Would I run this query via the AdminCP?

Spinball 08-02-2004 09:22 PM

Quote:

Originally Posted by Logician
I think you haven't noticed the vb option "Maximum Length of Signature" in your admin cp? ;)

Well no, actually I had overlooked that. It was set to 500 and I've dropped it to 100. Still for existing users it's useful. And for people with forums where they want people to have lengthier sigs.
Quote:

Originally Posted by drumsy
Hmmm, so if I wanted to limit font size in signatures, I could use this query by changing 100 to 1? Would I run this query via the AdminCP?

Well putting the size tag around all signatures will make them longer by 14 characters. So there's little point in doing it on sigs below, say, 30 characters.
I have never run queries in the admnicp since I use phpmyadmin but I guess you could.
Definitely backup your usertextfield table first.

Logikos 08-06-2004 05:59 AM

I find this more useful, its what i use on my forums. Cuts long sigs out.

HTML Code:

<div style="width: 500px; height: 135px; overflow: hidden;">
                                $post[signature]
</div>


Spinball 09-25-2004 07:02 AM

Can you please indicate where you put this?
I tried it in postbit here :
HTML Code:

                <!-- sig -->
                        <div style="width: 500px; height: 50px; overflow: hidden;">
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->

and it didn't make the slightest bit of difference.

Logikos 09-25-2004 09:18 AM

In your postbit, or postbit_legacy find:
HTML Code:

                <if condition="$post['signature']">
                <!-- sig -->
                        <div>
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->
                </if>

And replace with:
HTML Code:


                <if condition="$post['signature']">
                <!-- sig -->
                        <div>
                                __________________<br />
<div style="width: 500px; height: 135px; overflow: hidden;">
                                $post[signature]
</div>
                        </div>
                <!-- / sig -->
                </if>

Then test it. Change the width and height to your convience.

Abe Babe 10-10-2004 03:55 PM

I've been trying to get the div overflow method working for many months now ... both now that one of my forums is on vBulletin and before when it was on Invisionboard.

The problem I find is that it works with Mozilla/Firefox, but not with IE. If there were a way to get it working with both browsers, it would be great. Most users still stick with IE, so they are the ones you want to have it working for. And my mods keep moaning about signature problems, I don't even want anything complex to limit them, just something simple like that would be ideal.

Abe Babe...

Logikos 10-10-2004 05:28 PM

Quote:

Originally Posted by Abe Babe
I've been trying to get the div overflow method working for many months now ... both now that one of my forums is on vBulletin and before when it was on Invisionboard.

The problem I find is that it works with Mozilla/Firefox, but not with IE. If there were a way to get it working with both browsers, it would be great. Most users still stick with IE, so they are the ones you want to have it working for. And my mods keep moaning about signature problems, I don't even want anything complex to limit them, just something simple like that would be ideal.

Abe Babe...

I don't understand. whats the problem? I've been using this https://vborg.vbsupport.ru/showpost....36&postcount=8 at www.vbhacks.us and it works on all browsers and with no problems.

Abe Babe 10-11-2004 09:31 AM

I finally got it working, I typed my post too soon ... but I tried again with your code and it worked fine. I compared it to the other code I had come across elsewhere and they were missing the px [just had the numeric value]. I guess Mozilla can recognize that and IE cannot. I should have picked that up myself, but I always get frustrated with CSS and miss the little things. Thanks for your help! :)

Abe Babe...

Erwin 10-11-2004 12:12 PM

Mmm... strictly speaking... this is not a hack at all. :)

Logikos 10-11-2004 08:40 PM

Nope its a template mod. I posted this ay vBt a long time ago. Back in the vB2 days.

Reverend 10-15-2004 11:15 PM

Thanks for the postbit mod Live Wire.Works a treat.

Is there anyway to apply this to the User CP and the profile page. Its a bit confusing for some of our members when their "oversized" sigs are displayed in full in their User CP,and profile pages,but are then chopped in the postbit.

Logikos 10-16-2004 02:21 AM

You would just edit the appropeaite template and add the same thing where you find the signature variable.

Michael Morris 10-16-2004 03:09 PM

Another approach is to let the users decide what's too long and what's not

https://vborg.vbsupport.ru/showthread.php?t=69897

bejetta wrote the vb2 original hack and I transposed it to vb3. The vb3 install file includes the text of the original hack.

Spinball 10-16-2004 08:22 PM

Quote:

Originally Posted by Live Wire
I find this more useful, its what i use on my forums. Cuts long sigs out.

HTML Code:

<div style="width: 500px; height: 135px; overflow: hidden;">
                                $post[signature]
</div>


While this is an elegant solution, by fixing the size of signatures, for people with shorter signatures, it is counter productive because it unnecessarily uses up screen space.
I tried it and decided not to keep it.
What we need is a way to truncate the signature only if it's bigger than 500x50 or so pixels.

Logikos 10-18-2004 02:09 AM

Quote:

Originally Posted by Spinball
While this is an elegant solution, by fixing the size of signatures, for people with shorter signatures, it is counter productive because it unnecessarily uses up screen space.
I tried it and decided not to keep it.
What we need is a way to truncate the signature only if it's bigger than 500x50 or so pixels.

If there is no signature, there will be no unused screen space.

Spinball 10-18-2004 05:31 AM

Quote:

Originally Posted by Live Wire
If there is no signature, there will be no unused screen space.

Yes, but if people respond to my request to keeps sigs short, and create sigs like mine at http://www.avforums.com/forums/showt...50#post1224350 then there wil be.

skinny 02-07-2005 11:43 PM

Yes, I have introduced this on my forum. I guess as has been mentioned, the only problem is that say for instance, I have a max height of 500px, yet some members only have small sigs, there will be quite a bit of blank space underneath their sigs.

mtha 09-08-2005 10:05 AM

Quote:

Originally Posted by Live Wire
If there is no signature, there will be no unused screen space.

If there is sort (says one line) signature, there will be alot of unused screen space.

:) limit from what they input would be better :)


All times are GMT. The time now is 03:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01448 seconds
  • Memory Usage 1,776KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_html_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete