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)

YLP1 05-13-2005 02:24 AM

Quote:

Originally Posted by Dark Visor
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.

Hi DarkVisor... I am sorry for being so dense with this...

Is this where I am supposed to place this code?

Code:

<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]" target="_blank">  <img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[description]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a><div align="left">$attachment[description]</div>
&nbsp;<if condition="$show['br']"><br /><br /></if>

Putting the code there causes the images (I have the four images on a line setup) to stack one per line...so instead of this:


Example 1
Image ------ Image ------ Image ------ Image
Caption ---- Caption ---- Caption ---- Caption

Which the above is what I am trying to achieve

I get this instead:

Example 2
Image
Caption

Image
Caption

Image
Caption

Image
Caption

How do I get it to look like the example 1?

kmike 05-13-2005 03:43 AM

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.

Err, isn't it exactly what I suggested? And newpost_attachment wasn't changed by your hack, only newpost_attachmentbit.

akanevsky 05-13-2005 05:49 PM

You would have to use two levels of HTML tables to achieve that result. Are you sure it is worth it?

Acers 05-20-2005 05:52 PM

is this working for you guys?
me not getting it to work.
following probs in 3.07:

1) in multiple image uploads,, it gives just one description. all other images it discards.. that measn i can enter for only 1 image. Rest are discarded.

2) the image on being uploaded with description is not showing description on main post view page...

akanevsky 05-20-2005 07:36 PM

This hack works fine on non-hacked boards. I cannot guarantee that it will work otherwise.

Lionel 05-20-2005 07:52 PM

works fine for me on heavily hacked 3.07

akanevsky 05-20-2005 08:22 PM

Yes, Lionel, it works for you, but keep in mind that your attachments engine was not hacked prior to installation of my hack. As for this guy, I don't know what he has...

Acers 05-21-2005 07:57 AM

ok.. got a bit of it fixed up...i had a template problem cos of the other hack.

still not fully working but i guess its a template issue that can be sorted. thanks anyway.. grt hack :)

kmike 05-21-2005 09:39 AM

Quote:

Originally Posted by YLP1
Putting the code there causes the images (I have the four images on a line setup) to stack one per line...so instead of this:

Example 1
Image ------ Image ------ Image ------ Image
Caption ---- Caption ---- Caption ---- Caption

Which the above is what I am trying to achieve
.....
How do I get it to look like the example 1?

You'd have to wrap all images in a table. It means an additional change to postbit (or postbit_legacy) template is needed.
But wrapping images in a table also means that the table will be as wide as a sum of images' widths. No overflow would happen if images are too wide, instead, a horizontal scroll would appear. Now imagine someone's uploading five 1024x768 images...

But if thumbnails are enabled, it makes sense to wrap thumbnails in a table. First, you know beforehand a maximum thumbnail width and can control maximum table width therefore. Second, thumbnails in one vertical line look really ugly, taking up too much space and making post too long.

So for these reasons I've made the requested change for thumbnails.
To achieve this, I had to change two templates: postbit (or postbit_legacy) and postbit_attachmentthumbnail.

In postbit template, find this code fragment:
Code:

                                        <legend>$vbphrase[attached_thumbnails]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                        $post[thumbnailattachments]
                                        </div>

Replace it with:
Code:

                                        <legend>$vbphrase[attached_thumbnails]</legend>
                                        <div style="padding:$stylevar[formspacer]px"><table border="0"><tr valign="top">
                                        $post[thumbnailattachments]
                                        </tr></table></div>

Replace whole postbit_attachmentthumbnail template content with:
Code:

<td>
        <table border="0" cellspacing="0">
                <caption align="bottom" style="caption-side: bottom; text-align: left;">$attachment[description]</caption>
                <tr><td>
                        <a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[description]">$vbphrase[image_larger_version_x_y_z]</phrase>" /></a>
                </td></tr>
        </table>
</td>
<if condition="$show['br']"></tr>
<tr valign="top"></if>


Acers 05-22-2005 08:43 AM

guys a bit of help.. i have sorted almost all the rest probs but one thing remain...

when i upload attachments, they are not showing in the main reply thread.. see the image. What could be the prob? It was showing earlier prior to the hack.,
thanks in advance


All times are GMT. The time now is 06:48 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.01440 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_code_printable
  • (3)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