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.


All times are GMT. The time now is 01:11 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.01284 seconds
  • Memory Usage 1,747KB
  • 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
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete