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 04-17-2006, 10:51 PM
arossphoto arossphoto is offline
 
Join Date: Jan 2006
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default log-in to non-vb pages using vb passwords?

Before I purchased vBulletin I asked a question in the pre-sales forum about creating a login page for a php/mysql directory I created using the vbulletin username and passwords. I was told at that time that it would be pretty easy to do. I want to get started on this now, but I haven't been able to find any more info about doing this.

What I have is a member directory for photographers that is searchable by speciality, location, name, etc. I currently have to maintain all the listings myself, so I would really like members to be able to update their own listings and log-in using their vBulletin username and password.

Any advice would be much appreciated.

Thanks,

Andrew
Reply With Quote
  #2  
Old 04-30-2006, 01:38 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Andrew, logins on external pages are simple IF there isn't already a login system for the page. If there's not, you simply require global.php at the top of the file. You can check what usergroup the user is in and allow permission to certain functions based on that info.
Reply With Quote
  #3  
Old 04-30-2006, 02:49 AM
arossphoto arossphoto is offline
 
Join Date: Jan 2006
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your response Amy. I've already installed the Deluxe vB User login and I understand a little bit about how you can use global.php.

However, I'm not sure how I'm supposed implement something like that with my current member database. What I'm trying to do is allow users to login and edit their details in our member directory using on their forum username and password. It's very important that they only be able to access their record in the database, so I think it would have to based on user id or something similar.

I also imagine I would have to modify my contact table and ad some of the vB info like username or userid so I can restrict access, wouldn't I?

I started working on this when I was using Ikonboard, and one of the main reasons I switched to vB is I was told this could easily be done and would take about 5 minutes of coding.

I'm no coder, but with a little direction I can usually figure some of this stuff out.

Any further advice would be much appreciated.

Thanks,

Andrew
Reply With Quote
  #4  
Old 05-02-2006, 01:03 PM
arossphoto arossphoto is offline
 
Join Date: Jan 2006
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate to complain, but when I asked this question prior to purchasing vBulletin three or four people responded telling me how easy it was to do.

Now that I've bought it and want to do this all I get is silence.

What's up with that?

Andrew
Reply With Quote
  #5  
Old 05-02-2006, 01:17 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Andrew, with your existing member database, do you plan to add more members to it?
What is the unique identifier for those logins? Is it a name or a number?

What I would probably do, to make things simple, is to create a new custom profile field in the admincp. Fill that field with the login name or id from your other table.

Then, all you have to do is check for $user[fieldx] and restrict based on that.

It becomes more complicated if you're still adding users to the old database.
Reply With Quote
  #6  
Old 05-02-2006, 01:45 PM
arossphoto arossphoto is offline
 
Join Date: Jan 2006
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Amy,

I'm the only one who has access to the current directory, so I add all new listings and make changes to current ones as required. So I have one central password that give me access to all records.

I will be adding new members and I was thinking it's probably best and easiest for me to create each new listings and then give members access to make any changes to their own listing. There less than 50 records right now, so it wouldn't be too hard to add a field to the current database table if that's necessary.

So instead of adding a custom field to the vB profile, what if I added the vB username or id to the current contact table when I create a new record?

I only add listings for members who have purchased a paid subscription, so ideally I'd like to have the listings visible in the directory based on the member's usergroup. So if they don't renew their subscription their listing is dropped from the directory. But maybe that's asking too much right now

Thanks again,

Andrew
Reply With Quote
  #7  
Old 05-02-2006, 01:49 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it an all or nothing thing with the old database? I mean, if they are in the database, do you want them to have access? Or, are there different levels of access?
Reply With Quote
  #8  
Old 05-02-2006, 01:54 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think going the custom field route in vbulletin will be easier. but it'll work either way. As long as you can corrolate which forum member = which custom script member, you'll be fine.
Reply With Quote
  #9  
Old 05-02-2006, 02:24 PM
arossphoto arossphoto is offline
 
Join Date: Jan 2006
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
Is it an all or nothing thing with the old database? I mean, if they are in the database, do you want them to have access? Or, are there different levels of access?
I only want them to be able to edit their own record. They can't have access to anyone elses.

Quote:
Originally Posted by amykhar
I think going the custom field route in vbulletin will be easier. but it'll work either way. As long as you can corrolate which forum member = which custom script member, you'll be fine.
The only thing that bothers me about the custom field route is I think it would create two steps for me whenever I have to create a new record. Wouldn't I first have to make a new record in the database, then go into the user's vB profile and add info into the custom field.

On the other hand, if I just put their username or id into the new record I could just email them and let them login and do the rest.

Either way, I'm still not sure how I would create the log-in. Can I use the Deluxe vB User login mod? The example below restricts access based on usergroup. Would you just edit it this somehow to restrict by userid?

Code:
<?php
if ($vbulletin->userinfo['usergroupid'] == '6' )
    {
    echo "This is only visible to people in usergroup 6";}
    ?>
I guess the login page would also have to pass a variable like userid on to the page that retrieves the member's listing, that's also why I thought it might be better to add the userid or username to the contact table.
Reply With Quote
  #10  
Old 05-02-2006, 06:55 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a script on one of my sites that I curently don't have integrated but the directions here make me want to give it a try...
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:22 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.11025 seconds
  • Memory Usage 2,264KB
  • Queries Executed 13 (?)
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
  • (1)bbcode_code
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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