PDA

View Full Version : How to display your vbulletin information on other sites


David Regimbal
06-15-2009, 05:00 PM
Hi everyone,

I was wondering how I could get my vbulletin information on a PHP file that's not connected to my site. I want to use it for an update sort of thing. Basically have:


<!--CUSTOM MESSAGE-->
<if condition="$vbulletin->options['testproduct_active']">

<div class=smallfont>
$post[username]
<em id="testproduct_$post[postid]">
$post[testproduct]
</em>
</div>


</if>
<!--END CUSTOM MESSAGE-->


But somehow have it outside of the Vbulletin site. To me it looks impossible, though I wante to check with other people before I gave up.

ForumsMods
06-15-2009, 05:04 PM
Use:
require_once('./global.php');
Also see:
https://vborg.vbsupport.ru/showthread.php?t=62164

David Regimbal
06-15-2009, 06:23 PM
Thanks for the fast reply! :) Now, Is it possible to show a specific user's information on this page? Like a <if condition="id#">content</if> sort of thing?

ForumsMods
06-15-2009, 06:28 PM
Yes, put require_once('./global.php'); and you will able to use vB Conditions.

David Regimbal
06-15-2009, 06:38 PM
Is there a Vb Condition that has a user's ID to show content on that user? Something like this:


<if condition="UserID">
$example
</if>

having "$example" being that users information

Dismounted
06-16-2009, 07:28 AM
$user = fetch_userinfo(1);
print_r($user);
exit;

David Regimbal
06-16-2009, 11:23 PM
Thank you very much! And for my last question for this thread :) (sorry for asking so many questions). I installed this product called vbStatus and was wondering how to get to the XML path? I tried this, but it didnt work in the PHP file:

$xml = simplexml_load_file($file);
$myvar = ($xml->options['vbstatus_defaultstatus']);

Dismounted
06-17-2009, 07:20 AM
Don't know how that modification works or what it is - you are best off posting inside the modification thread.

David Regimbal
06-17-2009, 02:45 PM
would there be a general location of all the vbulletin products in xml form?
Like: $vbulletin->products->
or $vbulletin->product['name']?

Dismounted
06-18-2009, 05:42 AM
Location?

David Regimbal
06-19-2009, 04:34 AM
Yeah

Dismounted
06-19-2009, 08:43 AM
I was actually asking for a clarification of "location". What are you referring to exactly?

Kintaro81
06-19-2009, 03:38 PM
Yes, put require_once('./global.php'); and you will able to use vB Conditions.


with this I can extract data from the db too? like extract last posts? or to do that I have to do a normal php connect to the vbulletin's db?

ForumsMods
06-19-2009, 06:12 PM
You can do it too.

David Regimbal
06-19-2009, 10:02 PM
I was actually asking for a clarification of "location". What are you referring to exactly?

Hi,

Just the most general location for the plugins $ products in xml form
I am not sure, but something like: $vbulletin->products->productname->...

Dismounted
06-20-2009, 03:58 AM
The XML is not stored anywhere. When products are imported, the XML is parsed and placed into the appropriate tables inside the database. The reverse happens when exporting.