Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
Details »»

Version: , by GenSec GenSec is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-14-2001 Last Update: Never Installs: 2
 
No support by the author.

A small addition to prevent members to post long messages wich have no new information, but just long quotes and "Cool!" at the end.

Database Changes:
Code:
INSERT INTO setting (settingid,settinggroupid,title,varname,value,description,optioncode,displayorder) VALUES (NULL,'8','Maximum Characters per quote','quotemaxchars','250','The maximum number of characters that you want to allow per quote. Set this to 0 to disable it','','8')
Open newreply.php
Find
Code:
$pagetext=htmlspecialchars($postinfo[pagetext]);
Replace with
Code:
    $pagetext=$postinfo[pagetext];
    $getquote=$DB_site->query_first("SELECT value  FROM setting WHERE varname='quotemaxchars'");
    $quotemaxchars=$getquote[value];
    if (strlen($pagetext) > $quotemaxchars and $quotemaxchars!=0) {
           $pagetext = substr($pagetext,0,$quotemaxchars);
           $pagetext .= "...";
        }

    $pagetext=bbcodeparse($pagetext,0,1);
Then use admin CP to set the maximum size of the quote

Show Your Support

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

Comments
  #2  
Old 10-23-2001, 01:31 PM
cyrus's Avatar
cyrus cyrus is offline
 
Join Date: Oct 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one

thatl come in handy

thanks GenSec
Reply With Quote
  #3  
Old 10-23-2001, 01:39 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will just stop from posting long messages, not quotes.
Reply With Quote
  #4  
Old 10-23-2001, 01:53 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
This will just stop from posting long messages, not quotes.
Messages which are long because include long quotes
It limits not message but size of quotes in it
Reply With Quote
  #5  
Old 10-23-2001, 02:08 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Limiting posts length is already standard with vBulletin.
Your hack does the exact same thing.
Reply With Quote
  #6  
Old 10-23-2001, 02:30 PM
GenSec GenSec is offline
 
Join Date: Oct 2001
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, it doesn't
Limiting posts length is already standard with vBulletin. Right.
If it's limit is 1000 for example and someone post long message with 1000 simbols. Then next replies can look like
"
Quote:
bla bla = 990 simbols
+ Cool!"

It's only repeat previous one! I hate it and limited in addition the size of quote to 10% of the max post size.
Reply With Quote
  #7  
Old 10-23-2001, 02:48 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are right.
Reply With Quote
  #8  
Old 10-23-2001, 03:35 PM
DarkReaper DarkReaper is offline
 
Join Date: Oct 2001
Posts: 429
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok...now I'm confused
Reply With Quote
  #9  
Old 10-23-2001, 03:43 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He's right, I didn't understand it.
Sorry GenSec.
Reply With Quote
Reply

Thread Tools

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 12:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04387 seconds
  • Memory Usage 2,269KB
  • Queries Executed 22 (?)
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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete