View Full Version : Forum Home Enhancements - Access Forum Based On Value in User Profile Field
Description:
Users who have a field with a specific value set in their profile will have access to the forums that have been specified in the vBulletin options.
Example:
Explanation of the screenshot in English...
If a user has their Location (field2) set to Canada then they can post to forum id 73. If users do not have INTP for their Type (field5) then they will have read only access to it.
If a user has their Location (field2) set to USA AND have a minimum of 50 posts then they can post to forum id 74. If users do not have INTP for their Location (field2) then they will have read only access to it.
changelog:
0.1 - initial release
0.2 - display the real titles of the field options in vbulletin options select menus, have up to 2 field restrictions, updated screenshot.
0.3 - added the constraint that you could optionally require a minimum number of posts first, tiny code/plugin cleanups
0.3.1 - bug fix, my mistake
Bolas
01-06-2007, 11:21 PM
very intersting, I like it.
abramelin
01-07-2007, 12:52 AM
demo please.
FunaGuy
01-07-2007, 03:08 AM
Seems Interesting, Good Add-on ;)
demo please.
I don't have a test forum I would be willing to demo it on. The other people seem to understand it without a demo.
Here is an example in context..
let's when a user registers they choose whether they are male or female. the values for male/female are stored in the userfield table (e.g., in field5). Now let's say you only wanted people who specified "Male" then they would be allowed to post in the male forum but the females would only have read access. It will be easy to expand the number of field-profile-forum permissions, I just didn't do that during testing. I am still pretty new to vbulletin hacking but this plugin would probably be more intuitive if the drop down option in the vbulletin options area actually listed the real names of the different fields which I think I can do based on some code I was skimming through earlier... anyway, if anyone has actual comments/feedback I would be glad to hear it, thanks.
I have a few forums that would be better off as user optional.. This will work nicely for those.
Thanks
DeMagH
01-07-2007, 08:30 AM
just a couple of questions if i may ask:
- does this work only at registration or also changeable from the user profile?!
- I don't see multiple decisions, like if field5=USA then forums_id_to_view=9 10 11 elseif field5=Canada then forums_id_to_view=11 12 13, does it allow multiple decisions options?
EDITED:
now i read the code and i think i can allow multiple choices from the first line in the code, instead of x<2, make it x<5 or whatever number i want it to stop at+1, is that correct? I guess it just needs more explanation for ppl not into much coding as myself to show its full potential, looks very promising though.
just a couple of questions if i may ask:
- does this work only at registration or also changeable from the user profile?!
It is changeable from the user profile.. it uses the honor system but that is why I added in the ability to disallow users who would abuse the system.
- I don't see multiple decisions, like if field5=USA then forums_id_to_view=9 10 11 elseif field5=Canada then forums_id_to_view=11 12 13, does it allow multiple decisions options?
In the version I just uploaded, you can set two field restrictions.. the code can be modified to allow more field restrictions though.
EDITED:
now i read the code and i think i can allow multiple choices from the first line in the code, instead of x<2, make it x<5 or whatever number i want it to stop at+1, is that correct? I guess it just needs more explanation for ppl not into much coding as myself to show its full potential, looks very promising though.
yeah.. you're partly correct. the other part that would need to be changed is the vbulletin settings/options stuff which would need to be duplicated but that is simple. What number of field restrictions do you think would be useful to have? 5? 10?
Thanks for the feedback
DeMagH
01-09-2007, 01:59 AM
Thanks for your reply FCI, good to know i got something right :)
anyway, right now i am only interested in like 4 fields, but the main problem is i need country fields to be added regularly. Right now i support like 4 countries, 2 years or so from now i guess i'll be hitting 15 or something.
My main point, i need something that can be easily updated "countries+1", can this be done?
Note:
i really liked the part where the user can change this field from his profile.
Thanks for your reply FCI, good to know i got something right :)
anyway, right now i am only interested in like 4 fields, but the main problem is i need country fields to be added regularly. Right now i support like 4 countries, 2 years or so from now i guess i'll be hitting 15 or something.
My main point, i need something that can be easily updated "countries+1", can this be done?
Note:
i really liked the part where the user can change this field from his profile.
Ok, I have just attached a product/plugin thing that has 15 possible options. I'll update the main release later as there is some minor tweaks I'd like to do first. Please let me know how it works for you as it hasn't been thoroughly tested since it is my lunch break.
DeMagH
01-09-2007, 11:24 PM
thanks will give it a try later tomorrow and will report here later for sure.
thanks for your help and support, really appreciated.
Kalina
01-10-2007, 03:17 AM
I don't know if I misunderstood, but what I wanted was my members had to choose "yes" to see a specific forum. I still want them to see all the other forums, however, it caused my members to all see no forums at all, til they answered yes, did I do something wrong?
I only entered one ID, the ID of the forum you need to check off "yes" to see it.
Hi Kalina,
I had a bug in my code, I am sorry for the mess up, please try the latest version and let me know how it goes. Thanks.
DeMagH
01-15-2007, 11:49 PM
i gave it a shot, but the problem is it doesn't override the usergroup permission, which is cool, but the main problem is, i based all my forum sections on usergroup permission, will give it a try to mess things up whenever my apache server is ready for any further testing before changing anything major in my forums construction.
Will report here later, again ;)
i gave it a shot, but the problem is it doesn't override the usergroup permission, which is cool, but the main problem is, i based all my forum sections on usergroup permission, will give it a try to mess things up whenever my apache server is ready for any further testing before changing anything major in my forums construction.
Will report here later, again ;)
I'll need to regenerate it so it has the 15 options you'd need because there's a bug in the attachment I posted for you early..
DeMagH
01-16-2007, 12:27 PM
ok, please do as soon as possible as i was planning on testing it later today.
ok, please do as soon as possible as i was planning on testing it later today.
you'll have to wait for my lunch break.. about 3.5 hours
DeMagH
01-16-2007, 07:18 PM
ok will give it a shot, probably tomorrow though, too late now.
Thanks for the awesome support
DeMagH
02-06-2007, 03:54 PM
hey FCI, i've tried it and looks it is working perfectly, problem is i am receiving requests from new registrants to add some countries i didn't even know they exist. The requesters claim if their country is added, they'll tell their friends about the forums and stuff which would be great for building up traffic a bit more. My point is, what i need shouldn't be having a limit of 15, may be it'd reach someday to a full country list.
I am seriously considering switching the forums to work on this hack, but i have to ask a couple of questions though before taking this step:
- now if i ran my forums on the 15 fields version, will there be any sort of trouble updating it to the 25 field version "may be later on", like resetting every field choice to its forums AGAIN?!
- is there a clue about new releases of this patch adding fields with simple mods instead of you reconstructing the patch every time a field is added?!
finally, i am very sorry for my late feedback, getting married soon and some preparations should be taken care of.
el-Turki
03-15-2007, 10:30 PM
I installed it, but how can i actually USE it? Cant make out where to get the settings done...
kylek
04-01-2007, 06:59 PM
Just installed and works great with 3.6.5. Thank you for this, works great for setting up a gender specific only forum.
Something for the future if possible - setting to allow admins or one userid the ability to view if they dont have permission to.
COBRAws
08-24-2007, 03:29 AM
Sorry to bump, but Is there a way so I, the admin, can still access all those forums only certain usergroups can access? Because I just setup a Male/Female value, and now, I cant see the girls forum!
too weird, but excelent hack. Too bad most of vborg's missed it.
seldakan
03-04-2008, 03:54 PM
This works on 3.7 to...
Great Add-on!
toucan42
04-11-2008, 12:42 PM
This is exactly what I wanted! One question - can there be an override such that moderators or administrators can view regardless of profile field settings?
Chadi
05-14-2008, 05:04 PM
This is nice, but it would be great to have a 3rd permission for non-approved user option: no access, instead of hidden or read only.
oz_girl
05-27-2008, 01:53 AM
This is just what i was looking for, but as mentioned above ... need to have permission for the moderaters and admin to use both groups :)
Gio Takahashi
05-29-2008, 02:21 PM
Same, it would be nice for that. Administrator and super moderators should be able to override this.
almqdad
05-29-2008, 05:28 PM
hello
how would I know which field (fileld location ) for gender or any other thing
The D
08-03-2008, 07:17 PM
I reaaaally need this to work, but it won't work for me at all on 3.6.8.
I've set all the permissions to allow so the box can make the determination, but it still wouldn't work.
Any chance of getting this to work for 3.6.8? Please? With sugar on top? :)
COBRAws
10-26-2008, 11:39 AM
Some of my users realised that they could access the forums they shouldn't have access only by accessing the archive and going to that forum. They can read all the thread titles but cant read the content. So I had to disable this hack :(
itsheinz
03-05-2009, 10:26 AM
Is there any for 3.8.1 version?
EuroBeat2
03-05-2009, 11:34 AM
Is there any for 3.8.1 version?
Yes! I second this question! This hack would be very valuable for my needs.
EB
J105C
08-08-2009, 01:25 PM
WOW, this is the hack I need too! I am waiting for an updated version as well!
RWerksman
11-28-2009, 05:23 AM
Working on 4.0. :)
MyApple.pl
04-27-2010, 02:28 PM
Working on 4.0. :)
Are you sure?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.