Thread: Major Additions - DownloadsII
View Single Post
  #1705  
Old 12-29-2011, 11:34 AM
Cipher5 Cipher5 is offline
 
Join Date: Apr 2009
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cheykawebdesign View Post
Hi, I installed this mod and its great, but does anyone know how to make the thumbnail image bigger? I uploaded a file and then uploaded a picture but it is to small... Am I missing where to change the thumbnail size? If it has to be manually changed/coded where would I start? I don't want to start editing templates and files if I totally missed where to do it.

Thanks
Actually I figured out how to get the main thumbnail bigger, I edited the size in the downloads.php but I need the smaller thumbnail bigger. When you click on the download you want you can read the description and view images at the bottom, under the "Images" titlebar, Right now the current thumbnail is 80px by 80px, This is the thumbnail I want to make bigger. The size I want my thumbnail is 300px by 300px any help from RS_Jelle or anyone else would be appreciated. If you don't know exactly just let me know what template it is in and I can figure it out.

UPDATE: I figured it out myself, there is 2 places to make edits to adjust both image sizes,

1) inside the download.php (This controls the main big thumbnail size)
search for:
PHP Code:
if ($width 100)
                {
                    
$ratio 100 $width;
                    
$newheight $ratio $height;
                }
                else
                {
                    
$newheight $height;
                }
                
$destimg = @imagecreatetruecolor(100$newheight);
                
imagecopyresampled($destimg$orig_image0000100$newheightimagesx($orig_image), imagesy($orig_image)); 
and replace with:

PHP Code:
                                                                   $newwidth 300;
                    
$newheight 300;

                      
                
$destimg = @imagecreatetruecolor($newwidth$newheight);
                
imagecopyresampled($destimg$orig_image0000$newwidth$newheightimagesx($orig_image), imagesy($orig_image)); 




2) inside the downloads2.css template (This controls the downloads small thumbnail size)
search for:
PHP Code:
width: {vb:stylevar profile_sidebar_avatar_maxWidth}; 
And adjust the height and width to what you want
(I have it set to auto because I hard coded the values in the downloads.php)
PHP Code:
widthauto;
        
heightauto


It would be nice to add this feature in the admincp for options. I also tried have the thumbnail auto size down by percentage with still keeping the 300px height max. It worked great for the little thumbnail image description, but the main thumbnail image it made the layout/ decription all messed up. So I think its best to just set these 2 values so they don't change.

I hope this helped someone out.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01091 seconds
  • Memory Usage 1,795KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete