View Full Version : Secondary Group Permissions Issue
RaceJunkie
10-05-2006, 01:32 PM
I don't allow regular members play the arcade. I only allow supporters or VIP members. If I set a regular members secondary group to VIP they still can't play the arcade, but if I set the primary group to VIP they can.
Note: When the users secondary permission is set to VIP the permissions work fine everywhere on the site, it's only the arcade that has the problem.
I am currently running the most recent version
ibProArcade v2.5.6+
:confused:
RaceJunkie
10-10-2006, 03:37 PM
Am i the only one?
RaceJunkie
10-15-2006, 02:49 AM
Am i the only one?
butty
10-30-2006, 04:43 PM
the arcade doesnt currently check the secondary usergroup mate, i was hoping that it would be sorted for 2.5.7+ but it doesnt seem to have
imo its a massive requirement of the plugin for those people having paid subscribers to the forum. as then it would allow us to offer more games in the arcade to those who are supporting the forums upkeep
mr zeropage tried a while ago briefly to sort this for me to no avail. maybe if we club together guys and sort out a decent sized donation then he may put some more time into sorting a fix out for this for us? id be willing to throw $25 in to the pot anyone else?
RaceJunkie
10-30-2006, 04:50 PM
the arcade doesnt currently check the secondary usergroup mate, i was hoping that it would be sorted for 2.5.7+ but it doesnt seem to have
imo its a massive requirement of the plugin for those people having paid subscribers to the forum. as then it would allow us to offer more games in the arcade to those who are supporting the forums upkeep
mr zeropage tried a while ago briefly to sort this for me to no avail. maybe if we club together guys and sort out a decent sized donation then he may put some more time into sorting a fix out for this for us? id be willing to throw $25 in to the pot anyone else?
I got $25 to offer as well. I can't believe no one else would not want this.:surprised:
wes_517
10-30-2006, 06:05 PM
I was looking for this too... I don't have extra money to chip in these days, but that was one of the first things I looked for (allowing admins to test it out before opening it up to the general userbase)
I normally have admins and mods as their secondary usergroups.
EasyTarget
10-30-2006, 07:08 PM
I have the same issue, my board relies heavily upon secondary usergroups.
maybe another nice feature to have would be per game settings where you could allow some games to be played exclusively by a certain usergroup while keeping the other games open to everyone.
sinisterpain
10-30-2006, 08:32 PM
I don't allow regular members play the arcade. I only allow supporters or VIP members. If I set a regular members secondary group to VIP they still can't play the arcade, but if I set the primary group to VIP they can.
Note: When the users secondary permission is set to VIP the permissions work fine everywhere on the site, it's only the arcade that has the problem.
I am currently running the most recent version
ibProArcade v2.5.6+
:confused:
This question has been answered in this thread https://vborg.vbsupport.ru/showthread.php?t=101554&page=151
MrZeropage
10-31-2006, 07:02 AM
Yes, you can easily switch from primary to secondary usergroup by opening /arcade/modules/mod_Arcade.php
it is explained there what to do :)
...feel free to drop the 25$ nevertheless *lol* :cool: ;)
butty
10-31-2006, 04:52 PM
Yes, you can easily switch from primary to secondary usergroup by opening /arcade/modules/mod_Arcade.php
it is explained there what to do :)
...feel free to drop the 25$ nevertheless *lol* :cool: ;)
i would gladly do. if it worked mate :) lol
that fix only uses either secondary or primary usergroup permissions. it doesnt use the permissions in the way the forum system does, which is a problem if your setting the usergourp permissions how you should. doh! :alien:
jiffy
10-31-2006, 09:20 PM
I'd be willing to kick in $20 for this. I have one forum that could use this. Switching to using only secondary user groups isn't really an option. It would be nice if it could function like other hacks where it looks to either the primary or secondary usergroup for the permissions. Not one or the other.
butty
11-02-2006, 05:54 PM
cool nice one mr jiffy. we got $70 up to now then in the pot is anyone else up for chipping in and givin mr zp a offer he cant refuse to sort this for us ;)
RaceJunkie
11-02-2006, 06:37 PM
With all the installs it has I can't believe there would not be more..
jiffy
11-06-2006, 10:53 PM
I got a PM from "Sarcoth" saying he got it sorted out and if I sent him my donation he would send me the details on fixing it. Anyone else get that PM?
I got a PM from "Sarcoth" saying he got it sorted out and if I sent him my donation he would send me the details on fixing it. Anyone else get that PM?
RaceJunkie
11-07-2006, 04:07 PM
I got a PM from "Sarcoth" saying he got it sorted out and if I sent him my donation he would send me the details on fixing it. Anyone else get that PM?
I got a PM from "Sarcoth" saying he got it sorted out and if I sent him my donation he would send me the details on fixing it. Anyone else get that PM?
I received the pm as well. There was no cost mentioned in the PM, only a link that I have not looked at yet. I don't want to do anything to dis-respect MrZero since he has put all the time into this mod. I will wait and see if he comes up with anything first.
MrZeropage
11-07-2006, 04:30 PM
I talked to him and it is no real fix, just a hardcoded solution to once make sure certain secondary usergroups are checked. For any changes you need to alter PHP-Files again ...
So this is not what I understand as a real "fix" or "addon" to make ibProArcade check both primary and secondary usergroups.
I will try to look on that particular thing (but a real fix) for the upcoming v2.5.8+ release but can't promise anything yet
RaceJunkie
11-07-2006, 11:35 PM
I talked to him and it is no real fix, just a hardcoded solution to once make sure certain secondary usergroups are checked. For any changes you need to alter PHP-Files again ...
So this is not what I understand as a real "fix" or "addon" to make ibProArcade check both primary and secondary usergroups.
I will try to look on that particular thing (but a real fix) for the upcoming v2.5.8+ release but can't promise anything yet
Well a look into is better than nothing at all. I don't mind doing any php edits for a temp fix, but before I spend the money on that I'll wait untill you release the next version.
butty
12-19-2006, 10:33 PM
mr zp. dya think there is any chance of you implementing this issue in any version soon? i really need this for my forums and have been looking 6 months. its cool if you have no plans to add it in the future just let me know and i can look at paying a coder to implement the feature for me
thanks for your time
MGSteve
01-13-2007, 01:41 AM
I can't believe it doesn't treat permissions in the same way that vBulletin does. Sadly, I've only just found out it doesn't work as it should after I've set everything else up, spending 3 hours in the process.
Likewise, I'll gladly donate $25 IF you get this to work correctly with vBulletin's permission system, frankly I'm amazed you haven't done so already, given the pledges on this thread.
Not to mention, I'd have thought the majority of people installing this system will want to tie it into the subscription system & thus the usergroups.
Erm, I think I've done it anyway! It didn't appear to be very hard to do - so I'm thinking I've missed something! But it appears to work on my setup anyway....
Delete this out of the mod_arcade.php file...
$DB->query("SELECT m.id, m.name, m.posts, m.arcade_ban, m.times_played, m.is_arcade_mod AS is_mod,
m.fav_games AS favs, m.user_sort, m.user_order, m.user_g_pp, m.membergroupids,
m.user_s_pp, m.def_g_cat, m.game_skin, m.arcade_mod_privs, m.arcade_pmactive, g.g_access_cp AS is_admin,
g.arcade_access, g.p_require, g.max_play, g.ppd_require, g.ibpa_cats AS allowed_categories
FROM ibf_members AS m
LEFT JOIN ibf_groups AS g
ON (m.mgroup = g.g_id)
WHERE id=".$ibforums->member['id']." LIMIT 0, 1");
$this->user = $DB->fetch_row();
// use ON (m.membergroupids = g.g_id) in above Query for secondary Usergroup
and replace with
// Mod by MGSteve to support vBulletin Secondary Groups.
// We don't limit the number of rows returned now, so we'll get one row for each usergroup they're
// part of. So, we save the first row as we did before, but we then go through & merge all the usergroup category
// permissions and save this in the allowed_categories field of the $this->user array.
$DB->query("SELECT m.id, m.name, m.posts, m.arcade_ban, m.times_played, m.is_arcade_mod AS is_mod,
m.fav_games AS favs, m.user_sort, m.user_order, m.user_g_pp, m.membergroupids,
m.user_s_pp, m.def_g_cat, m.game_skin, m.arcade_mod_privs, m.arcade_pmactive, g.g_access_cp AS is_admin,
g.arcade_access, g.p_require, g.max_play, g.ppd_require, g.ibpa_cats AS allowed_categories
FROM ibf_members AS m, ibf_groups AS g
WHERE
(m.mgroup = g.g_id OR m.membergroupids = g.g_id)
AND
id={$ibforums->member['id']}");
// Ok, how many rows have we got?
$nRowMax = $DB->get_num_rows();
$this->user = $DB->fetch_row();
if ($nRowMax > 1)
{
// No point doing this if we've only returned one row!!
for ($nRowCnt = 0;$nRowCnt < $nRowMax;$nRowCnt++)
{
if ($nRowCnt == 0)
// We've already got the first row!
$Row = $this->user;
else
$Row = $DB->fetch_row();
$Cats[] = $Row['allowed_categories'];
}
// Ok, now collapse the array down into a Comma Seperated String (as stored in the DB)
$Cats = implode(',',$Cats);
// And save this back over the allowed_categories field in the first row.
$this->user['allowed_categories'] = $Cats;
unset($Cats);
unset($Row);
unset($nRowCnt);
unset($nRowMax);
}
MrZeropage
01-13-2007, 07:24 AM
Thanks, will check this out and will integrate it in v2.5.9+ if everythink is ok with it :)
MrZeropage
01-13-2007, 07:55 AM
Hmmm, as I see it does merge the permissions for the categories, fine.
When about the other settings like "posts per day to play" ect. which setting does it take finally if you have set it different in primary and secondary usergroup(s) ?
Could anybody please test this out with more than 2 secondary groups, different settings per group ect and give feedback here ? THANKS
wastemytime
01-13-2007, 10:31 AM
I can't believe it doesn't treat permissions in the same way that vBulletin does. Sadly, I've only just found out it doesn't work as it should after I've set everything else up, spending 3 hours in the process.
Likewise, I'll gladly donate $25 IF you get this to work correctly with vBulletin's permission system, frankly I'm amazed you haven't done so already, given the pledges on this thread.
Not to mention, I'd have thought the majority of people installing this system will want to tie it into the subscription system & thus the usergroups.
Erm, I think I've done it anyway! It didn't appear to be very hard to do - so I'm thinking I've missed something! But it appears to work on my setup anyway....
Delete this out of the mod_arcade.php file...
$DB->query("SELECT m.id, m.name, m.posts, m.arcade_ban, m.times_played, m.is_arcade_mod AS is_mod,
m.fav_games AS favs, m.user_sort, m.user_order, m.user_g_pp, m.membergroupids,
m.user_s_pp, m.def_g_cat, m.game_skin, m.arcade_mod_privs, m.arcade_pmactive, g.g_access_cp AS is_admin,
g.arcade_access, g.p_require, g.max_play, g.ppd_require, g.ibpa_cats AS allowed_categories
FROM ibf_members AS m
LEFT JOIN ibf_groups AS g
ON (m.mgroup = g.g_id)
WHERE id=".$ibforums->member['id']." LIMIT 0, 1");
$this->user = $DB->fetch_row();
// use ON (m.membergroupids = g.g_id) in above Query for secondary Usergroup
and replace with
// Mod by MGSteve to support vBulletin Secondary Groups.
// We don't limit the number of rows returned now, so we'll get one row for each usergroup they're
// part of. So, we save the first row as we did before, but we then go through & merge all the usergroup category
// permissions and save this in the allowed_categories field of the $this->user array.
$DB->query("SELECT m.id, m.name, m.posts, m.arcade_ban, m.times_played, m.is_arcade_mod AS is_mod,
m.fav_games AS favs, m.user_sort, m.user_order, m.user_g_pp, m.membergroupids,
m.user_s_pp, m.def_g_cat, m.game_skin, m.arcade_mod_privs, m.arcade_pmactive, g.g_access_cp AS is_admin,
g.arcade_access, g.p_require, g.max_play, g.ppd_require, g.ibpa_cats AS allowed_categories
FROM ibf_members AS m, ibf_groups AS g
WHERE
(m.mgroup = g.g_id OR m.membergroupids = g.g_id)
AND
id={$ibforums->member['id']}");
// Ok, how many rows have we got?
$nRowMax = $DB->get_num_rows();
$this->user = $DB->fetch_row();
if ($nRowMax > 1)
{
// No point doing this if we've only returned one row!!
for ($nRowCnt = 0;$nRowCnt < $nRowMax;$nRowCnt++)
{
if ($nRowCnt == 0)
// We've already got the first row!
$Row = $this->user;
else
$Row = $DB->fetch_row();
$Cats[] = $Row['allowed_categories'];
}
// Ok, now collapse the array down into a Comma Seperated String (as stored in the DB)
$Cats = implode(',',$Cats);
// And save this back over the allowed_categories field in the first row.
$this->user['allowed_categories'] = $Cats;
unset($Cats);
unset($Row);
unset($nRowCnt);
unset($nRowMax);
} Hi, which Setup do you use, my secondary Usergroups (subscribers) have still no permissions to play.
Oh, i am sorry, it works with Categories...thanky you!
MGSteve
01-13-2007, 11:27 AM
Hmmm, as I see it does merge the permissions for the categories, fine.
When about the other settings like "posts per day to play" ect. which setting does it take finally if you have set it different in primary and secondary usergroup(s) ?
Could anybody please test this out with more than 2 secondary groups, different settings per group ect and give feedback here ? THANKS
Ah, I hadn't used posts per day etc.. so I don't know about those. Still, those aren't usergroup dependent, are they?
noppid
01-13-2007, 02:45 PM
We had a similar problem with the vBPicGallery Photo Gallery for vBulletin.
All it takes is a simple function to loop through the permissions and set each for the highest allowed settings.
Easily solved.
MrZeropage
01-13-2007, 11:07 PM
Ah, I hadn't used posts per day etc.. so I don't know about those. Still, those aren't usergroup dependent, are they?
There are several settings per Usergroup:
- can view/play arcade or not
- post count requirement
- post per day
- max. plays per day
- can create tournament
- category permissions
the last one is solved, but what about the others?
MrZeropage
01-14-2007, 10:58 AM
Ok, I now extended this and v2.5.9+ will fully support primary and secondary usergroup permissions for all those settings :)
MortysTW
02-03-2007, 06:11 PM
Alright, I got a group permissions that seems to fall into what you wanted tested.
Okay. I have various usergroups with various arcade permissions. I'll describe 2 to keep it simple.
When you have made 500 posts on the site you are promoted, as a SECONDARY group, with 50 game plays per day. Mind you this is a SECONDARY group.
If you become a PREMIUM MEMBER you get unlimited game plays and when you go PREMIUM your PRIMARY usergroup is PREMIUM and you still keep the 500+ Usergroup as your SECONDARY.
Problem is, seems like the restriction set on the SECONDARY is overriding the permissions of the PRIMARY "Premium" usergroup.
This is for game plays per day. Any ideas how to solve this?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.