PDA

View Full Version : Latest vbblog entry (title/link) in postbit and/or $vbulletin->userinfo


Greg-J
06-03-2008, 09:49 PM
I've spent a considerable amount of time on this so far, but I'd really appreciate the help of some of you seasoned vb modders.

My goal is two fold.


I want to be able to display the users latest vbblog post title as the anchor text as a link to their blog.
I want to be able to add this information to the $vbulletin->userinfo class so I can access it outside of vbulletin.


1) I'd like to do this properly with a product, and I can figure that part out on my own I'm sure - but I haven't the foggiest on the best way to get this information. I am already using a carp plugin for external rss feeds and while I'm sure I could double it up fairly easily, it seems silly to use carp or magpie to pull a feed from the blog when I have access to the database.

2) I've spent some time poking around and am unsure about where the $vbulletin->vbblog class is populated. Currently I am working with the following code:
<?php

$curdir = getcwd();
chdir('./forum/');
require_once('global.php');
require_once(DIR . '/includes/functions_bigthree.php');
require_once(DIR . '/includes/blog_init.php');
chdir($curdir);

print_r($vbulletin->vbblog);

?>

As you can imagine, $vbulletin->vbblog returns empty. I do not know why, so help here would also be appreciated.

However, my biggest priority is getting that blog title in the postbit.

Dismounted
06-04-2008, 09:22 AM
Just query the database - much easier.