vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change a user's post incrementation factor... (https://vborg.vbsupport.ru/showthread.php?t=49668)

Zzed 03-04-2003 10:00 PM

Change a user's post incrementation factor...
 
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.

geniuscrew 03-05-2003 05:55 AM

This could be fun :devious:

Zzed 03-05-2003 06:10 AM

Look at my profile ;) My factor is set to -1. :D

I have a user whose post incrementation factor is set to -500... :D

geniuscrew 03-05-2003 08:02 AM

lmao - that's cool

Nice avatar too

Remi 03-05-2003 09:37 AM

Quote:

Originally posted by geniuscrew
Nice avatar too
I thik your avatar is much better ;) :D

geniuscrew 03-05-2003 11:34 AM

Quote:

Originally posted by Remi


I thik your avatar is much better ;) :D

lol I meant the one in the link he's given -_-

But thanks - I like it too :lick: Rose McGowan rocks

afterlab 03-05-2003 01:44 PM

haha.. Nice hack idea. I don't think i'll use this at my forums, but it's here if I wanted to. ;)

Dean C 03-05-2003 03:35 PM

Hehe such a sadistic hack - i like it ;)

- miSt

joeboo 03-06-2003 10:58 PM

Sounds like a good april fools joke ;)

snyx 03-07-2003 01:52 PM

im having major trouble installing this over the starhack.
any thoughts?

Zzed 03-07-2003 07:28 PM

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

snyx 03-08-2003 10:04 PM

I shot ya over an email yesterday..

snyx 03-11-2003 04:20 AM

hello zzed? :)

Zzed 03-11-2003 04:49 AM

Sorry snyx, :( I will take a look tonight and get back to you.

snyx 03-11-2003 02:18 PM

no problem, thx mate

Boofo 03-27-2003 11:26 PM

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?

Zzed 03-27-2003 11:34 PM

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. :D

http://www.ls1.com/forums/member.php...fo&userid=4112

Boofo 03-27-2003 11:37 PM

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);

Zzed 03-27-2003 11:44 PM

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. ;)

Boofo 03-28-2003 11:32 PM

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.

Zzed 03-29-2003 12:07 AM

Quote:

Today at 05:32 PM Boofo said this in Post #20
Hey buddy. ;)

I got this error this afternoon sometime.



and now the user is showing 23 of 22 messages.


Eureka. :D

Go to line 613 of your newrply.php and join the 2 lines and remove the backslash. ;) The variable $bbuserinfo[postdirection] has the $ and bbuserinfo separated. ;)

snyx 04-01-2003 05:34 AM

help all my new registered users dont have a post count?
they just sit at no number!! I want to remove the changes I made to mySQL in hopes it fixes this problem how would I do this?!

Boofo 04-01-2003 07:07 AM

It seems you get a db error when a new user tries to activate also. Apparently, we need to change something in the register.php file, too.

DrunkenStud 04-01-2003 04:10 PM

Quote:

Today at 02:34 AM snyx said this in Post #22
help all my new registered users dont have a post count?
they just sit at no number!! I want to remove the changes I made to mySQL in hopes it fixes this problem how would I do this?!


yeah, shouldnt you have altered the posts column like this:

alter table user modify posts int(6) default 0 not null;

Boofo 04-03-2003 09:33 AM

Zzed, you need to change the following in the text file attached to the first post, too. ;)

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

Zzed 04-03-2003 09:36 AM

done. ;)

Thank you sir. :)

Hobbes 08-02-2003 04:30 AM

anyone know if this conflicts with bitsys's battle hack?


erm it does....sucks...


wouldve been nice :(


All times are GMT. The time now is 09:09 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.01813 seconds
  • Memory Usage 1,768KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete