vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v3.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2012, 11:39 AM
Morrus Morrus is offline
Member
 
Join Date: Feb 2004
Posts: 79
Default Why doesn't this code work? $news[avatarpath]

I can't figure out what's wrong with this bit of code in adv_portal_newsbits:

Quote:
<if condition="$news['attachment']">
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
$news[attachment]
</span>

<else />
<span style="float: left; margin: $stylevar[cellpadding]px $stylevar[cellpadding]px $stylevar[cellpadding]px 0px">
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$news[threadid]"><img align="$stylevar[left]" class="thumbnail" border="0" title="$news[title]" src="$news[avatarpath]"></a>&nbsp;
</span>

</if>
Basically, it should show the attachment if there is one; if not it should show the poster's avatar instead.

I only get a broken link for the avatar, though. Am I using $news[avatarpath] wrong?
Reply With Quote
  #2  
Old 06-08-2012, 05:16 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

That should give you the path to the avatar. What is the URL that appears if you view the properties of the broken image?
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #3  
Old 06-08-2012, 09:17 PM
Morrus Morrus is offline
Member
 
Join Date: Feb 2004
Posts: 79
Default

That's the weird thing. I get SRC="" when I inspect the element. No URL.
Reply With Quote
  #4  
Old 06-13-2012, 11:57 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

Are you sure the user who posted that news thread has an avatar?
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
  #5  
Old 06-14-2012, 08:27 PM
Morrus Morrus is offline
Member
 
Join Date: Feb 2004
Posts: 79
Default

The user was me.

I figured it out, though; it was something simple. It was the "show avatars" setting for the module - it needs to be switched on if you want to use avatars at all, not just if you want it to automatically display avatars as normal. I switched it on and cut out the original avatar display code, and all is fine now.
Reply With Quote
  #6  
Old 06-18-2012, 05:48 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default

Ahh, that would do it. If that setting is turned off then avatars are not queried from the database to save server resources.
__________________
Frequently Asked Questions
CMPS Users Manual

For vBadvanced software assistance, please use the support forums.
Unsolicted PMs, IMs, and email will not be responded to.
If you have a non-software related question or problem with your account, please submit a support ticket.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Standalone code don't work for VBadvanced (OFFERING $75.00 VIA PAYPAL for HELP) borderpatrol Module & Modification Discussion & Requests 9 05-16-2011 12:11 PM
Post BB code doesn't work properly in polls TsirhCitna Troubleshooting & Problems 3 09-16-2008 12:57 PM
Code does not work (ex. google search) hr66 Troubleshooting & Problems 3 01-29-2007 12:37 PM
How can i make this code work in member profiles? Jrofosho Feedback & Suggestions 1 12-05-2005 10:56 PM
news news template doesnot work jhons "How Do I..." Questions 2 09-21-2005 05:52 PM


All times are GMT -4. The time now is 02:14 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.