Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Attachment Browser Details »»
Attachment Browser
Version: 1.2.1, by El_Muerte El_Muerte is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-21-2005 Last Update: 01-15-2006 Installs: 40
DB Changes Uses Plugins Template Edits
Re-useable Code Translations  
No support by the author.

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

Show Your Support

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

Comments
  #12  
Old 12-23-2005, 05:35 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cbr929rrerion
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...
afaik there is no nice way to scale thumbnails, or at least not widthout a lot of extra processing. But you could force dimensions by editing the 'attbrs_attachment_bit' template and add `height="100"` to the img tag, or something like that.
Reply With Quote
  #13  
Old 12-23-2005, 10:54 AM
Wachtmeister's Avatar
Wachtmeister Wachtmeister is offline
 
Join Date: Apr 2004
Location: West-Berlin, Germany
Posts: 190
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this add on also be shown only in seperate threads or categories?

I have a huge Avatar and Smiley compilation and would love to have this one only on those threads or forums.

Before i import the product, i ask

Thanks, Wachtmeister
Reply With Quote
  #14  
Old 12-23-2005, 06:20 PM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How should I edit the product to address the dupe column name?

Code:
Database error in vBulletin 3.5.2:

Invalid SQL:
ALTER TABLE forum ADD gallery SMALLINT(6) DEFAULT '0' NOT NULL;

MySQL Error  : Duplicate column name 'gallery'
Error Number : 1060
Date         : Friday, December 23rd 2005 @ 12:16:57 PM
Script       : http://www.examplesite.com/forum/admincp/plugin.php
Referrer     : http://www.examplesite.com/forum/admincp/plugin.php?do=productadd
IP Address   : 71.131.12.1
Username     : 
Classname    : vb_database
Never mind I got it. Changed "gallery" to "atb_gallery" in plugin.
Reply With Quote
  #15  
Old 12-24-2005, 02:57 AM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by El_Muerte
afaik there is no nice way to scale thumbnails, or at least not widthout a lot of extra processing. But you could force dimensions by editing the 'attbrs_attachment_bit' template and add `height="100"` to the img tag, or something like that.
I did that and added my theme to it and a scroll style.. looks sweet.. My members love it..
Reply With Quote
  #16  
Old 12-24-2005, 05:25 AM
tamborinegal's Avatar
tamborinegal tamborinegal is offline
 
Join Date: Sep 2005
Location: Australia
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow El_Muerte, this looks really neat. I'm too busy with Christmas stuff to install it now but I'll be coming back to look at this again for sure.

Thanks

Clancy
Reply With Quote
  #17  
Old 12-26-2005, 12:46 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

on all the attachements on my board there is the thumb and the attachment.. could you not have it putt the thumb for the image?if so where would you change that one part?
Reply With Quote
  #18  
Old 12-27-2005, 11:39 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It does use the thumb, and the thumb only. Attachments without a thumbnail are not displayed.
Reply With Quote
  #19  
Old 12-30-2005, 03:18 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh.. ok.. question... can we set the the default to be yes in show attachement browser? I have lots of forums and its a job going in and setting them all to yes..

Any way to make the xml default to yes not no?
Reply With Quote
  #20  
Old 12-30-2005, 04:28 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed as per instructions but nothing shows on my forumdisplay page. I aslo cannot find the two templates that were supposed to be added. I am fairly new to all of this so any help is very greatly appreciated.

Edited to add: I took a peek at the manage products in admincp for this modificiation and this is what the install code says:

Quote:
$res = $db->query("DESCRIBE " . TABLE_PREFIX . "forum gallery");
if ($colinfo = $db->fetch_array($res))
{
if (!preg_match("#int\(#", $colinfo["Type"]))
{
print_dots_stop();
print_cp_message('Unable to install this plugin because the forum table is not compatible. (column gallery has an invalid type.)');
}
}
else {
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "forum ADD gallery SMALLINT(6) DEFAULT '0' NOT NULL");
}
Is this why the templates were not added and how do I fix this?

Thanks in advance, again.
Reply With Quote
  #21  
Old 12-30-2005, 07:00 PM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cbr929rrerion
oh.. ok.. question... can we set the the default to be yes in show attachement browser? I have lots of forums and its a job going in and setting them all to yes..

Any way to make the xml default to yes not no?
Yes, in the ALTER TABLE db query just change the "DEFAULT '0'" to "DEFAULT '1'"

Quote:
Originally Posted by YLP1
I installed as per instructions but nothing shows on my forumdisplay page. I aslo cannot find the two templates that were supposed to be added. I am fairly new to all of this so any help is very greatly appreciated.
The templates are grouped in the group "Attachment Browser".
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 03:42 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.07269 seconds
  • Memory Usage 2,315KB
  • 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
  • (2)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
  • (3)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