Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Attachment Descriptions Details »»
Attachment Descriptions
Version: 1.01, by akanevsky akanevsky is offline
Developer Last Online: Feb 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 04-19-2005 Last Update: 04-23-2005 Installs: 22
DB Changes
 
No support by the author.

/*================================================= =====================*\
|| Attachment Descriptions for vBulletin 3.0.7
|| Author : Psionic Vision
\*================================================ ======================*/

What is this:
It enchances attachment upload interface with a new 'attachment description' field

Features:
  • Conveniently enchances attachment upload screen with the description field (see screenshots)
  • Displays attachment descriptions in:
    Attachment Manager, Post Edit (newthread, newreply, editpost) and Attachment List (in posts)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-02-2005, 07:33 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I simply placed this in postbit_attachmentthumbnail template
Quote:
<div align="left"> >$attachment[description]</div>
Reply With Quote
  #33  
Old 05-05-2005, 09:05 AM
kmike kmike is offline
 
Join Date: Oct 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>"
Reply With Quote
  #34  
Old 05-05-2005, 08:55 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kmike,

I completely agree with you, thanks for sharing.
I will update the hack with your postbit_attachmentimage later on.
Reply With Quote
  #35  
Old 05-06-2005, 07:19 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #36  
Old 05-06-2005, 07:45 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be:
Code:
<div align="left">$attachment[description]</div>
instead of
Code:
<div align="left"> >$attachment[description]</div>
Reply With Quote
  #37  
Old 05-06-2005, 08:52 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #38  
Old 05-12-2005, 11:06 AM
kmike kmike is offline
 
Join Date: Oct 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #39  
Old 05-12-2005, 07:17 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would suggest replacing your newpost_attachmentbit template and newpost_attachment templates to their vBulletin originals. Then this will work.
Reply With Quote
  #40  
Old 05-12-2005, 11:45 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #41  
Old 05-12-2005, 11:56 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


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. The time now is 12:21 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.04796 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete