vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Add-On Modules & Modifications

 
 
Thread Tools Display Modes
  #1  
Old 09-13-2004, 01:34 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default [REQUEST] Attachment or avatar in new message template

OK, I'm trying to combine two different ideas and I'm hoping somebody has done this already....

By default vBa CMPS has an option to display the poster's avatar in the message and there are various mods to display any attachments in the message. What I'd like to do is combine the two options so that when a message shows on the main portal page that the picture embedded in the message is either the attachment if there is one but if there is no attachment then to show the poster's avatar.

To flip the question around, if I turn on the option to show the poster's avatar then the avatar would be shown unless there is an attached pic in which case the attached pic would be shown instead.

Thoughts?
__________________
Sci-Fi | Walking Dead Forum
  #2  
Old 09-13-2004, 02:01 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: [REQUEST] Attachment or avatar in new message template

I haven't tested this, but it should work...

In your 'adv_portal_newsbits' template find and remove:
Code:
<if condition="$news['attachmentid']">
			<tr class="alt1">
				<td>
					<fieldset class="fieldset">
					<legend>Attached Files</legend>
					<table>
						$attachment
					</table>
					</fieldset>
				</td>
			</tr>
		</if>
Then find:
Code:
<if condition="$vba_options['portal_news_showavatar'] AND $newsavatarurl">
				<table align="$stylevar[left]" cellspacing="4"><tr><td><img alt=""  border="0" src="$newsavatarurl" title="$news[postusername]'s $vbphrase[a_avatar]" /></td></tr></table>
			</if>
And replace it with:
Code:
<if condition="$news['attachmentid']">
<table align="$stylevar[left]" cellspacing="4"><tr><td>$attachment</td></tr></table>
<else />
<if condition="$vba_options['portal_news_showavatar'] AND $newsavatarurl">
				<table align="$stylevar[left]" cellspacing="4"><tr><td><img alt=""  border="0" src="$newsavatarurl" title="$news[postusername]'s $vbphrase[a_avatar]" /></td></tr></table>
			</if>
</if>
  #3  
Old 09-13-2004, 02:39 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: [REQUEST] Attachment or avatar in new message template

Thank you! Hopefully I'll have a chance to test that this afternoon on the test site, else I'll do it tonight from home.
__________________
Sci-Fi | Walking Dead Forum
  #4  
Old 01-04-2005, 10:13 PM
shiva shiva is offline
Member
 
Join Date: Oct 2004
Posts: 47
Default Re: [REQUEST] Attachment or avatar in new message template

I tried this, but it didn't show a image thumbnail, just a direct link to that file. It's a jpg file. I like this as it means people can upload a screenshot first, and it would be displayed and linked.
Any way to turn that link into a thumbnail, or am I just missing something somewhere?

Sure nice not to have the same user avatar for the front page.

Oh something else: any way to set it so it will only display a image file, and not files like zip etc?
__________________
shivaSite
Pinball - The silverball addiction

Last edited by shiva; 01-04-2005 at 10:17 PM.
  #5  
Old 01-05-2005, 09:40 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: [REQUEST] Attachment or avatar in new message template

Have you tried the fix posted in this thread?
http://www.vbadvanced.com/forum/showthread.php?t=2053
  #6  
Old 01-05-2005, 02:57 PM
shiva shiva is offline
Member
 
Join Date: Oct 2004
Posts: 47
Default Re: [REQUEST] Attachment or avatar in new message template

I missed this, but it works. Thanks a lot, this should make a lot of my members happy, they can post news on their releases and include a screenshot of their game.
Big thanks.
__________________
shivaSite
Pinball - The silverball addiction
  #7  
Old 01-06-2005, 07:52 PM
shiva shiva is offline
Member
 
Join Date: Oct 2004
Posts: 47
Default Re: [REQUEST] Attachment or avatar in new message template

Ha, missed this until I logged in to my site as a guest. It shows links, including zip files now. No biggie though, as the permissions will prevent them from grabbing them, but is there a way to set a permission in that code so just the thumbnail will display, or code to remove the attachment from view if your a guest?
__________________
shivaSite
Pinball - The silverball addiction
  #8  
Old 02-14-2005, 07:34 PM
shiva shiva is offline
Member
 
Join Date: Oct 2004
Posts: 47
Default Re: [REQUEST] Attachment or avatar in new message template

Another problem.

Sometimes, VB gets confused and changes the orders of the attachments if you load up more than one at a time. In other words, loading in a image in the first box, and a zip in the second box, the thumbnail won't show on the front page, VB "swaps" the attachment orders. You can upload in the screenshot first, and once it finishes, THEN upload the zip, and that works, but that's the only way, and it confuses my members when I try and explain it.

Anyway the system will just display the first screenshot it finds, and totally ignore any other files, or any code that makes sure that in multiple attachment uploads that it keeps the order set?
__________________
shivaSite
Pinball - The silverball addiction
 


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


All times are GMT -4. The time now is 11:26 PM.

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.