Problem

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 !

Problem

Postby **MIKE** on Tue 30. Sep, 2003 20:59

Hello everyone.

First I want to excuse me for the bad englisch.

Secondly, I have tried the extra permissions mod, it works fine for the memberlist.

I also wanted to use it for the calander and the groupslist.

I did (manually) change the mysql database with phpmyadmin. And did change the several php-files and tpl-files.

So far so good, but wenn i save the last file the buttons groups and calendar just disappear. And are not comming back before I changed the overall_header.tpl by removing the sentence with: <!-- BEGIN switch_group_on -->

Here is a list with code's:

Code: Select all
if ($view_pages_ary[''.GROUPS.'']['auth_view'])
{
    $template->assign_block_vars('switch_group_on', array());
}

In page_header.php


Code: Select all
// Added for Extra permission MOD
// Start auth check
//
$is_auth = array();
$is_auth = auth(AUTH_ALL, GROUPS, $userdata);

if( !$is_auth['auth_read'] )
{
    if ( !$userdata['session_logged_in'] )
    {
        $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
        header($header_location . append_sid("login.$phpEx?redirect=memberlist.$phpEx", true));
        exit;
    }
    $message = ( !$is_auth['auth_view'] ) ? $lang['Not_Authorised'] : sprintf ($lang['Sorry_no_auth'],$is_auth['auth_read_type']);
    message_die(GENERAL_MESSAGE, $message);
}
//
// End auth check
//

in groupcp.php


And afcourse:

Code: Select all
<!-- BEGIN switch_group_on -->
<td align="center" valign="middle"><a title="{L_USERGROUPS}" href="{U_GROUP_CP}" class="mainmenu" onmouseover="changeImages('btn_top_groups', 'templates/Aeolus/images/lang_{LANG}/btn_groups_on.gif'); return true;" onmouseout="changeImages('btn_top_groups', 'templates/Aeolus/images/lang_{LANG}/btn_groups.gif'); return true;"><img name="btn_top_groups" src="templates/Aeolus/images/lang_{LANG}/btn_groups.gif" height="23" border="0" alt="{L_USERGROUPS}" /></a></td>
<!-- END switch_group_on -->


Is there anyone that has a idee??

Thanks MIKE
Last edited by **MIKE** on Sat 04. Oct, 2003 14:42, edited 1 time in total.
**MIKE**
Poster
Poster
 
Posts: 3
Joined: Thu 18. Sep, 2003 10:15

Postby Niels on Thu 02. Oct, 2003 13:48

if ($view_pages_ary[''.GROUPS.'']['auth_view'])
{
$template->assign_block_vars('switch_group_on', array());
}


You shoulden't use GROUPS for the usergroup page, instead look in file constants.php to find the prober name - all starting with PAGE_

in this case, you should use
PAGE_GROUPCP

correct this, and it seam like you have done it corrctly :D
(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


Return to Extra permission [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron