Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
Dealing with long signatures
Spinball's Avatar
Spinball
Join Date: Feb 2002
Posts: 705

 

Telford, England
Show Printable Version Email this Page Subscription
Spinball Spinball is offline 08-01-2004, 10:00 PM

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.
Reply With Quote
  #2  
Old 08-02-2004, 12:32 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you haven't noticed the vb option "Maximum Length of Signature" in your admin cp?
Reply With Quote
  #3  
Old 08-02-2004, 07:49 PM
zajako's Avatar
zajako zajako is offline
 
Join Date: Jan 2002
Location: a place not to far away
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this doesnt help with people having large, or many images in signitures though :/ doesnt help me much, but thanks
Reply With Quote
  #4  
Old 08-02-2004, 09:03 PM
drumsy's Avatar
drumsy drumsy is offline
 
Join Date: Nov 2001
Location: Charlotte, NC
Posts: 292
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 08-02-2004, 09:22 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-06-2004, 05:59 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #7  
Old 09-25-2004, 07:02 AM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 09-25-2004, 09:18 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 10-10-2004, 03:55 PM
Abe Babe's Avatar
Abe Babe Abe Babe is offline
 
Join Date: Sep 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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...
Reply With Quote
  #10  
Old 10-10-2004, 05:28 PM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05073 seconds
  • Memory Usage 2,296KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_html
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete