This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Sigs

Discussion in 'Feedback' started by Embattle, Dec 22, 2003.

  1. Embattle

    Embattle Part of the furniture

    Are there plans to keep the size of these things down?
     
  2. Shovel

    Shovel Can't get enough of FH

    Aye, I noticed that too - I'd got used to having them capped at 3 lines...
     
  3. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

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

    Embattle Part of the furniture

    Is there any way to limit the Font size, seems some people might be tempted to use the largest font just because then can?
     
  5. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

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

    /me goes to look
     
  6. Tom

    Tom FH is my second home

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

    kan Loyal Freddie

    Yer need a limit on sigs as some peeps have got ones far too big already. Do they actually think we read that bollox?
     
  8. Tom

    Tom FH is my second home

    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.
     
  9. HoriZon

    HoriZon Regular Freddie

    Got to have a nice sig :)
     
  10. kan

    kan Loyal Freddie

    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.
     
  11. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

    I have changed mine :p
     
  12. Embattle

    Embattle Part of the furniture

  13. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

  14. Insane

    Insane Wait... whatwhat?

    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:
     
  15. SheepCow

    SheepCow Bringer of Code Staff member Moderator

    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.
     
  16. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

    Yeh I did this for VB2 but no hacks are around (obv you know where to look) for VB3 until RC1 is out.
     
  17. SheepCow

    SheepCow Bringer of Code Staff member Moderator

    I wrote it for my clan's forum :)
     
  18. kan

    kan Loyal Freddie

    Nice one Deebs
     
  19. Jonaldo

    Jonaldo Fledgling Freddie

    There is the option to completely ignore all signatures but I'm not too keen on that.
     
  20. Embattle

    Embattle Part of the furniture

    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?
     
  21. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber

    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.
     
  22. Embattle

    Embattle Part of the furniture

    Got it set to 3...time to test.

    /Goes to DAoC forum
     
  23. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber


    Hmm dunno if its working actually.
     
  24. Embattle

    Embattle Part of the furniture

    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.
     
  25. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber


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

    Embattle Part of the furniture

    Yay....back you complete and utter nice people in the DAoC forums ;)
     
  27. Will

    Will /bin/su Staff member Moderator

    But then I won't be able to have links there. Can you not ban certain tags?
     
  28. Deebs

    Deebs Chief Arsewipe Staff member Moderator FH Subscriber


    More code hacks, oh Sheepcow you there?????? :p
     
  29. SheepCow

    SheepCow Bringer of Code Staff member Moderator

    /me runs
     
  30. SheepCow

    SheepCow Bringer of Code Staff member Moderator

    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
     

Share This Page