Navigation
Last Seen Users
mcatlin28< 5 mins
zottelxxl00:10:14
Branti00:32:23
music2401:24:16
Anqueetus01:56:00
Zzyzix02:13:31
VuuK02:27:22
KFJ02:32:26
fusmen02:46:55
LuMaXx02:47:33

Members: 27,577
Newest: Zzyzix
Downloads v7
Downloads v6
One-click Translation
Translate This Site

Member Poll
Which version of PHP-Fusion are you using?

6.xx.xx
6.xx.xx
4% [19 Votes]

7.00.xx
7.00.xx
8% [38 Votes]

7.01.xx
7.01.xx
8% [40 Votes]

7.02.xx
7.02.xx
80% [400 Votes]

Votes: 497
You must login to vote.
Started: 26/03/2012 11:58

Polls Archive
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Connect via Facebook
Connect via Facebook
Our Coders
Shoutbox
You must login to post a message.

20-05-2013 00:58

20-05-2013 00:09

19-05-2013 23:49

19-05-2013 23:48

19-05-2013 23:46

19-05-2013 20:51

19-05-2013 20:50

18-05-2013 10:01
Can I link a panel to another subdomain? If so how? openside() echo ??? "http://xxxxx/infus
ions/panel/panel.p
hp" closeside()

18-05-2013 01:20

18-05-2013 01:19

Shoutbox Archive
In memoriam

Nick Jones
1973-2011

Sponsors
View Thread
Who is here? 1 guest(s)
 Print Thread
Trouble with forum images
Zneeky
Hello i would like some help i got a irritating problem i cant fix.

All img in the forum dose not rezise and gets a scroll bar. If someone could help me i will be verry happy Smile

Thank you!

The issue:
sroinfo.com/random/img_issue.png
 
Bombastic
There will be a code like this somewhere:

Download source  Code
function resize_image($file, $name) {
   $size = @getimagesize($file);
   
   if ($size[0] > 600 || $size[1] > 400) {
      if ($size[0] <= $size[1]) {
         $img_w = round(($size[0] * 400) / $size[1]);
         $img_h = 400;
      } elseif ($size[0] > $size[1]) {
         $img_w = 600;
         $img_h = round(($size[1] * 600) / $size[0]);
      } else {
         $img_w = 600;
         $img_h = 400;
      }
   } else {
      $img_w = $size[0];
      $img_h = $size[1];
   }
   $res = "<img src='".$file."' alt='".$name."' style='border:0px' width='".$img_w."' height='".$img_h."' />";
   
   return $res;
}






I don't know if it's in viewthread.php or maincore.php. But you can change the size of the resize.
 
Zneeky
nope can't find it in those files, i tried to put it in the maincore cuz it looked like it should be there, but it did not work :/

You know any other think that could make this issue happen?
Cuz i read some where that it should be resized as default in v7.
 
Bombastic
Ok, try in
Download source  Code
img_bbcode_include.php




in bbcodes
Edited by Bombastic on 18-12-2009 13:21
 
Zneeky
found this in there

Download source  Code
if (!defined("IN_FUSION")) { die("Access Denied"); }

$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#sie","'<span style=\'display: block; width: 300px; max-height: 300px; overflow: auto;\' class=\'forum-img-wrapper\'><img src=\'\\1'.str_replace(array('?','&amp;','&','='),'','\\3').'\\4\' alt=\'\\3\\4\' style=\'border:0px\' class=\'forum-img\' /></span>'",$text);




Is this right? i tried adding the code i got from you in there and then it went really wierd^^
cant understand whats wrong its really irritating.
 
Bombastic
No don't add the code I put, that was just an example of what it would look like. Just change the values that are 300. That is what the images are resizing to. In this part of your code
Download source  Code
width: [color=#ff0000]300[/color]px; max-height: [color=#ff0000]300[/color]px;


change it to the size you would like your resized images to be, for example:
Download source  Code
width: 200px; max-height: 150px;




You can much around with it till you're happy with the size.

That first code I put in was for v6, because I remember I had this issue with v6 so I knew what sort of thing I was looking for when I did it in v7.
Edited by Bombastic on 18-12-2009 13:51
 
Zneeky
Well it worked to change the size of it there so that a good thing, thank you Smile But i still have the same problem with the scrollbar if i insert a big image.

 
Bombastic
Hmm, mine does that scroll thing for a second, then it pops back into it's smaller resized image. If I then click on the image it pops out to it's original size. I'm using Power Forum though but I remember it did also do that when I had the standard forum. I'm afraid I can't help you with the scroll bar thing. I do know what you mean though, it's horrible. I'm sure an experienced coder here will know though. Glad the other thing worked Smile
 
Zneeky
Yeah im really glad you helped me with that Smile

Also i forgot to say that im using Fusionboard4.
 
Bombastic
lol. maybe this thread will give you an idea. http://php-fusion...d_id=25105 You've just got to find where that code is. How I do it sometimes is to get the page I need to change and look at page source (right click on page) and look to see in there
 
Zneeky
Aha there i might have the solution to my problem, thank you so much Big Smile
 
Bombastic
You're welcome.
 
Jelle
Sorry for my bad English.
I did had something simillar in the past.

It was caused bij a panel with scrolling 'last images' that used. A script messing up the img-BB-Code in the forum.

Or look at this page, http://www.php-fu...ost_127367 maybe it can help.

members.upc.nl/~j.berends4/jel/PHP-Fusion_Versie.gif

For every 60 seconds of anger,
you lose one minute of happiness
 
Web
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Track this thread Print Thread show ranks forum in Comments? (request) Mod/Infusion Modification Request 2 26-04-2013 17:40
News - Forum PHP-Fusion Modifications 2 05-03-2013 02:59
Forum unreaded message BUG? Coding Support 1 18-12-2012 21:30
Images in news v7 Mod/Infusion Locale Submit / Request 1 02-12-2012 01:31
Multiple images for download section. Coding Support 2 13-08-2012 15:18