Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change a user's post incrementation factor... Details »»
Change a user's post incrementation factor...
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-04-2003 Last Update: Never Installs: 5
 
No support by the author.

This hach was requested by nintendo: https://vborg.vbsupport.ru/showthrea...threadid=49637

This hack allows you to set the direction and the incrementation factor for user posts.
The default incrementation factor is 1. With this hack you can freeze a user's post
count by setting the incrementation factor to 0, or you can make it go backwards by
setting it to -1. Of course, you are not limitet to -1, 0, or 1. You can set it to
any positive or negative number and that users post caount will increment or decrement
by the specified number each time that user makes a post.

Tables affected by this hack: user, usertitle
Files affected by this hack: newthread.php, newreply.php, admin/user.php

To begin with this hack you must allow for negative post counts, and you need an
additional field in the user table.

Execute the following statements at the MySQL prompt:

alter table user add postdirection smallint(5) DEFAULT 1 NOT NULL;
alter table user modify posts int(6) default 0 NOT NULL;
alter table usertitle modify minposts int(6);

Quote:
Note: If you have installed this hack and are not able to set the post incrementation factor to a negative number execute the following statement.

alter table user modify postdirection smallint(5) default 1 not null;

I apologize for this mixup. I have already updated the instruction file.

Show Your Support

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

Comments
  #12  
Old 03-07-2003, 07:28 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not familiar with the star hack.

What errors are you getting?

Can you Email me your newthread.php and newreply.php files?

My Email is edwink@seebeyond.com
Reply With Quote
  #13  
Old 03-08-2003, 10:04 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I shot ya over an email yesterday..
Reply With Quote
  #14  
Old 03-11-2003, 04:20 AM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hello zzed?
Reply With Quote
  #15  
Old 03-11-2003, 04:49 AM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry snyx, I will take a look tonight and get back to you.
Reply With Quote
  #16  
Old 03-11-2003, 02:18 PM
snyx's Avatar
snyx snyx is offline
 
Join Date: Oct 2001
Location: Vancouver (whistler.2010)
Posts: 556
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no problem, thx mate
Reply With Quote
  #17  
Old 03-27-2003, 11:26 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zzed, I just installed this and I changed my incrementation to -1 but when I go into my user setting to look at it, for some reason it is showing 0 now. Any ideas what might be causing this?
Reply With Quote
  #18  
Old 03-27-2003, 11:34 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:26 PM Boofo said this in Post #16
Zzed, I just installed this and I changed my incrementation to -1 but when I go into my user setting to look at it, for some reason it is showing 0 now. Any ideas what might be causing this?

You need to alter your user and usertitle tables. Post counts are unsigned integers, the following code will make them signed integers.


alter table user modify posts int(6) DEFAULT 0 NOT NULL;

alter table usertitle modify minposts int(6);


Also look at my post count in my profile.

http://www.ls1.com/forums/member.php...fo&userid=4112
Reply With Quote
  #19  
Old 03-27-2003, 11:37 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here are the queries I ran according to your install instructions.

Quote:
alter table user add postdirection smallint(5) unsigned DEFAULT 1 NOT NULL;
alter table user modify posts int(6);
alter table usertitle modify minposts int(6);
Reply With Quote
  #20  
Old 03-27-2003, 11:44 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just executed this SQL query in your Admin CP:

alter table user modify postdirection smallint(5) default 1 not null;

Then went ahead and set your post incrementation factor to -1.

It worked.
Reply With Quote
  #21  
Old 03-28-2003, 11:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey buddy.

I got this error this afternoon sometime.

Quote:
Database error in vBulletin 2.2.9:

Invalid SQL: SELECT title FROM usertitle WHERE minposts<=22+ $\
bbuserinfo[postdirection] ORDER BY minposts DESC LIMIT 1
mysql error: You have an error in your SQL syntax near '\
bbuserinfo[postdirection] ORDER BY minposts DESC LIMIT 1' at line 1

mysql error number: 1064

Date: Friday 28th of March 2003 03:09:54 PM
Script: http://www.bearfacts2.com/forum/forum/newreply.php
Referer: http://www.bearfacts2.com/forum/show...=&threadid=311
and now the user is showing 23 of 22 messages.
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:23 PM.


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.04375 seconds
  • Memory Usage 2,306KB
  • 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
  • (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
  • (2)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_onlinestatus
  • (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
  • 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