Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Access Forum Based On Value in User Profile Field Details »»
Access Forum Based On Value in User Profile Field
Version: 0.3.1, by fci fci is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.4 Rating:
Released: 01-06-2007 Last Update: 01-09-2007 Installs: 39
Uses Plugins
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-06-2007, 11:21 PM
Bolas's Avatar
Bolas Bolas is offline
 
Join Date: Jan 2003
Location: Venice
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very intersting, I like it.
Reply With Quote
  #3  
Old 01-07-2007, 12:52 AM
abramelin abramelin is offline
 
Join Date: Mar 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

demo please.
Reply With Quote
  #4  
Old 01-07-2007, 03:08 AM
FunaGuy's Avatar
FunaGuy FunaGuy is offline
 
Join Date: Dec 2005
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems Interesting, Good Add-on
Reply With Quote
  #5  
Old 01-07-2007, 05:59 AM
fci fci is offline
 
Join Date: Nov 2004
Location: Twin Cities, MN
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abramelin View Post
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.
Reply With Quote
  #6  
Old 01-07-2007, 06:10 AM
Reef Reef is offline
 
Join Date: May 2003
Location: USA
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a few forums that would be better off as user optional.. This will work nicely for those.

Thanks
Reply With Quote
  #7  
Old 01-07-2007, 08:30 AM
DeMagH DeMagH is offline
 
Join Date: Oct 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 01-07-2007, 06:55 PM
fci fci is offline
 
Join Date: Nov 2004
Location: Twin Cities, MN
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DeMagH View Post
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.

Quote:
- 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.

Quote:
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
Reply With Quote
  #9  
Old 01-09-2007, 01:59 AM
DeMagH DeMagH is offline
 
Join Date: Oct 2006
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 01-09-2007, 04:41 PM
fci fci is offline
 
Join Date: Nov 2004
Location: Twin Cities, MN
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DeMagH View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06340 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete