Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2004, 11:10 PM
tHe Rk tHe Rk is offline
 
Join Date: Jan 2004
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Signature "Line Limiter"

Hello all,



I have looked everywhere on all the big hack sites and I can NOT find a hack that allows one to limit signatures based on "Lines" rather than characters. I remember having a hack for it in vB2, but can't seem to find one for vB3. I have seen the other hack that is a "pixel" based limiter, and that's not really what I am looking for. Just a simple Sigs cannot exceed 7 Lines. or 10 lines, or 5 or whatever we would decide to choose. Does anyone know how to do this or where to find the hack?



FYI...running 3.0.1 Thanks.

I posted at vb.com and they sound there isn't currently a way to do it, and it has to be hacked. I have looked everywhere including here, and havn't found a hack yet, so I figured I could request one. Thanks!
Reply With Quote
  #2  
Old 07-12-2004, 11:14 PM
Berethorn Berethorn is offline
 
Join Date: Jun 2004
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea! I would guess it should be a fairly easy hack.
Reply With Quote
  #3  
Old 07-12-2004, 11:40 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is what I did on our board several month ago (moreless copy&paste, hope it does work)
  1. Create the following phrase in phrasegroup Front-End Error Messages
    varname = sigtoomanylines
    text = Your signature can not be longer than $vboptions[maxsiglines] lines.
  2. In vBulletin Options/User Profile Options create the following setting:
    varname = maxsiglines
    title = Maximum signature lines
    description = The maximum number of lines anyone can use in their signature.
    default = 4
    vBulletin Standard = No
  3. In profile.php FIND
    PHP Code:
    if ($vboptions['maximages'] != 0)
    {
      require_once(
    './includes/functions_bbcodeparse.php');
      
    $parsedsig parse_bbcode($signature0$vboptions['allowsmilies'], 1); 
    REPLACE that with
    PHP Code:
    if ($vboptions['maxsiglines'] != 0) {
      require_once(
    './includes/functions_misc.php');
      require_once(
    './includes/functions_bbcodeparse.php');
      
    $parsedsig parse_bbcode($signature0$vboptions['allowsmilies']);
      
    $siglines 0;
      
    $siglines += fetch_character_count($parsedsig'<br');
      
    $siglines += fetch_character_count($parsedsig'<blockquote');
      
    $siglines += fetch_character_count($parsedsig'<pre');
      if (
    $siglines $vboptions[maxsiglines]-1) {
        
    $preview 'true';
        eval(
    '$errors[] = "' fetch_phrase('sigtoomanylines'PHRASETYPEID_ERROR) . '";');
      }
    }

    if (
    $vboptions['maximages'] != 0)
    {
      if (!
    $parsedsig) {
        require_once(
    './includes/functions_bbcodeparse.php');
        
    $parsedsig parse_bbcode($signature0$vboptions['allowsmilies'], 1);
      } 
Reply With Quote
  #4  
Old 07-15-2004, 07:35 AM
rexlu rexlu is offline
 
Join Date: May 2003
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excuse me..

How to do the 2nd step?

Quote:
2. In vBulletin Options/User Profile Options create the following setting:
varname = maxsiglines
title = Maximum signature lines
description = The maximum number of lines anyone can use in their signature.
default = 4
vBulletin Standard = No
Reply With Quote
  #5  
Old 07-15-2004, 09:36 AM
-mk- -mk- is offline
 
Join Date: May 2003
Location: Sydney, AU
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to turn debug on.

I just get parse errors anyway.
Quote:
if ($siglines > $vboptions[maxsiglines]-1)) {
Reply With Quote
  #6  
Old 07-15-2004, 10:22 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remove the 2nd closing bracket, was a typo. Sorry.
Reply With Quote
  #7  
Old 07-16-2004, 04:26 AM
rexlu rexlu is offline
 
Join Date: May 2003
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um.. I still getting error ..

Fatal error: Call to undefined function: fetch_character_count() in /home/nonoboar/public_html/bbs/profile.php on line 1333
Reply With Quote
  #8  
Old 07-16-2004, 10:46 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops! Didn't notice that I required functions_misc earlier in profile.php, so this is missing here:

Put
PHP Code:
require_once('./includes/functions_misc.php'); 
after the first if-condition.
Reply With Quote
  #9  
Old 07-16-2004, 01:35 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work with any other sig limiting hacks like the image size limiter released a while back? Or will they end up fighting with one another?
Reply With Quote
  #10  
Old 07-16-2004, 01:46 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well ... don't really know, but should work.
Just try it ^.^
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 02:54 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.17063 seconds
  • Memory Usage 2,268KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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