![]() |
|
#1
|
||||
|
||||
|
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?
|
|
#2
|
||||
|
||||
|
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> 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> 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
|
||||
|
||||
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.
|
|
#4
|
|||
|
|||
|
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? Last edited by shiva; 01-04-2005 at 10:17 PM. |
|
#5
|
||||
|
||||
|
Have you tried the fix posted in this thread?
http://www.vbadvanced.com/forum/showthread.php?t=2053 |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
|||
|
|||
|
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?
|
|
#8
|
|||
|
|||
|
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? |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|