TBDev Forum
Programming board
Main Page Forum Rules Privacy Policy Members Contact Us
Welcome Guest (Login | Register)
TBDev Forum TBDev.net - Help General Support users are peasant now
Page 1 2

users are peasant now

2007-01-27 18:56:00
Group: Member
Posts: 162
Topics participated: 70
Topics started: 23
First post: 2006-08-24 12:54:00
Last post: 2008-06-30 21:33:00
Hi

A frend of my his script is fucking with use:P

His users are peasent now

Is there a code 2 do all peasant back 2 users again?

Great tnx TB
 
2007-01-27 19:34:00
Group: Member
Posts: 461
Topics participated: 232
Topics started: 10
First post: 2006-03-21 13:50:00
Last post: 2008-12-23 18:24:00
Interesting question, and an even more interesting answer...

The peasant script relies on the fact the the class User is not 0, but higher (traditionally 1), with a specific leecher class set to 0.

If your user class is 0, then the peasant mod will not work.

How to tell...

Open you friends' global.php and look for the defines within this script. If it looks like...

define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_SYSOP', 6);


with UC_USER defined as 0, then peasants will not work.

For peasants to work, you would need to bump each class up by one, so that you could fit the leecher class at the top of the list as 0, as in...

define ('UC_LEECHER',0);
define ('UC_USER', 1);
define ('UC_POWER_USER', 2);
define ('UC_VIP', 3);
define ('UC_UPLOADER', 4);
define ('UC_MODERATOR', 5);
define ('UC_ADMINISTRATOR', 6);
define ('UC_SYSOP', 7);


Of course, this is not a simple change, since so many other parts of the script rely on the UC_ defines being static, such as forum access (you don't want uploaders having access to the moderator forums), and cleanup (which uses absolute values for class distinction rather than UC_ defines).

You would also need to check your code to ensure that you don't have hardcoded class values, such as...

if ($CURUSER['class'] == 7) { ...


when it should be

if ($CURUSER['class'] == UC_SYSOP) { ...
 
2007-01-28 01:25:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
Dont forget

SQL
update users set class=class+1


and fix the forums permissions
 
2007-01-28 07:19:00
Group: Member
Posts: 297
Topics participated: 145
Topics started: 25
First post: 2006-10-08 11:10:00
Last post: 2008-11-07 13:29:00
and hoe to I import class "CODER" between class "Moderator" and "Administrator" ???

Here is my part of global:
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_SYSOP', 6);
define ('UC_STAFFLEADER', 7);

function get_user_class()
{
 
2007-01-28 09:32:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
first

SQL
update users set class=class+1 where class>='5'


Than add tham to global

than fix the permission in the forums and other places which based on numbers
 
2007-01-28 09:51:00
Group: Member
Posts: 297
Topics participated: 145
Topics started: 25
First post: 2006-10-08 11:10:00
Last post: 2008-11-07 13:29:00
Ok thanks dokty but now I need a put class "SUPERVISOR" between the classes "Administrator" and "SysOp" how to do it? What sql now?? ;)
Here is my part of global.php
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_CODER', 5);
define ('UC_ADMINISTRATOR', 6);
define ('UC_SYSOP', 7);
define ('UC_STAFFLEADER', 8);

function get_user_class()
{
 
2007-01-28 13:08:00
Group: Member
Posts: 774
Topics participated: 452
Topics started: 10
First post: 2006-03-26 05:51:00
Last post: 2009-01-04 00:57:00
Why would you want your coder at a less class then admin?
The coder needs to be able to see everything incase something needs to be fixed..
 
2007-01-28 13:25:00
Group: Member
Posts: 297
Topics participated: 145
Topics started: 25
First post: 2006-10-08 11:10:00
Last post: 2008-11-07 13:29:00
and the codet must be between sysop and administrator??
and how to fix??
 
2007-01-28 19:15:00
Group: Member
Posts: 297
Topics participated: 145
Topics started: 25
First post: 2006-10-08 11:10:00
Last post: 2008-11-07 13:29:00
dokty please give me sql for this: I need a put class "SUPERVISOR" between the classes "Administrator" and "Coder"

my global.php
define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_CODER', 6);
define ('UC_SYSOP', 7);
define ('UC_STAFFLEADER', 8);

function get_user_class()
{
 
2007-01-28 19:21:00
Group: Member
Posts: 2607
Topics participated: 1470
Topics started: 2
First post: 2006-07-10 10:45:00
Last post: 2008-06-13 17:08:00
cant u do it ur self?
Its same as i posted 5 above same method
 

Similar threads

Topic Posts Last post
hi peasant 7 2007-08-15 23:00:00
SIGNUP lowering class to PEASANT 1 2008-06-23 15:43:00
Demoted to peasant or power user... 1 2007-02-09 14:40:00
Log.php Inaccesible for users/vips/power users 9 2007-02-17 08:34:00
show users avatar-ratio-title-active torrents-UL-DL-moodand seedbonus on the online users list in index.php 40 2008-11-25 12:20:00