Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 27 Oct 2016, 17:50
gambler726 gambler726 is offline
 
Join Date: May 2016
Accessing DB in another script

I know little about writing VB scrips / mods, but I am trying to use the VB config.php to access the DB from another part of my site.

With the DB settings set to this in config.php...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

... can someone please help me write the connect code?

Let's say the config.sys file is in:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks!

Last edited by gambler726; 28 Oct 2016 at 02:31. Reason: correcting mysite.com
Reply With Quote
  #2  
Old 27 Oct 2016, 20:43
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
It depends on where you place your script.
If your script is in the root and your forum is located in /forum/ then you can connect doing something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

* Quickly wrote it without testing.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 27 Oct 2016, 21:10
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Originally Posted by Dave View Post
It depends on where you place your script.
If your script is in the root and your forum is located in /forum/ then you can connect doing something like:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

* Quickly wrote it without testing.
You must 'Like' someone else's post before liking any more by Dave.
+1!
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #4  
Old 28 Oct 2016, 22:12
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Based on what you want to do, you don't need to manually connect to the database but simply call the vB API externally from a different site that's on the same server.

Take a look at this blog on how to login to vB from an external site.

http://www.vbulletin.com/forum/blogs...n-your-website

It calls the user API to login and did not have to manually connect to vB database.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 02:13.

Layout Options | Width: Wide Color: