The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
calling mysql fields into a .php webpage
Hey guys,
I currently am customizing my forum a fair bit. And i have got stuck on this problem. Situation: I have created a .php document that displays a youtube video and it works fine. What I want: I want this .php document to display a users youtube video, so i need to get the field from the database and make it so the .php document can call it and use the link from it to display the video. The server is called: 'localhost' The database is called 'db_vbulletin' The table is called 'userfield' The field is called 'field39' But saying this, the youtube video link will be different between users, so im not sure what kind of factor that would have. If i am posting in the wrong place or there is a better forum, please direct me. Thanks. Murty Bump |
#2
|
||||
|
||||
Bump
|
#3
|
||||
|
||||
Hi murty, If the youtube url is stored in a custom profile field within vbulletin, you should just be able to call the url with $vbulletin->userinfo['field39'] in your template as the url like:
<a href="$vbulletin->userinfo['field39']>youtube link</a> |
#4
|
||||
|
||||
Thanks for the reply antivirus.
But i just tried your idea, and it comes up with this first: Quote:
Quote:
|
#5
|
||||
|
||||
If you're using this in a template:
Code:
$bbuserinfo[field39] Code:
$vbulletin->userinfo['field39'] |
#6
|
||||
|
||||
Yeah, but im not using a plugin. I'm using a .php file in the forum root.
|
#7
|
||||
|
||||
If you've included global.php then the Plugin code I posted above should work.
|
#8
|
||||
|
||||
What do you mean, 'included global.php'?
|
#9
|
||||
|
||||
Code:
require_once('./global.php'); |
#10
|
||||
|
||||
hmm, not sure how this is meant to work, but it hasnt so...
Bump |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|