Sigs

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Are there plans to keep the size of these things down?
 

Shovel

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,350
Aye, I noticed that too - I'd got used to having them capped at 3 lines...
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Shovel said:
Aye, I noticed that too - I'd got used to having them capped at 3 lines...

That requires a hack and there are no hacks released yet for VB3
 

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Is there any way to limit the Font size, seems some people might be tempted to use the largest font just because then can?
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Embattle said:
Is there any way to limit the Font size, seems some people might be tempted to use the largest font just because then can?

I will look into it but that may require a hack.

/me goes to look
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,336
Deebs said:
I will look into it but that may require a hack.

/me goes to look

You could just manually edit them, via the gift of slappage?
 

kan

Loyal Freddie
Joined
Dec 22, 2003
Messages
44
Yer need a limit on sigs as some peeps have got ones far too big already. Do they actually think we read that bollox?
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,336
In all honesty, is my sig too big? I'll change it if it annoys people, but hopefully its not as annoying as those 3 page long windbag 'cast 45 lame' type sigs.
 

kan

Loyal Freddie
Joined
Dec 22, 2003
Messages
44
Tom said:
In all honesty, is my sig too big? I'll change it if it annoys people, but hopefully its not as annoying as those 3 page long windbag 'cast 45 lame' type sigs.
Nah that’s fine Tom. Deebs is a tad long but I cant whinge about that :) take a look around the forums. There are some silly ones already.
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
kan said:
Nah that’s fine Tom. Deebs is a tad long but I cant whinge about that :) take a look around the forums. There are some silly ones already.

I have changed mine :p
 

Insane

Wait... whatwhat?
Joined
Dec 22, 2003
Messages
998
3 minutes and counting.

p.s. just back from pub after work outing type thingy.. might go for carry out now and sit here smashed...

the sigs larger than his fecking post :eek:
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
How to remove annoying sigs:

1) Add two new Profile Fields:
Code:
Title					Description									Default		Max Len		Display Size	Reg. Expression		Display Page
Maximum lines for signatures		Set maximum line for each user signature on this forum, numeric only!				4		4		^[0-9]$			Options: Other
Maximum characters for signatures	Set maximum characters for each user signature on this forum, numeric only!			4		4		^[0-9]$			Options: Other

2) Now time to add the actual code, this is a bit trickier as it takes some modifications in a vB file. First of all, open "includes/functions_showthread.php"

3) Find the following code, it is on line 489 -> 506 in an unedited copy of this file:

Code:
		// get signature
		if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
		{
			if (!isset($sigcache["$post[userid]"]))
			{
				$parsed_postcache['skip'] = true;
				$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
				$sigcache["$post[userid]"] = $post['signature'];
			}
			else
			{
				$post['signature'] = $sigcache["$post[userid]"];
			}
		}
		else
		{
			$post['signature'] = '';
		}

Now delete the lot of it, and replace it with:

Code:
        $maxsigmod_maxlines_field = 'field6';
        $maxsigmod_maxchars_field = 'field7';

		// get signature
		if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $sigperms[$post['userid']])
		{
			if (!isset($sigcache["$post[userid]"]))
			{
				$parsed_postcache['skip'] = true;

                if (isset($bbuserinfo[$maxsigmod_maxlines_field]))
                {
                    if ($bbuserinfo[$maxsigmod_maxlines_field] != '')
                    {
                        $num_lines = (int) $bbuserinfo[$maxsigmod_maxlines_field];
                        $multiline_sig = explode("\n", $post['signature']);
                
                        if (count($multiline_sig) > $num_lines)
                        {
                            // ok this sig is too big, we will cut it down to size.
                            $post['signature'] = implode("\n", array_slice($multiline_sig, 0, $num_lines));
                        } // if
                    } // if
                } // if
    
                if (isset($bbuserinfo[$maxsigmod_maxchars_field]))
                {
                    if ($bbuserinfo[$maxsigmod_maxchars_field] != '')
                    {
                        $num_chars = (int) $bbuserinfo[$maxsigmod_maxchars_field];
                
                        if (strlen($post['signature']) > $num_chars)
                        {
                            // ok this sig is too big, we will cut it down to size.
                            $post['signature'] = substr($post['signature'], 0, $num_chars) . '...';
                        } // if
                    } // if
                } // if

				$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
				$sigcache["$post[userid]"] = $post['signature'];
			}
			else
			{
				$post['signature'] = $sigcache["$post[userid]"];
			}
		}
		else
		{
			$post['signature'] = '';
		}

The first two lines need to be changed to reflect what vBulletin names the two new fields you create.

$maxsigmod_maxlines_field is the max lines field, and
$maxsigmod_maxchars_field is the max characters field.

I have used code instead of php colouring as PHP colouring looks really bad on a green background.
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Yeh I did this for VB2 but no hacks are around (obv you know where to look) for VB3 until RC1 is out.
 

Jonaldo

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,173
There is the option to completely ignore all signatures but I'm not too keen on that.
 

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Another problem with sigs is they seem to get put right after the reply text, like Jonaldo's and many others were you only write one line of text....is there a way to force them to work from the bottom up?
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Ok,

I have added this hack, goto your User CP and enable it.

Only the lines limit is active at the moment.

Gratis to SheepCow.
 

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Got it set to 3...time to test.

/Goes to DAoC forum
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Embattle said:
Got it set to 3...time to test.

/Wonders to DAoC forum


Hmm dunno if its working actually.
 

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Deebs said:
Hmm dunno if its working actually.

Well it seems to be although some have quotes in their sigs which doesn't seem to be taken into account properly, it must only recognise it as a line or something.
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Embattle said:
Well it seems to be although some have quotes in their sigs which doesn't seem to be taken into account properly, it must only recognise it as a line or something.


Thats easy enough to fix, no BB code in sigs :)
 

Embattle

FH is my second home
Joined
Dec 22, 2003
Messages
13,458
Yay....back you complete and utter nice people in the DAoC forums ;)
 

Will

/bin/su
Joined
Dec 17, 2003
Messages
5,259
Deebs said:
Thats easy enough to fix, no BB code in sigs :)
But then I won't be able to have links there. Can you not ban certain tags?
 

Deebs

Chief Arsewipe
Staff member
Moderator
FH Subscriber
Joined
Dec 11, 1997
Messages
9,076,989
Will said:
But then I won't be able to have links there. Can you not ban certain tags?


More code hacks, oh Sheepcow you there?????? :p
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
I'll see what I can come up with tommorrow, it's a bit late to start something now as I'll probably delete something important
 

Users who are viewing this thread

Top Bottom