vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Attachment Browser (https://vborg.vbsupport.ru/showthread.php?t=103519)

El_Muerte 12-21-2005 10:00 PM

Attachment Browser
 
This plugin adds an attachment browser to selected forums. The attachment browsers shows all the thumbnails of attached images in all posts in the current from.

Installation
Install the product xml and edit the FORUMDISPLAY template. Add the following code whereever you like:
Code:

<if condition="$show['attachments']">
$attachmentbrowser
</if>

I put it above the thread list.

In order to enable the thumbnail browser for a forum you will have to set "Show attachment browser" to yes in the forum manager (AdminCP).

System changes
This plugin adds two templates:

attbrs_attachment : the main block of the attachment browser
attbrs_attachment_bit : the thumbnail part for each attachment

and two phrases:

ab_image_larger_version_x_y_z : a copy of 'image_larger_version_x_y_z', the original was not available in the scope it was needed
ab_title : the title used in the browser

It also modifies the forum table, it will add a new field called 'gallery'. The field is created during installation and removed on uninstall.

This plugin has one setting in it's own category which controls the maximum number of thumbnails to show per page.

Live demo
http://el-muerte.student.utwente.nl/...splay.php?f=23

Change log
Changes since v1.0.1:
  • Fixed table prefix
  • Added new option 'enable pager'. Width this you can disable the pager which can be a performance hit on large forums.
  • Added new option 'Browser width'. Which will set the fallback browser width to use for MSIE. MSIE doesn't properly size the scrollable area in the default template, this is a dirty workaround.

Changes since v1.1.0:
  • Templates are now grouped
  • Installer is a bit more safe (e.g. no serious error when the table already has a `gallery` field)
  • Attachment browser is now collapsable
  • Thread title can be trimmed to a certain length

Changes since v1.2.0:
  • Browser is not shown when the user has to permissions to view attachments

El_Muerte 12-22-2005 12:55 PM

Doh, forgot to properly link the username, it's fixed now in 1.0.1

The Chief 12-22-2005 02:03 PM

lookin good, though I don't need ;)

El_Muerte 12-22-2005 02:48 PM

Ok, there's a little issue with MSIE, as usual it doesn't handle dimensions correctly. So there's no scrollbar, instead it's displayed in full, streching the page a lot.

A quick fix is to edit the 'attbrs_attachment' template and change the div in the 2nd row to:
Code:

<div style="overflow: auto; width: auto !important; width: 800px; margin: auto;">
This will give the browser a fixed width of 800px in MSIE only.

Wachtmeister 12-22-2005 04:53 PM

Really very interesting. I'll wait until the MSIE thing is "fixed" ;) Really a very good idea!

klaush 12-22-2005 05:18 PM

Thanks, but:

Table 'xxxx.attachment' doesn't exist

Looking for the correct Prefix? Where to change it?

El_Muerte 12-22-2005 07:09 PM

Quote:

Originally Posted by klaush
Thanks, but:

Table 'xxxx.attachment' doesn't exist

Looking for the correct Prefix? Where to change it?

oh crap, completely forgot about table prefixes

Chris M 12-22-2005 07:35 PM

Looks rather interesting :)

Chris

silurius 12-22-2005 09:47 PM

Nice one, El_Muerte! Can't wait to install.

*Clicks install and awaits final version*

cbr929rrerion 12-23-2005 12:50 AM

OK.. I have to admit but can you or someone make it do thumbnails that are like 150 X 150 or so.. I have my thumbs set large so it dont work too well, is there a way to add a way to set thumb size ?

If we can get the images smaller I will enable it in a heartbeat...


All times are GMT. The time now is 02:14 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.01119 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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