Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Server-side Thumbnailed Attachments Details »»
Server-side Thumbnailed Attachments
Version: 1.00, by CVMagic CVMagic is offline
Developer Last Online: May 2009 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 12-27-2003 Last Update: Never Installs: 10
Is in Beta Stage  
No support by the author.

Thumbnailed Attachments Version 1.0

Description: Its kind of Self explanitory, but in anycase if you dont know what it does, it checks if an attached image is larger than your specified size and if it is it will use ImageMagick, Netpbm, or the GD Image functions to resize it accourdingly using a rather simple formula to make sure the thumbnails are kept in scale.

Usual Mod Warning: This moddification unlike most other thumbnailed attachment mods isn't only a template hack so mind you, you'd have to make sure you backup your files before using this hack.

Screenshots/Test Threads: I have one included below and this link contains a vB that has already been modded: http://www.cheatandwin.com/forums/sh...=&threadid=216. But i should let you know that both are kind of outdated already since i did update the instructions from an oversight i had made earlier..

Requirements: Umm, as vB goes i'd say you'd need 2.2.x or higher but i designed it under 2.3.3 so there might be slight differences namely in the templates but not much to worry about that..
PHP 4.0.6 <- For the moment that is the minimum requirement for the modifications i have made aside to the ones required for vB
Any of the following 3: ImageMagick, Netpbm, or GD 2.01 or higher

Thats about it, any comments, suggestions, or questions feel free to post here or even email me personally at cvmagic at cheatandwin dot com.

[edit]
New Updated Version Download Today!

Show Your Support

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

Comments
  #12  
Old 12-29-2003, 02:00 PM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Slynderdale
Is there a way to cache the thumbnail? Your current method isn't effiecent. If the forum has alot of image attachments, this hack could bog down the server because it would have to dynamicly create the thumbnail each time the page loads. Also I looked at the code, if the thread has quite a few images atatched, it will greatly increase the page load time because it generated each thumbnail and uses resampling which isn't the fastest method but the best quality method.

This hack is great for small forums, but larger ones that have alot of attached images would see a performance decrease if they have alot of page views.
actually slynderdale thats what im doing now, im coding that and along with a CP frontend, the only trouble is that im trying to avoid extra database queries than i have to so im trying to think of a method to allow some sort of cacheing, either by creating a temp folder where all the thumbnails would be stored and looked up for, or create a new database table to contain all the thumbnails which would be processed when you post the attachment rather than when viewing it...
Reply With Quote
  #13  
Old 12-30-2003, 01:31 AM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I dont mean to double post, but since no one has replied yet i have to,... I actually got the requested cache in place and options added in the Admin panel under options so you wont need to edit attachments.php everytime you want to change thumbnail sizes or change cache directories, i have included updated instructions, and im planning to add upgrade instructions just incase( i doubt you'd need it tho because its all simple enough )...

[File Updated, Please download it again if you have downloaded it already]
Reply With Quote
  #14  
Old 12-31-2003, 02:50 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack, just what I was looking for to be honest. A lot of my users like to post photographs of themselves and gigs they've been to, only trouble is my forum has an 800 pixel width, which always gets shunted around when people post large images. This is ideal.

Thanks!
Reply With Quote
  #15  
Old 12-31-2003, 06:41 PM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^_^ thanks, if your all interested im soon going to take this hack and add it support to scott's filebased attachements then officially release it, because it seems from all the forum versions i've tested it with its been rather flawless, and when it hasnt it were mainly due to permission issues on setting up the directories, lol yeah i dont follow my own instructions :-P
Reply With Quote
  #16  
Old 12-31-2003, 08:10 PM
aliencode aliencode is offline
 
Join Date: May 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of getting Image Magick support for this great hack?
Reply With Quote
  #17  
Old 12-31-2003, 08:34 PM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure, ill add that to my todo list
Reply With Quote
  #18  
Old 01-01-2004, 04:51 PM
aliencode aliencode is offline
 
Join Date: May 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be great CVMagic - Im running 3 gamma now and I know it has integrated thumbnailing of attachments but GD is limited to certain filetypes. ImageMagick supports almost all image formats, plus its much easier to install for those of us with our own servers. Much appreciated I like your clean mod.
Reply With Quote
  #19  
Old 01-01-2004, 06:35 PM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

by the way as for ImageMagick intergration do you perfer just running direct exec commands or having ImageMagick Commands intergraded into php? I much Perfer the intergraded ones over exec ones because of security reasons and the fact that some servers disallow exec commands but the thing about intergraded ones for php is that you have to rebuild your server, so ill code it accourding to what you think is best in this case.
Reply With Quote
  #20  
Old 01-01-2004, 06:56 PM
aliencode aliencode is offline
 
Join Date: May 2003
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Either way would be fine I would imagine, vbulletin is commercial product that is normally run on a dedicated server anyways. I personally have written most of my thumbnailing scripts using the system commands, ya know adding both types wouldnt really be hard since the system commands are one line using convert program.
Reply With Quote
  #21  
Old 01-02-2004, 08:27 AM
CVMagic's Avatar
CVMagic CVMagic is offline
 
Join Date: Dec 2002
Location: USA/Connecticut
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^_^ okay im done, i just added support for No Imaging for those people who wanted to add this hack and planning to move to a new server that has GD or otherwise soon, Netpbm Support which i frankly like better than both GD and ImageMagick, ImageMagick Support for those people who want it :-D, GD2 was there already but now i have function verification so you wont get those nasty errors if lets say you dont have 2.0.1 or higher installed, and i made sure that scott's attachments as files hack wont interfere, as a side note when scott released that he was still a genious since i still dont have to modify any of his code to make this hack to work which may i say i was happy about....
So overall the requirements needed now to run this hack now are none, the requirements are set to whatever functions you have set to work rather than just GD...
Oh and i also made sure that possible security holes are covered to avoid someone sneaking in a abritary command when converting ...
It will be posted on the 1st post as an attachment, enjoy
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 01:02 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.09241 seconds
  • Memory Usage 2,311KB
  • 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
  • (1)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