Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Image size in forum attachment

Asked Modified Viewed 3,348 times
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
asked
Member

How can I make the displayed thumbnail of an image attachment larger in the forum? The current size is too small for my liking.
0 replies

10 posts

S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Which version of PHPFusion are you running ?
0 replies
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
answered
Member

I'm using 7.02.01
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
answered
Veteran Member

Ok - then I can't help you out m8.

I haven't really looked nearliere/deeper into the new v7.02.xx-series.

But hang on - Im almost sure that thereĀ“s other that might can help you. :)
0 replies
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
answered
Member

Thanks for your reply Smokeman. Think I found it in viewthread php line 307


$a_images .= display_image_attach($a_data['attach_name'], "100", "100", $data['post_id'])."n";



Edit: The strip slashes thing is screwing up code view too :|
Edited by arat on 26-04-2011 23:09,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Hey Arat,

includes/forum_include.php

Line 129 is what you change...

function display_image_attach($file, $width = 50, $height = 50, $rel = "") {
   $size = @getimagesize(FORUM."attachments/".$file);
      
   if ($size [0] > $height || $size [1] > $width) {
      if ($size [0] < $size [1]) {
         $img_w = round ( ($size [0] * $width) / $size [1] );
         $img_h = $width;
      } elseif ($size [0] > $size [1]) {
         $img_w = $height;
         $img_h = round ( ($size [1] * $height) / $size [0] );
      } else {
         $img_w = $height;
         $img_h = $width;
      }
   } else {
      $img_w = $size [0];
      $img_h = $size [1];
   }
   


Change 50/50 to what you want.

Good Luck!!
0 replies
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
answered
Member

Thanks Craig. What does the code I posted supposed to do... it makes the thumb larger when I changed the 100s and tried it.
Edited by arat on 26-04-2011 23:12,
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Not sure, does what I posted do it as well?
0 replies
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
answered
Member

Quote

Craig wrote:

Not sure, does what I posted do it as well?


Editing the forum_include.php did nothing as far as I can see.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Ok then stick to your solution. hehe.
0 replies
A
arat
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions
answered
Member

Thanks Craig. Just asking 'cause I don't want to break anything that ain't already broken :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 10 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
A
A
arat 10
  • Member, joined since
  • Contributed 79 posts on the community forums.
  • Started 21 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet