Maybe a mod will move this to the Tips and Tricks forum...
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
2. In the style you want to add the avatar to, edit template vbcms_content_article_page and add where you want the avatar to show:
Important: Use my code at your own risk. I take no responsibility for any problems or data loss this may cause.
The vBCMS provides a user with the functionality to customize their site to meet their needs. I understand most users would prefer to have out of the box solutions to their needs but sometimes this is not always available. Luckily for us, we have the tools necessary to do the additions we want. As I go through customizing my site, I thought I would share some of the items I have done.
Add the authors avatar to the article page
1. Create a plugin:
Product - vBulletin CMS
Hook Location - vbcms_article_populate_end (vBulletin CMS)
Title - Whatever you like
Execution Order - 1
Plugin Code:
PHP Code:
require_once(DIR . '/includes/functions_user.php');
$avatarurl = fetch_avatar_url($this->content->getUserId());
if ($avatarurl[0]) {
$avatarurl = $avatarurl[0];
}
/* render template and register variables */
vB_Template::preRegister('vbcms_content_article_page',array('avatarurl' => $avatarurl));
Code:
<img src="{vb:raw avatarurl}" alt="Author Avatar" />
Comment