|
Page 1 of 1
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Setting Advanced Group Permissions FAILED
I am curently using the following:
Version of Icy Phoenix: 1.2.0.27
Version of phpBB: 2.0.23
Version of PHP: 4.4.8
Version of MySQL: 4.1.22-standard-log
Here is my problem:
Currently I have set my Forums and Sub-Forums for the most part private to allow a greater more advanced control. I then go to Groups >> Permissions >> ( selected group ) >> Advanced Mode. I make my changes and submit. I am then redirected to the Group Permissions Control and nothing has changed and the Group Permissions Control does not allow me to go back into any of he groups unless I use the left navigation, even then, the advanced mode permissions haven't changed. Yet I can set the simple permissions just fine and they take. However for my forums use I require specific permissions per group.
So, where do I start to fix this problem.
Last edited by d16174l4n63l on Thu 28 Aug, 2008 12:18; edited 2 times in total |
#1 Thu 14 Aug, 2008 04:01 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Re: Setting Advanced Group Permissions FAILED
So I went so far as to patch up to 1.2.0.27C and again. I tried doing user specific advanced permissions as a work around and the group advanced permissions again and it all goes back to group permissions control page. Any suggestions I would appreciate.
Last edited by d16174l4n63l on Thu 28 Aug, 2008 12:19; edited 2 times in total |
#2 Tue 26 Aug, 2008 22:19 |
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Re: Setting Advanced Group Permissions FAILED
Alright, now I have found where the limitation of the problem is and I think this may be a bug as I have tested it on several installations on multiple servers.
I am limited to three categories or forums, with at the most five sub forums each. After that it goes to the behavior described in the first post when trying to set private permissions to well any user, or group.
I am using a stock, 1.2.0.27c fresh install now and teh behavior hasn't changed. I've checked my files over and over, checked the database, cleared the cache, searched these forums for hours upon end, hell I even spent time with my provider.
I've been talking to myself for about fourteen days now, and I hope that my reporting hasn't gone to waste.
With my forum I require multiple category's / forum's with some sections having Sub-Forums. I am fairly experienced at modding, and reading code, I just cannot seem to find the problem.
Some please help me fix this.
|
#3 Thu 28 Aug, 2008 12:16 |
|
novice programmer 
Joined: June 2007
Posts: 1030
Location:
|
 Re: Setting Advanced Group Permissions FAILED
I will tag it as bug...
I cannot provide you help. Can you paste the file code (using spoilers), please?
|
#4 Thu 28 Aug, 2008 15:09 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: BUG - Setting Advanced Group Permissions FAILED
I didn't add this code to 027c because I couldn't test it completely.
Can you confirm that this code solved all your problems?
I will try to have a further look when I have time.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#6 Fri 29 Aug, 2008 23:00 |
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Re: Setting Advanced Group Permissions FAILED
I can confirm that it fixes the issue. I tested it thoroughly, anyone else like to confirm?
|
#7 Sat 21 Mar, 2009 17:58 |
|
novice programmer 
Joined: June 2007
Posts: 1030
Location:
|
 Re: BUG - Setting Advanced Group Permissions FAILED
|
#8 Sat 21 Mar, 2009 19:32 |
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Re: Setting Advanced Group Permissions FAILED
hal900's previously linked fix corrected the problem with the advanced permissions problem. When you have too many forums, the advanced permissions for forums doesn't hold it's values ( private, reg, mod, admin). instead you get sent back to the forum permission selection screen.
Using his fix from the thread below, instead of trying to do it all at once, it only updates the changes made to the permissions and fixes the problem.
del_unchanged_selects.js
Unable To Edit Group Permissions With Too Many Forums by hal9000 under the General Support Section.
Ok, I think I got it working, so here we go with the modifications.
1) First of all upload the attached "del_unchanged_selects.js" file to "/templates/common/js". This is the content of that file:
- var select_id = new Array();
- var select_value = new Array();
-
- function remove_object(id)
- {
- e=document.getElementById(id);
- e.parentNode.removeChild(e);
- }
-
- function save_initial_values()
- {
- my_form=document.getElementById('acl_form');
- el=my_form.elements;
- for (i=0; i<el.length; i++)
- {
- if (el[i].type == 'select-one' && el[i].id != '')
- {
- select_id.push(el[i].id);
- select_value.push(el[i].value);
- }
- }
- }
-
- function remove_unchanged_selects()
- {
- for (i=0; i<select_id.length; i++)
- {
- s=document.getElementById(select_id[i]);
- if (s.value == select_value[i])
- {
- remove_object(select_id[i]);
- }
- }
- }
-
- if (window.attachEvent)
- {
- window.attachEvent("onload", save_initial_values())
- }
- else
- {
- window.onload = save_initial_values();
- }
2) Apply the changes to the file "admin_ug_auth.php":
- #
- #-----[ OPEN ]------------------------------------------
- #
-
- adm/admin_ug_auth.php
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- for($j = 0; $j < count($forum_auth_fields); $j++)
- {
- $auth_field = $forum_auth_fields[$j];
-
- while( list($forum_id, $value) = @each($_POST['private_' . $auth_field]) )
-
- #
- #-----[ BEFORE, ADD ]------------------------------------------
- #
-
- $used_forums = array();
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- for($j = 0; $j < count($forum_auth_fields); $j++)
- {
- $auth_field = $forum_auth_fields[$j];
-
- while( list($forum_id, $value) = @each($_POST['private_' . $auth_field]) )
- {
-
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
-
- if ( !isset($used_forums[$forum_id]) )
- {
- $sql = ( $mode == 'user' ) ? "SELECT aa.*, g.group_single_user FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE. " g WHERE ug.user_id = $user_id AND g.group_id = ug.group_id AND aa.group_id = ug.group_id AND aa.forum_id = $forum_id AND g.group_single_user = 1" : "SELECT * FROM " . AUTH_ACCESS_TABLE . " WHERE group_id = $group_id AND forum_id = $forum_id";
- if ( !($result = $db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, "Couldn't obtain user/group permissions", "", __LINE__, __FILE__, $sql);
- }
- if ($row=$db->sql_fetchrow($result))
- {
- for ($k=0; $k < count($forum_auth_fields); $k++)
- {
- $change_acl_list[$forum_id][$forum_auth_fields[$k]]=$row[$forum_auth_fields[$k]];
- }
- }
-
- $used_forums[$forum_id]=1;
- }
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- ( isset($auth_access[$forum_id]['auth_mod']) && $change_mod_list[$forum_id] != $auth_access[$forum_id]['auth_mod'] ) ||
-
- #
- #-----[ BEFORE, ADD ]------------------------------------------
- #
-
- isset($change_mod_list[$forum_id]) && (
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- ( !isset($auth_access[$forum_id]['auth_mod']) && !empty($change_mod_list[$forum_id]) )
-
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
-
-
- )
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- $optionlist_acl = '<select name="private[' . $forum_id . ']">';
-
- #
- #-----[ REPLACE WITH ]------------------------------------------
- #
-
- $optionlist_acl = '<select id="private_id_' . $forum_id . '" name="private[' . $forum_id . ']">';
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- $optionlist_acl_adv[$forum_id][$k] = '<select name="private_' . $field_name . '[' . $forum_id . ']">';
-
- #
- #-----[ REPLACE WITH ]------------------------------------------
- #
-
- $optionlist_acl_adv[$forum_id][$k] = '<select id="private_id_' . $field_name . '_' . $forum_id . '" name="private_' . $field_name . '[' . $forum_id . ']">';
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- $optionlist_mod = '<select name="moderator[' . $forum_id . ']">';
-
- #
- #-----[ REPLACE WITH ]------------------------------------------
- #
-
- $optionlist_mod = '<select id="moderator_id_' . $forum_id . '" name="moderator[' . $forum_id . ']">';
-
3) Apply the changes to the file "auth_ug_body.tpl":
- #
- #-----[ OPEN ]------------------------------------------
- #
-
- templates/common/ACP/auth_ug_body.tpl
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- <form method="post" action="{S_AUTH_ACTION}">
-
- #
- #-----[ REPLACE WITH ]------------------------------------------
- #
-
- <form id="acl_form" method="post" action="{S_AUTH_ACTION}" onsubmit="remove_unchanged_selects()">
-
- #
- #-----[ FIND ]------------------------------------------
- #
-
- </form>
-
- #
- #-----[ AFTER, ADD ]------------------------------------------
- #
-
- <script type="text/javascript" src="{FULL_SITE_PATH}{T_COMMON_TPL_PATH}js/del_unchanged_selects.js"></script>
-
And that’s all. Now a large amount of forums only will cause the problem if too many of values are changed at the same time, what is less probable to happen.
|
#9 Sat 21 Mar, 2009 19:47 |
|
novice programmer 
Joined: June 2007
Posts: 1030
Location:
|
 Re: BUG - Setting Advanced Group Permissions FAILED
How many forums are we talking around?
I am about to move it to bugs section, but in order to have all info, I will await for the it.
|
#10 Sat 21 Mar, 2009 20:26 |
|
d16174l4n63l 
Joined: July 2008
Posts: 25
|
 Re: Setting Advanced Group Permissions FAILED
My highest count was 5 forums, before applying this fix.
|
#11 Sun 22 Mar, 2009 17:38 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: BUG - Setting Advanced Group Permissions FAILED
Thanks for reporting, I should have integrated this as well... as soon as the new RC is out, can you please test it for me and confirm that it is working fine?
Another suggestion for those who are having problems with it... please use FireFox, as it as an higher _POST var capability than other browsers.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#12 Wed 01 Apr, 2009 12:36 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|