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
  #22  
Old 12-30-2005, 09:25 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok.. I changed this
Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "forum ADD gallery SMALLINT(6) DEFAULT '1' NOT NULL");
and reinstalled the xml, still says no..

Did I change the wrong thing or what do I need to do?
Reply With Quote
  #23  
Old 12-31-2005, 08:36 AM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to uninstall and then reinstall, during upgrading the uninstall code isn't executed.

or you could simple execute a db query setting all values of gallery to 1, e.g.

update forum set gallery = 1;
Reply With Quote
  #24  
Old 12-31-2005, 04:25 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by El_Muerte
you need to uninstall and then reinstall, during upgrading the uninstall code isn't executed.

or you could simple execute a db query setting all values of gallery to 1, e.g.

update forum set gallery = 1;

Thank you, I did the db query and it took less than the blink of an eye to do all 178 ..

That was so helpful.. BTW.. my members love your work, I appreciate it.
Reply With Quote
  #25  
Old 12-31-2005, 08:20 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get it to show on my forum. I had Gallery installed but I saw the conflick, now I deleted Gallery and still doesn't show. Help!!
Reply With Quote
  #26  
Old 01-10-2006, 04:21 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have a question, it works perfectly except 1 thing..

If your not a registered user, it shows everything except where the pics are its just the blank image place holder. Any way to make a default gif to put there or just not show it at all if not registered?

It looks terriable to non-members..
Reply With Quote
  #27  
Old 01-10-2006, 06:05 PM
El_Muerte's Avatar
El_Muerte El_Muerte is offline
 
Join Date: Nov 2001
Posts: 237
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

uhm.. do you have a restriction on viewing images on your forum?
Reply With Quote
  #28  
Old 01-10-2006, 06:16 PM
Club3G Club3G is offline
 
Join Date: Aug 2004
Location: Orlando, Fl
Posts: 300
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* Club3G clicks install
[/high]

Couple of quick questions:

Is there a way to get it to span the same width as the forum tables? The fixed width looks a little off at higher resolutions.

Also, a non-fixed height would be awesome. The horizontal scrollbar is great, but the vertical just looks ugly.

Screenshot:

http://www.club3g.com/members/chris/attachplugin.jpg

Great mod otherwise, thank you!
Reply With Quote
  #29  
Old 01-10-2006, 07:14 PM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

of course I do, only members can see images...

I dont want non-members to be able to view images.

So is there a way to make it load a non-member gif that I can make or just not show up at all to non members? I would prefer the image of my choice in its place, maybe an if statement or something?
Reply With Quote
  #30  
Old 01-11-2006, 02:26 AM
cbr929rrerion cbr929rrerion is offline
 
Join Date: Oct 2005
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone know how to add an if statement to have it show a predetermind image to non-members?
Reply With Quote
  #31  
Old 01-11-2006, 05:08 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 Club3G
[high]* Club3G clicks install
[/high]

Couple of quick questions:

Is there a way to get it to span the same width as the forum tables? The fixed width looks a little off at higher resolutions.

Also, a non-fixed height would be awesome. The horizontal scrollbar is great, but the vertical just looks ugly.

Screenshot:

http://www.club3g.com/members/chris/attachplugin.jpg

Great mod otherwise, thank you!
Only MSIE has a fixed width, the reason for this is because MSIE is broken and doesn't properly size the table cell. So unless you can find a way to make MSIE behave properly it can't be fixed.

Quote:
Originally Posted by cbr929rrerion
anyone know how to add an if statement to have it show a predetermind image to non-members?
PHP Code:
<if condition="$bbuserinfo['userid'] == 0">
// ...
</if> 
(not tested)
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 04: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.04856 seconds
  • Memory Usage 2,316KB
  • 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
  • (1)bbcode_php
  • (3)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