PDA

View Full Version : Quick Hook Question (postbit related)


TheMayhem
01-08-2010, 10:23 PM
I know in the old days and the easiest thing for me to do to get this to work would be to manually edit the postbit and postbit_legacy template's, add a condition statement and a little html and I'd be done. However, I'm trying to be a better coder then that and require no template edits because they can be...annoying.

So here's my question, I have in the user table the default column called:
customtitle
And I've added a column
market_ct_color

My conditional statement is:
if ($userinfo['market_ct_color']) {
$templater = vB_Template::create('market_ct_color');
$templater->register('userinfo', $userinfo);
}

That much I know. In short if market_ct_color has data in it I want it to fetch a template. What I'm not sure on is how I'd assign $userinfo['customtitle'] so that it equals whatever is inside that template. Then my last part is I'd like the updated customtitle variable inside userinfo to be displayed on the postbit. Basically, I am overwriting customtitle, updating the display so my data is inserted into post's instead of whatever is in the database.

Any help is much appreciated as this is my last step to releasing this little bugger.