PDA

View Full Version : How to add custom external data to postbit?


slimdude
02-11-2011, 02:00 PM
I'm trying to add some custom data to the postbit. From what I could gather so far, I need to create a plugin that gets this data, put it on a variable and then I have to create a postbit_custom template and call this variable.

We have an external table with relational information to each one of our vbulletin users, so to get this external data we send the $post['userid'] variable. So I created a plugin like this:

$external_data = file_get_contents("http://www.domain.com/api.php?userid =" . $post['userid']);

This will put the data we need on $external_data. So my questions are: Which one is the appropriate hook for this plugin for it to be called when rendering the postbit? And how do I activate the custom template and access this variable in it?

Thank you in advance.

Lynne
02-11-2011, 05:34 PM
I would try one of the postbit_display_* hook locations. You may be able to spit this out into a template_hook if you see one in the appropriate place in the template.