1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Userclass updates

This commit is contained in:
e107steved 2007-12-22 12:39:27 +00:00
parent 9c77d3d5b9
commit 3fd4791738
19 changed files with 1977 additions and 481 deletions

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/class2.php,v $
| $Revision: 1.34 $
| $Date: 2007-12-15 15:06:40 $
| $Revision: 1.35 $
| $Date: 2007-12-22 12:39:23 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -926,7 +926,7 @@ function check_class($var, $userclass = USERCLASS_LIST, $uid = 0)
return TRUE;
}
if (is_numeric($var) && ($var == e_UC_PUBLIC)) return TRUE; // Accept numeric class zero - 'PUBLIC'
// if (is_numeric($var) && ($var == e_UC_PUBLIC)) return TRUE; // Accept numeric class zero - 'PUBLIC'
// userid has been supplied, go build that user's class list
if(is_numeric($uid) && $uid > 0)
@ -1057,6 +1057,18 @@ function get_user_data($uid, $extra = "")
}
}
}
//===========================================================
// Now look up the 'inherited' user classes
if (!isset($e_userclass) && !is_object($e_userclass))
{
require_once(e_HANDLER."userclass_class.php");
$e_userclass = new user_class;
}
$var['user_class'] = $e_userclass->get_all_user_classes($var['user_class']);
//===========================================================
cachevars("userdata_{$uid}", $var);
return $var;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1015 B

View File

View File

@ -11,15 +11,60 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/help/userclass2.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:43 $
| $Author: mcfly_e107 $
| $Revision: 1.2 $
| $Date: 2007-12-22 12:39:24 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$caption = "Use Class Help";
$text = "You can create or edit/delete existing classes from this page.<br />This is useful for restricting users to certain parts of your site. For example, you could create a class called TEST, then create a forum which only allowed users in the TEST class to access it.";
$caption = "User Class Help";
if (e_QUERY)
{
$qs = explode(".", e_QUERY);
}
switch (varsettrue($qs[0],'config'))
{
case 'initial' :
$text = "Set the classes to which a new member of the site is assigned initially.
If you have verification enabled, this assignment may take place either when the user signs up, or when the user is verified.<br /><br />
And remember that if you are using hierarchical user classes, a user is automatically a member of all classes 'above' each selected class in the tree";
break;
case 'options' :
$text = "You can choose to make an entry in the admin log whenever an admin modifies the userclass information.<br /><br />
The Setup options allow you to create and remove the default class hierarchy. You can see the effect by looking at the user tree.<br />
This won't destroy your other class information, and you can modify or remove the hierarchy later.";
break;
case 'membs' :
$text = "You can carry out bulk modification of class membership here. (The class membership of individual members is best carries out from the 'Users' page).<br /><br />
And remember that if you are using hierarchical user classes, a user is automatically a member of all classes 'above' each selected class in the tree";
break;
case 'debug' :
$text = "For advanced users only - shows the hierarchy of the classes, plus the assigned classes and the classes to which the first 20 site members have access.<br />
The number in front of the class name is its unique ID (reference number). The 'Everyone' class has an ID of 0 (zero). E107 uses these IDs throughout to refer to classes.<br />
After the class name is the class visibility - [vis:253] for example. This means that the class will be visible in most selectors only if the current user is a member of class 253.<br />
Finally, after the '=', is a list of all classes above each class in the tree, plus the ID of that class. Thus a user who is a member of a particular class will
be a member of all the classes in this list.<br /><br />
To help with understanding, the class membership of the first 20 members is shown. The first entry on each line shows the classes of which the user is a member. The
second entry lists all the classes where the user is a member once inheritance takes effect.";
break;
case 'test' :
case 'special' :
$text = "Don't use this!!! For the devs only!!!";
break;
case 'config' :
default :
$text = "You can create or edit/delete existing classes from this page.<br />
This is useful for restricting users to certain parts of your site. For example, you could create a class called TEST,
then create a forum which only allowed users in the TEST class to access it.<br /><br />
The class name is displayed in drop-down lists and the like; in some places the more detailed description is also displayed.<br /><br />
The class icon may be displayed in various places on the site, if one is set.<br /><br />
To allow users to determine whether they can be a member of a class, allow them to manage it.<br /><br />
The 'visibility' field allows you to hide the class from most members - applies in some of the drop-down lists and checkboxes.<br /><br />
The 'class parent' allows you to set a hierarchy of classes, where the classes lower down the hierarchy also have the rights of their parent class,
and that classes' parent, and so on. The resulting tree is shown in the lower part of the page; you can expand and contract branches by clicking on the '+' and '-' boxes.";
}
$ns -> tablerender($caption, $text);
?>

View File

@ -4,9 +4,9 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_userclass2.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:42 $
| $Author: mcfly_e107 $
| $Revision: 1.2 $
| $Date: 2007-12-22 12:39:24 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
define("UCSLAN_1", "Cleared all users from class.");
@ -17,8 +17,7 @@ define("UCSLAN_5", "Class updated.");
define("UCSLAN_6", "Class saved to database.");
define("UCSLAN_7", "No user classes yet.");
define("UCSLAN_8", "Existing Classes");
// define("UCSLAN_9", "Edit");
define("UCSLAN_9", "No Icon");
// define("UCSLAN_10", "Delete");
define("UCSLAN_11", "tick to confirm");
define("UCSLAN_12", "Class Name");
@ -31,11 +30,60 @@ define("UCSLAN_18", "Clear Class");
define("UCSLAN_19", "Assign users to");
define("UCSLAN_20", "class");
define("UCSLAN_21", "User Class Settings");
define("UCSLAN_22", "Users - click to move ...");
define("UCSLAN_23", "Users in this class ...");
define("UCSLAN_24", "Who can manage class");
define("UCSLAN_25", 'Define/Edit Classes');
define("UCSLAN_26", 'Class Membership');
define("UCSLAN_27", 'Debug Help');
define("UCSLAN_28", 'Modify Class Membership');
define("UCSLAN_29", 'That class must not be deleted');
define("UCSLAN_30", 'Short name displayed in selectors');
define("UCSLAN_31", 'Information about applicability of class');
define("UCSLAN_32", 'Users in this class can add/remove themselves from the class being edited');
define("UCSLAN_33", 'Determines which users can see this class in drop-down lists');
define("UCSLAN_34", 'Class visibility');
define("UCSLAN_35", 'Class parent');
define("UCSLAN_36", 'Members inherit the access rights of all parents');
define("UCSLAN_37", 'You must enter a name for the class');
define("UCSLAN_38", 'Initial User Class');
define("UCSLAN_39", 'No classes which can be set');
define("UCSLAN_40", 'Set initial classes');
define("UCSLAN_41", 'Settings updated');
define("UCSLAN_42", 'Nothing changed - not updated');
define("UCSLAN_43", 'Existing classes: ');
define("UCSLAN_44", 'None');
define("UCSLAN_45", 'Point at which classes set:');
define("UCSLAN_46", '(ignored if no verification)');
define("UCSLAN_47", 'Initial Signup');
define("UCSLAN_48", 'Verification by email or admin');
define("UCSLAN_49", 'These classes are set for any newly signed up user - either immediately, or once their site membership has been verified');
define("UCSLAN_50", 'Options/Setup');
define("UCSLAN_51", 'User Class Functions');
define("UCSLAN_52", 'Setup Options');
define("UCSLAN_53", 'Caution! Only use these options if you understand what they do');
define("UCSLAN_54", 'Set a default user hierarchy');
define("UCSLAN_55", 'Clear the user hierarchy');
define("UCSLAN_56", "(this sets a 'flat' user class structure)");
define("UCSLAN_57", '(the hierarchy can be modified later)');
define("UCSLAN_58", 'Execute');
define("UCSLAN_59", 'Enable admin logging of user class edits');
define("UCSLAN_60", 'User Class Configuration options');
define("UCSLAN_61", 'User class setup');
define("UCSLAN_62", 'Create default class tree: ');
define("UCSLAN_63", 'Must add new DB fields first');
define("UCSLAN_64", 'completed');
define("UCSLAN_65", 'Flatten user class hierarchy: ');
define("UCSLAN_66", 'Confirm flatten user class hierarchy');
define("UCSLAN_67", 'Confirm set default user class hierarchy');
define("UCSLAN_68", 'Class icon');
define("UCSLAN_69", 'Optional icon associated with class - directory ');
define("UCSLAN_70", 'Rebuilding class hierarchy: ');
define("UCSLAN_71", 'User Class Maintenance');
define("UCSLAN_72", 'Rebuild class hierarchy ');
define('UCSLAN_73', '(This may be required if database corruption occurs)');
define("UCSLAN_UPDATE", 'Update');
?>