vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Attachment Descriptions (https://vborg.vbsupport.ru/showthread.php?t=80265)

Lionel 05-02-2005 07:33 PM

I simply placed this in postbit_attachmentthumbnail template
Quote:

<div align="left"> >$attachment[description]</div>

kmike 05-05-2005 09:05 AM

Small proposal: add another <if> to postbit_attachmentimage, to remove caption tooltip when description is empty.
Also, I added title parameter as it is more standards compliant than ALT (i.e. tooltip will work in Mozilla/Firefox, too).
Code:

###########################################################################################################################
# postbit_attachmentimage
###########################################################################################################################

---------------------------------------------------------------------------------------------------------------------------
FIND:
---------------------------------------------------------------------------------------------------------------------------

alt=""

---------------------------------------------------------------------------------------------------------------------------
REPLACE WITH:
---------------------------------------------------------------------------------------------------------------------------

alt="<if condition="!empty($attachment[description])">$vbphrase[attachdescription_caption] $attachment[description]" title="$vbphrase[attachdescription_caption] $attachment[description]</if>"


akanevsky 05-05-2005 08:55 PM

kmike,

I completely agree with you, thanks for sharing.
I will update the hack with your postbit_attachmentimage later on.

YLP1 05-06-2005 07:19 PM

Quote:

Originally Posted by Lionel
I simply placed this in postbit_attachmentthumbnail template

Where should this snippet of code go in this template? <div align="left"> >$attachment[description]</div>

I added a description to test it out on my forum and when I mouseover the graphic I get this:

Description: [ARG:4 Undefined]

Edited to add that I fixed the above..quite by accident LOL

Code:

In postbit_attachmentthumbnail my title part looks like this:
title="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[description]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>

But I still can't get the description to show under the thumbnail...

Any help is greatly appreciated.

akanevsky 05-06-2005 07:45 PM

It should be:
Code:

<div align="left">$attachment[description]</div>
instead of
Code:

<div align="left"> >$attachment[description]</div>

YLP1 05-06-2005 08:52 PM

Quote:

Originally Posted by Dark Visor
It should be:
Code:

<div align="left">$attachment[description]</div>
instead of
Code:

<div align="left"> >$attachment[description]</div>

Yep...I did change that but I still cannot get the description to appear under the thumbnail.

kmike 05-12-2005 11:06 AM

Quote:

Originally Posted by JimpsEd
I have it installed, but getting this script error after uploading something:

Line: 337
Char: 273
Unterminated string constant

Line 337 is:
Code:

        attachlist.innerHTML = "<div style=\"margin:2px\"><img class=\"inlineimg\" src=\"images/attach/rtf.gif\" alt=\"magnetic field questions.rtf\" border=\"0\" /> <a href=\"attachment.php?attachmentid=5&amp;stc=1\" target=\"_blank\">magnetic field questions.rtf</a> (758.2 KB)
Any ideas?

I got bitten by this, too. It appears IE doesn't like multi-line initializations in Javascript, so every multi-line descriptions will trigger this warning. Also you can 100% trigger this by placing unnecessary new line break in newpost_attachmentbit template.

I got it resolved by rolling back the change in newpost_attachmentbit template. I don't see why it is needed there at all.

akanevsky 05-12-2005 07:17 PM

I would suggest replacing your newpost_attachmentbit template and newpost_attachment templates to their vBulletin originals. Then this will work.

YLP1 05-12-2005 11:45 PM

Quote:

Originally Posted by Dark Visor
I would suggest replacing your newpost_attachmentbit template and newpost_attachment templates to their vBulletin originals. Then this will work.

I wasn't sure if this post was for me or the one just below mine...but I tried it anyway and I still cannot seem to place the caption of the attachment below the attachment.

Any ideas?

akanevsky 05-12-2005 11:56 PM

YLP1,

My post was addressed to kmike. About you, well you are placing the code in a wrong place... Place your code outside of the <img ...> tag. Right after it.


All times are GMT. The time now is 07:09 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01310 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete