Quote:
Originally Posted by imnomarty
Hmm, its still not working. Do i have to enable something?
|
You do have to enable the plugin by going to Plugins & Products->Plugin Manager, scroll down to your plugin and enable it.
Lynne: This is working for me, now I also want to show the avatar on the CMS preview on the home page. What are the steps that I take to register the variable to work on: vbcms_content_article_preview?
Thanks.
--------------- Added [DATE]1337101605[/DATE] at [TIME]1337101605[/TIME] ---------------
Nevermind, this worked:
Code:
vB_Template::preRegister('vbcms_content_article_preview',array('avatarurl' => $avatarurl));
Now my question is, if the person has an avatar the avatar shows, if they don't have one, then text shows up that says: "Author Avatar". I do not want that text to show up, I would like to show a blank avatar picture if the user doesn't have one, sort of like what shows on the blog page if a user doesn't have an avatar. How would I accomplish this?
--------------- Added [DATE]1337102608[/DATE] at [TIME]1337102608[/TIME] ---------------
I tried this:
Code:
<vb:if {vb:raw avatarurl}!="">
<br /><img src="{vb:raw avatarurl}" alt="Author Avatar" /> <br />
<vb:else />
<img src="images/misc/unknown.gif" />
</vb:if>
but I get "an empty or invalid if condition was found. What is wrong with this, can you help me change this so that the unkown.gif shows if a user does not have an avatar? thanks.
--------------- Added [DATE]1337102888[/DATE] at [TIME]1337102888[/TIME] ---------------
This worked, sorry I asked my question too soon:
Code:
<vb:if condition="$avatarurl != ''">
<br /><img src="{vb:raw avatarurl}" alt="Author Avatar" /> <br />
<vb:else />
<br /><img src="images/misc/unknown.gif" /> <br />
</vb:if>