• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Timthumb failing / Image re-sizing server issue

Started by hamnawa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hamnawaTopic starter

I was wondering to see if I can get a tutorial on how to change this big Play blocks (channel lists) on my website from left sidebar to what as shown in demo.

Please check the snapshot.
  •  

PHPVibe A.

You need to add an image to every channel via de admin, and make sure timthumb works on your server, cause for you those don't look resized.
Make sure cache/thumbs is writeable, you may also want to delete all it's content if you have issues, also make sure gd is installed on your server.

hamnawaTopic starter

It means it does not require any code changes. But what I see these two should have entirely different code styles.
  •  

PHPVibe A.

There is no difference between our demo and the script in the phpvibe pack.
But if timthumb does not work, it will push the images and disorder things.

http://www.thebuzzmedia.com/tip-for-timthumb-thumb-php-not-generating-thumbnails/
http://www.binarymoon.co.uk/2010/11/timthumb-hints-tips/

Timthumb is called res.php in the root.
If you downgrade it, change it, make sure cache folder points to /cache/thumbs/ folder.

hamnawaTopic starter

I see a reference in res.php to timthumb-config.php file but this file does not exist in the pack I have downloaded.
  •  

hamnawaTopic starter

I found a timtumb.php file on Google codes:

http://timthumb.googlecode.com/svn/trunk/timthumb.php


I saved it as timthumb-config.php and uploaded in the root.

This has fixed the issue of big Play buttons but images are not displaying.


I am wondering why the Software pack does not contain this file?
  •  

PHPVibe A.

The file timthumb-config.php is for optional/external config.
When updating timthumb, have you edited the paths correctly as in the previous one's config (which is already at the top of the file).

fourdeltaOne

solution:

cache/thumbs  - chmod 777
cache/thumbs/index.html - chmod 777
Skype: epic.mediauz
  •  

hamnawaTopic starter

I have not done anything with timtumb-file. As it was not in the package which I downloaded. Does it need to be in the zip package ?



What configuration is required to this file?

What this file did is it fixed the image order of the channels and the channels are listed as it should be but images are not showing as described above.

I have uploaded the timthumb-config.php file in the room example.com/timthumb-config.php

I have already chmod both to 777 without any results.
  •  

PHPVibe A.

You DON'T need timthumb-config.php.
Put back the files from the original PHPVibe and check that your server can work with images manipulation (GD is installed and working).

fourdeltaOne

hamnawa try what I wrote above.

just put chmod 777 on the file cache/thumbs/index.html
Skype: epic.mediauz
  •  

hamnawaTopic starter

When I delete the file Images display but like big play buttons which I attached here above.

Just sent an e-mail with web-site details to office e-mail please have a look at that for me.
  •  

hamnawaTopic starter

fourdeltaOne As I mentioned earlier they are already chmod to 777.
  •  

PHPVibe A.


hamnawaTopic starter

I apologize I just sent again with details I forgot the Ctr+V part.  ;D
  •  

PHPVibe A.

So,

on your server

/res.php?src=../uploads/1371741344ddin_Najmiddin.jpg&q=100&w=23&h=23

doesn't work.

/res.php?src=uploads/1371741344ddin_Najmiddin.jpg&q=100&w=23&h=23


works.

I've added

$thumb = str_replace('../','',$thumb);


on lib/functions.php to the thumb_fix function to fix it for you.

hamnawaTopic starter

OK Thanks. Could you please tell me if you modified res.php only? because I have 3 other domains with same issue. Should I only replace the res.php with the modified one?

All those sites are hosted on the same server.
  •  

PHPVibe A.

Quote from: hamnawa on
OK Thanks. Could you please tell me if you modified res.php only? because I have 3 other domains with same issue. Should I only replace the res.php with the modified one?

All those sites are hosted on the same server.

I've already explained what I did

Quote from: Alexander on
I've added

$thumb = str_replace('../','',$thumb);


on lib/functions.php to the thumb_fix function to fix it for you.

The res.php it's the original one from the PHPVibe pack, yours was a mess ( I don't know how you saved it, but it was returning the php code in the script ).

PHPVibe A.

// Thumb fix
function thumb_fix($thumb, $resize = false, $w=280, $h=180) {
if($thumb) {
$thumb = str_replace('../','',$thumb);
if ((strpos($thumb, "http") === 0) || (strpos($thumb, "https") === 0) || (strpos($thumb, "www.") === 0)){
$thumb = str_replace("www.","",$thumb);
if(strpos($thumb, 'http') !== 0)  {
  return 'http://' . $thumb;
} else {
  return $thumb;
}
} elseif($resize) {
return site_url().'res.php?src='.$thumb.'&q=100&w='.$w.'&h='.$h;
}else {
return site_url().$thumb;
}
}

}

Notice the extra

$thumb = str_replace('../','',$thumb);

hamnawaTopic starter

I just applied this to a new domain. It did fix the image display issue but The channel thunmbs not appearing as they should instead they are appearing as big Play buttons.

Was this fix somewhere else?
  •  

PHPVibe A.

Make sure cache/thumb is writable and delete all files in it.
No, that line is the only change, and also I've put back the original res.php

hamnawaTopic starter

- cache/thumb 755
- Deleted all files

No fix for channel image size.
  •  

PHPVibe A.


hamnawaTopic starter

Will even 777 did not work. I did it 755 because the other domain you guys fixed was 755 not 777.

Do not know what I am missing.

Just sent an e-mail with details if possible please have a look.
  •  

PHPVibe A.

The image files don't exist? Check for example /uploads/1372947300-Atash.png

Similar topics (7)