MOD download & history

This mod will make it posible to specify permissions to all "special pages, like MEMBERLIST, PROFILE VIEW and so on.
The permissions support USERGROUP, making this tool very powerfull

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

MOD download & history

Postby Niels on Fri 22. Nov, 2002 03:28

Code: Select all
##############################################################
## MOD Title:          Extra permission
## MOD Author:         Niels < ncr@db9.dk > (Niels Chr. Rød) http://mods.db9.dk
## MOD Description:    If you wish to control witch users may see/use
##                     special pages this mod makes it posible to include
##                     some code to the php pages, so you as admin may
##                     define per user / usergroup what permissions they have.
## MOD Version:        1.0.1
## MOD Compatibility:  2.0.6
##
## Installation Level: Easy
## Installation Time:  4 Minutes (1mn by EasyMOD of Nuttzy)
## Files To Edit:      8
##   index.php
##   memberlist.php
##   admin/admin_forumauth.php
##   includes/auth.php
##   includes/constants.php 
##   includes/functions_admin.php
##   includes/page_header.php
##   templates/subSilver/overall_header.tpl
##
## Included Files:     3
##      extra_perm_db_update.php
##      examples/add_perm_db_update.php
##      examples/remove_perm_db_update.php
##
##############################################################
## MOD History:
##
##   2003-12-10 - Version 1.0.1
##      - phpBB template & EasyMOD compliance enhancement
##
##   ????-??-?? - Version 1.0.0
##      - now EM ready, and considered as final
##
##   ????-??-?? - Version 0.9.7
##      - corrected some mistakes in the how-to related to
##        auth.php and admin_forumauth.php
##
##   ????-??-?? - Version 0.9.6
##      - now also includeds auth.php, witch was missing
##        from the how-to
##
##   ????-??-?? - Version 0.9.5
##      - correcterd a wrong find/replace in admin_authforum.php,
##        causing no save of permission
##
##   ????-??-?? - Version 0.9.4
##      - corrected a wrong FIND and REPLACE tag in the how-to
##
##   ????-??-?? - Version 0.9.3
##      - correcte admin_forumauth.php to avoid double forums
##
##   ????-??-?? - Version 0.9.2
##      - corrected that topic could be moved into special pages...
##
##   ????-??-?? - Version 0.9.1
##      - minor correction to the how-to
##
##   ????-??-?? - Version 0.9.0
##      - released for BETA testing
##
##   ????-??-?? - Version 0.6.0
##      - incomplete version 
##
##############################################################

This mod, will allow you as ADMIN to specify exactly what users may do inside a SPECIAL PAGES

SPECIAL PAGES are e.g. MEMBERLIST or WHO IS ONLINE ect.

After this mod, you can in ADMIN PANEL - FORUM PERMISSION, specify permissions onto special pages, e.g. if you have a usergroups of moderators, you can define that only this group may see names on the register users online, while REG users may only see a list of "guest users" in the WHO IS ONLINE
or what ever your imagination will come up with.

this mod fully support USERGROUPS, AUTOGROUPS and so on.

EDIT: I have now released this mod for BETA testing, the how-to describe how to add the changes to INDEX page and memberlist
if you wish to make this into other pages, you can look in these files how-to

Some of my mods, will in the future REQUIRE this mod, since it makes it posible to controll permissions into other pages than a forum....

Pay attention, when modifying the forum permission for a "special page", then not all entryes a valid, some (most) pages have only controll for VIEW and READ, maybe also POST, therefore meny of the entryes does not make sence, simply ignore these. e.g. permission to POLL give mo mening in the memberlist :)

EDIT: now EM ready, and considered as bug free

please note:
Cataories hierarchy Mod change some code in admin/admin_forumauth.php, witch makes these 2 MOD's not compatible, so you can have them both...
Last edited by Niels on Mon 23. Feb, 2004 15:07, edited 10 times in total.
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Sat 23. Nov, 2002 02:25

Just a comment more, in fact you may specify witch usergroups may be able to see specific items on a page

e.g. enable only the usergroup "Trusted users" to see last logon or joined date, in the memberlist
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Fri 14. Mar, 2003 15:51

I have now released a how-to, this will enable you to specify permission for "special pages", some of my mods will in the future require this mod, to allow them to more exact specify users permissions.

first to come will be the "fully integated shoutbox mod"
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Mon 17. Mar, 2003 02:14

to awoid users moving topics in special pages permission, please update to ver 0.9.2

for users alread runing with this, you may do this to upgrade
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_admin.php

#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT forum_id, forum_name
FROM " . FORUMS_TABLE . "

#
#-----[ IN-LINE FIND ]------------------------------------------
#
FROM " . FORUMS_TABLE . "

#
#-----[ IN-LINE AFTER ADD ]------------------------------------------
#
WHERE forum_id > 0
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Wed 02. Apr, 2003 12:03

the admin/admin_forumauth.php was not correct in the how-to, therefore you need to preform the following to awoid "double" forums

new version is 0.9.3.

in file admin_forumauth.php
Code: Select all
[FIND]
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
$sql = "SELECT f.*
      FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
      WHERE (c.cat_id = f.cat_id OR f.forum_id <= '0')
   $forum_sql
   ORDER BY c.cat_order ASC, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain forum list", "", __LINE__, __FILE__, $sql);
}

$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);

[REPLACE WITH]
//
// Get required information, either all forums if
// no id was specified or just the requsted if it
// was
//
$sql = "SELECT f.*
   FROM " . FORUMS_TABLE . " f
   WHERE f.cat_id=0
   $forum_sql
   ORDER BY f.forum_name ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain special pages list", "", __LINE__, __FILE__, $sql);
}
$forum_rows = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);

$sql = "SELECT f.*
   FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
   WHERE c.cat_id = f.cat_id
   $forum_sql
   ORDER BY c.cat_order ASC, f.forum_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
   message_die(GENERAL_ERROR, "Couldn't obtain forum list", "", __LINE__, __FILE__, $sql);
}
$forum_rows = array_merge($forum_rows,$db->sql_fetchrowset($result));
$db->sql_freeresult($result);
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 08. Apr, 2003 19:23

the how-to is now updated, new ver is 0.9.4
I did write a wrong FIND tag, and the following REPLACE tag was wrong to...


here is the changes made to the how-to
in file admin_forumauth.php
Code: Select all
removed...buggy
Last edited by Niels on Wed 30. Apr, 2003 00:04, edited 1 time in total.
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Sun 27. Apr, 2003 20:01

I have updateded the how-to, there was a problem with one of the FIND/REPLACE tags in the how-to
this did cause that it was not posible to save new forum permission settings

new version is 0.9.5
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
if( empty($forum_id))

#
#-----[ REPLACE WITH ]------------------------------------------
#
if(!isset($forum_id))


should have been this
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
if(!empty($forum_id))

#
#-----[ REPLACE WITH ]------------------------------------------
#
if(isset($forum_id))
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby Niels on Tue 29. Apr, 2003 23:53

the how-to did miss sme changes into auth.php, these are now included in the new how-to (ver. 0.9.6.)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Next

Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron