The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
Something like this:
PHP Code:
(Untested) |
#12
|
|||
|
|||
![]()
Ok, but would I need to include any files like global.php to get that to work?
- Pc1203 |
#13
|
|||
|
|||
![]()
Yes you will need to include the global.php file from the main forum directory.
|
#14
|
|||
|
|||
![]()
I just get a blank page. Here is my code:
Code:
<?php chdir('/home/penguink/public_html/forums'); require_once('/home/penguink/public_html/forums/global.php'); // Add the usual require stuff here $wanted_userid = 9; // The user id of the user you want the data from $userinfo = fetch_userinfo($wanted_userid); $posts = $userinfo['posts']; // $joindate = $userinfo['joindate']; // Unformatted $joindate = vbdate($userinfo['joindate']); // Formatted date e.g. Mon 29th Aug $joindate ?> EDIT2: When I look at join date I get "1177448760" for my user.... |
#15
|
|||
|
|||
![]()
You need to add the variables to a template
|
#16
|
||||
|
||||
![]()
You need to use the vbdate() function to convert the timestamp into a readable format.
|
#17
|
|||
|
|||
![]()
Ok, I did that and I'm still getting the same thing. Here is my code:
Code:
<?php chdir('/home/penguink/public_html/forums'); require_once('/home/penguink/public_html/forums/global.php'); // Add the usual require stuff here $wanted_userid = $_GET['u']; // The user id of the user you want the data from $userinfo = fetch_userinfo($wanted_userid); $posts = $userinfo['posts']; $username = $userinfo['username']; //$joindate = $userinfo['joindate']; // Unformatted $joindate = vbdate($userinfo['joindate']); // Formatted date e.g. Mon 29th Aug print "<h1>$username</h1>"; print "Posts: $posts"; print "<br />"; print "$username Joined On: $joindate"; ?> Pc1203 Posts: 1044 Pc1203 Joined On: 1177448760 - Pc1203 |
#18
|
|||
|
|||
![]()
This is how to use vbdate.
Code:
vbdate($vbulletin->options[dateformat], $userinfo['joindate']); |
#19
|
||||
|
||||
![]()
Sample query for profile fields:
Code:
$fields = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid =".$userid); Also, you should look into cleaning the variables you're using in queries - or you'll leave this page open to SQL injection. |
#20
|
|||
|
|||
![]()
Ok Thanks EnIgMa1234! The date works now. Any ideas on how to get some custom profile fields?
- Pc1203 EDIT: Ok, Kirk Y. I'll try that. Also you said I should change the variables, is that what you meant? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|