Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-16-2000 Last Update: Never Installs: 0
 
No support by the author.

Trying to keep this simple, as I need it for my site now (some guy posted a 34 line, 7kb sig). Set $siglimit to the number of lines you want to be.

This is not particularly efficient, but it will limit sigs already in place. So...

showthread.php, find:
Code:
      $signature= "\n__________________\n$userinfo[signature]";
Replace with:
Code:
      $signature= "\n__________________\n";
      $splitsig = explode("\n", $userinfo[signature]);
      $siglimit = 6;
      if (count($splitsig)>$siglimit) {
      	for ($i=0;$i<$siglimit;$i++) {
      		$signature .= "$splitsig[$i]\n";
      	}
      } else {
      	$signature .= "$userinfo[signature]";
      }
Tada! Remember to set $siglimit to what you want!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 09-16-2000, 10:35 PM
Guest
 
Posts: n/a
Default

just curious what sig line number did everyone use ? 10, 15, 20 lines ?
Reply With Quote
  #13  
Old 09-16-2000, 11:09 PM
Guest
 
Posts: n/a
Default

Personally, I was going to use 6. Although I'll have to see what my "advisors" say The whole reason this spawned was because of the ASCII art fad at my forums. Since I have a ... tag, my users have been making some nifty little ASCII art people. (They'd use periods and null characters to make blanks) Some were quite good, some sucked; some were big, some were small.

Well, this one guy decided to make a 34 line dragon, which I have to say was really cool. BUT, in 1024x768 it takes up the whole screen! He took it down, and replaced it with a 15 line thingy. Some other user has a big sword (10 lines) and a 5 line quote. Another one, whom I've let slide for too long, has a 15 line poem.

So, I would suggest 6, with 8 as a max.
Reply With Quote
  #14  
Old 09-16-2000, 11:24 PM
Guest
 
Posts: n/a
Default

I have 5...enough for an email, name, a couple of sites and a quote.
Reply With Quote
  #15  
Old 09-17-2000, 06:09 AM
Guest
 
Posts: n/a
Default

Basically what this change does is print a defineable error message if the user's signature exceeds the maximum amount of specified lines. So instead of just limiting the amount of lines, it totally removes offending signature and puts your error message in its place.

All I really did was add another variable ($sigerror), and eliminated the for() loop.

If you have Ed's hack installed already, just replace his code with:

Code:
      $signature= "\n__________________\n";
      $splitsig = explode("\n", $userinfo[signature]);
      $siglimit = 6;
      $sigerror = "Signature Too Long";
      if (count($splitsig)>$siglimit) {
         $signature .= "$sigerror";
       } else {
      	$signature .= "$userinfo[signature]";
      }
You can change $sigerror to be anything you want it to be; or in Ed's case, as MEAN as you want it to be .

-jim

*loves the tiny, yet very useful hacks*


[Edited by JimF on 09-17-2000 at 03:12 AM]
Reply With Quote
  #16  
Old 09-17-2000, 12:33 PM
Guest
 
Posts: n/a
Default

Sorry, OT here.

Quote:
or in Ed's case, as MEAN as you want it to be
You realize like 1/4 of the people on my boards dislike me? But that's because they're complete idiots (ie, YELLING, huge sigs, cross-posting). Oh well, they deserve it. LOL
Reply With Quote
  #17  
Old 09-17-2000, 12:42 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Ed Sullivan
Sorry, OT here.

Quote:
or in Ed's case, as MEAN as you want it to be
You realize like 1/4 of the people on my boards dislike me? But that's because they're complete idiots (ie, YELLING, huge sigs, cross-posting). Oh well, they deserve it. LOL
yikes makes admin/moderating fun i bet
Reply With Quote
  #18  
Old 09-17-2000, 01:30 PM
Guest
 
Posts: n/a
Default

hm...wel it gives you something to let steam loose on
Reply With Quote
  #19  
Old 09-17-2000, 03:14 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Menno
hm...wel it gives you something to let steam loose on
I do - that's why they don't like me.
Reply With Quote
  #20  
Old 09-17-2000, 05:23 PM
Guest
 
Posts: n/a
Default

Could a user circumvent the hack (if HTML was enabled) and used <br>'s instead? Also, if they let it wrap around there might not be any \n's to look for either, so they could enter in 30,000 characters and be ok. Perhaps a character limit could be enforced as well?
Reply With Quote
  #21  
Old 09-17-2000, 05:29 PM
Guest
 
Posts: n/a
Default

mrogish, you are absolutely correct. If the user just has one long sentence, it would circumvent the hack. Well, the original one. The change I made eliminates the entire signature.

I was fudging around and decided to try making a character limit, a total lines limit, as well as an image size limit for sigs, controllable from the Control Panel. I guess something would have to be added to make it look for <br>'s as well - might as well make it totally functional.

For some reason, I get more excited about tiny little hacks like this than I do for huge PM and Poll hacks and such .

-jim
Reply With Quote
Reply


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 04:33 AM.


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.04856 seconds
  • Memory Usage 2,280KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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
  • 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