
07-18-2012, 08:09 AM
|
 |
|
|
Join Date: Feb 2005
Location: UK
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Sarteck
Create a function, get_member_background($userinfo). Have it return the color you want. Define it in a plugin on global_complete or something.
Do you want to be able to call this function in a template? If so, add another plugin on the template_safe_functions hook, and then add your function name into the allowed functions for conditionals, like so:
PHP Code:
$safe_functions[] = 'get_member_background';
Now, in your Template, you could go something like,
HTML Code:
<vb:if condition="$post['background'] = get_member_background($post)"><div class="{vb:raw post.background}">
<vb:else />
<div class="userinfo">
</vb:if>
|
Oh thats a handy thing to know.
|