![]() |
Attachment Descriptions
/*================================================= =====================*\
|| 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:
|
Just a couple questions. Does this add another query also can you give a screenshot off thread with an attachment ?
|
No, it does not add any additional queries at all :)
Yes, I can post the screenshot. One second please... EDIT: Screenshot has been added. |
?: does this work with multiple attachements popup?!...
(when you add the attachments) |
It works perfectly with the standard vB3 attachment engine.
|
Dark Visor you are the best. A thousand thank you. The vbulletin developper owe you one. For 2 or 3 years they have been trying to do that one. They even had the unused description field in attachment table. When I questioned them about it, no straight answer could be given.
I installed it, tested, edited deleted, changed attachment in same post, beat it up etc... that description behaved exactly like you said. For months I have been trying to do this. One thing, you might want to correct the "alter table add" statement since it is already there. I just replaced the existing varchar with TINYTEXT For my need, I also placed it under thumbnail, not just the "alt". Let me bother you with one question, if you are familiar with vbadvanced news.php module. How to display it in front page too? |
Oh My. This could be real handy to say the least. Quick question.
Ability to have multiple fields? I have a lot of file uploads, would be nice to state the author, and a couple other fields. Also, if there was one thing the attachment system needed, it's the ability to use a URL instead of uploading a file. I have ton's of files needed to be added on my server, and a very slow connection. If you can ever figure that out, many people would be very happy, as it's requested a lot. Looks awesome. |
Fantastic idea.
|
Well done.
Ticked install :) |
Incompatiable with the Geek Article System 3.5.0 I think, which makes use of the column "description" in the table attatchments.
|
Quote:
|
Both running together well?
|
Quote:
|
Quote:
Quote:
2. In news.php, find: Code:
iif ($vba_options['portal_news_showattachments'], ', attachment.filename, attachment.filesize, attachment.visible, Code:
iif ($vba_options['portal_news_showattachments'], ', attachment.filename, attachment.filesize, attachment.visible, attachment.description, Quote:
Quote:
Quote:
Thanks everyone for positive comments :) |
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&stc=1\" target=\"_blank\">magnetic field questions.rtf</a> (758.2 KB) |
Quote:
|
Make sure you did everything right. If you get outside the DIV, you get that error...
|
Ah, I always put a comment in templates when I use a hack that modifies them, such as;
<!-- attatch descript hack edit above --> Don't know what template did not like this, but it was one. Removed all comments and working fine :) |
Quote:
I told him about it so he should not be bothered working on it. |
The attachemnt description field in gas was provisioned for future release. If you have installed GAS 3.x than you will already have an description field in your attachment table. I hadnt yet put the UI in place for it (and now I dont! :) ). I pushed it into the first 3.0 release so I could import v3articles and keep their descrptions.
This hack should be totally compatible. You may get an error doing an alter table as the column already exists - but everything else should slot in nicely. Good job - it is a seriously missing element of vB :) |
Quote:
Like put a the description under the image? please it is to me of much utility. Thanks. |
UPDATED TO VERSION 1.01
Redo changes in newattachment.php |
What was the change between 1.0 and 1.01?
|
Major one - a bug that prevented a _regular_ user to edit his descriptions.
|
Is it just a case of applying the file changes again?
|
Yeah. Just remove the old pieces of hack code, and add the new pieces instead.
|
Work with Geek's article hack ?, no prob ?
|
Yes.
|
Quote:
|
Quote:
|
I simply placed this in postbit_attachmentthumbnail template
Quote:
|
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:
########################################################################################################################### |
kmike,
I completely agree with you, thanks for sharing. I will update the hack with your postbit_attachmentimage later on. |
Quote:
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: Any help is greatly appreciated. |
It should be:
Code:
<div align="left">$attachment[description]</div> Code:
<div align="left"> >$attachment[description]</div> |
Quote:
|
Quote:
I got it resolved by rolling back the change in newpost_attachmentbit template. I don't see why it is needed there at all. |
I would suggest replacing your newpost_attachmentbit template and newpost_attachment templates to their vBulletin originals. Then this will work.
|
Quote:
Any ideas? |
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 03:58 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|