Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2005, 05:50 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Pre-approval of permissions solution? I'm stuck.

I can't figure out a solution to this issue and was direct here from the vBulletin forums...

We're about to open up our forums to a specific client's user group (about 120+ people). The access will be to a "private" forum we currently have set up.

The only way I can give user's permission to the private forum (that I know of) is to adjust thier permission as soon as they sign up...

...but that would obviously cause a delay in their access... and could be discouraging to their participation in the forum. For many of these users, it will be their first time accessing a forum community.

I do have a list of all of the groups emails and was planning on telling them all to use that email to sign up. I planning on trying to stay on top of it and going through and give the access as fast as possible.... but obviously, most will have left (and not seen all there is to see in the private forum).

So, is there a solution to this issue? It is early, so I can try anything...

Is there any way to "pre-allow" permissions to users that register with a specified email address?

Or any other solution to giving immediate access? Unfortunately, it is a private client area, so I can't leave it open to the public.

working with: vBulletin Version 3.0.7
Reply With Quote
  #2  
Old 07-27-2005, 05:59 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Easy approach:
- Create a Datastore Record with a comma-separated List of all eMail-Adresses
- Load this in register.php
- Upon Account activation, explode this list into an array, in_array($useremail, $list)
- If true, assign an additional Usergroup that has access rights
Reply With Quote
  #3  
Old 07-27-2005, 06:11 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks... I was scared someone might say that.

I really don't know any coding (I probably should have mentioned that in the original post)... I was just direct here from the main vbulletin site.

Actually, I think I understand exactly what you are telling me to do, I just wouldn't even know where to start to actually execute it. Thanks though.
Reply With Quote
  #4  
Old 07-27-2005, 06:51 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]INSERT INTO datastore (title, data) VALUES ('emaillist', 'email1@domain1.com,email1@domain2.com,email3@doma in3.com')
[/sql]

In register.php
FIND
PHP Code:
    'banemail'
); 
REPLACE that with
PHP Code:
    'banemail',
    
'emaillist'
); 
FIND
PHP Code:
// ### DO THE UG/TITLE UPDATE ### 
If you want an additional Usergroup:
ABOVE that ADD
PHP Code:
$emails explode(','$datastore['emaillist']);
if (
in_array($userinfo['email'], $emails) AND $user['usergroupid'] == 2)
{
    
$dotitle .= ", membergroupids=IF(membergroupids='', 'X', CONCAT_WS(',', membergroupids, 'X'))";

If you want another Primary Usergroup instead:
ABOVE that ADD
PHP Code:
$emails explode(','$datastore['emaillist']);
if (
in_array($userinfo['email'], $emails) AND $user['usergroupid'] == 2)
{
    
$user['usergroupid'] = X;

X must obviously be replaced with the Usergroupid that has access rights

Untested, but should work.
Reply With Quote
  #5  
Old 07-27-2005, 08:03 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What the heck... I'll give it a try... Thanks!
Reply With Quote
  #6  
Old 07-27-2005, 08:03 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm shouldn't that implode be an explode?
Reply With Quote
  #7  
Old 07-27-2005, 08:06 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me should call $vbulletin->get_some_sleep() soon ...
Of course it should have been explode()
Reply With Quote
  #8  
Old 07-27-2005, 08:24 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
[sql]INSERT INTO datastore (title, data) VALUES ('emaillist', 'email1@domain1.com,email1@domain2.com,email3@doma in3.com')
[/sql]
Quick question on the above... When I enter information into datastore, what does "(title, data)" reffer to? Is that something I should name specifically?

I've run a sql query once before, but it was on a different domain, and I believe the hosting company had a tool for it. I'm going through the instruction link now...

That is the only part that I'm really flying completely blind on.

Thanks.
Reply With Quote
  #9  
Old 07-27-2005, 08:27 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

title, data are the column names in the table, and should not be changed.
Reply With Quote
  #10  
Old 07-27-2005, 08:36 PM
BLykMik BLykMik is offline
 
Join Date: Jun 2005
Location: Los Angeles, CA
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks... i got it... it is "emaillist" that is the specific name for the datastore.
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 07:46 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.07221 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)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