Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2004, 02:30 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default two thunbnails size

I set my thumbnails width at 300 and I display them directly in the postbit, vertically.

However, image smaller than 300 width are not linked and as such, therefore display below the post as designed by Jelsoft, which is fine.

Where in function fetch_thumbnail_from_image () in functions_image.php can I put this:

if ($width < $vboptions['attachthumbssize'])
$new_width = "100";


So images smaller than the vbdefined thumbsize of 300 get thumb at 100 width? Or is that possible at all?
Reply With Quote
  #2  
Old 10-03-2004, 02:37 AM
nexialys
Guest
 
Posts: n/a
Default

you just have the answer to your request... this is exactly the kind of hack that make the life easier..
Reply With Quote
  #3  
Old 10-03-2004, 03:04 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
you just have the answer to your request... this is exactly the kind of hack that make the life easier..
No not really. I might know what to put, but I do not know WHERE to place it, and that was my question :-)
Reply With Quote
  #4  
Old 10-03-2004, 03:23 AM
nexialys
Guest
 
Posts: n/a
Default

logically, find this:
PHP Code:
if ($width $vboptions['attachthumbssize'] OR $height $vboptions['attachthumbssize']) 
and put this just before:
PHP Code:
if ($width $vboptions['attachthumbssize'])
{
    
$vboptions['attachthumbssize'] = '100';

so if the files are bigger, the new default for thumbnails will be lowered to your prefered size before the treatment...

...and you can count you as a lucky guy, i never give codes for free usually.. i suppose it's the time of night...
Reply With Quote
  #5  
Old 10-03-2004, 03:38 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
logically, find this:
PHP Code:
if ($width $vboptions['attachthumbssize'] OR $height $vboptions['attachthumbssize']) 
and put this just before:
PHP Code:
if ($width $vboptions['attachthumbssize'])
{
    
$vboptions['attachthumbssize'] = '100';

so if the files are bigger, the new default for thumbnails will be lowered to your prefered size before the treatment...

...and you can count you as a lucky guy, i never give codes for free usually.. i suppose it's the time of night...
That work! About me pushing my luck a bit? What if I want that "100" thumb size to be for anything that is below the first post? My approach to that was going to be to reset all thumbs at 100 and duplicate attachment.php into attachement2.php which will call functions_image2.php where I would hardcode the values, and then use conditionals in the templates <if condition="$post[postcount] == 1"> to call attachment2.php (with the 300 width). This way, the first post which is the main article will have the big image and all subsequent posts would be at 100, regardless of size. Is that feasible?
Reply With Quote
  #6  
Old 10-03-2004, 03:48 AM
nexialys
Guest
 
Posts: n/a
Default

hum.. possible, but not with your luck against me.. lol... hum..

this is a more complicated feature request, maybe adding a value to call the attachements from the firstpost id, and add it to the function entries ... but i will not go farther $... someone else maybe
Reply With Quote
  #7  
Old 10-03-2004, 04:59 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aha! Once I rebuilt the thumbnails, they all showed up at 100 with above code. I got fooled in my test.
Reply With Quote
  #8  
Old 10-03-2004, 10:25 AM
nexialys
Guest
 
Posts: n/a
Default

hum... strange, it worked on my server... are you sure you have images that have +100px ?!
Reply With Quote
  #9  
Old 10-03-2004, 12:46 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nexialys
hum... strange, it worked on my server... are you sure you have images that have +100px ?!
positive about that. Up to 600 pixels.

But:

???
I got this in my email and I can't find it here:

Quote:
hum... $imageinfo[0] instead of $width would do the job, as the $width is called in cacheback... so it's not taken... sorry, my error!
Reply With Quote
  #10  
Old 10-03-2004, 01:31 PM
nexialys
Guest
 
Posts: n/a
Default

hum... forget about it, i updated the post after the subscription was sent to you.. but you can try it, it can't be wrong.
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 08:32 AM.


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.06553 seconds
  • Memory Usage 2,250KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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