Image Path Issue

Free responsive Joomla 2.5 and 3.x module to present your content with easy and intuitive way.
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Thu Dec 06, 2012 1:42 am
Hi There!

I just installed NewsShow Pro GK4 v3.3.3 and found out that it is not resizing my images and not caching as well. So I check the code gk.thumbs.php and looking at getRealPath() the variable $start at line 71 assumes all default Joomla, K2, Virtuemart image path folder.

Since I changed my default Image Path in Media Manager, NSP module cannot find the realpath.

Looking back at gk.thumbs.php line 71:

Code: Select all
$start = ($k2_mode || $vm_mode) ? (($k2_mode) ? strpos($path, 'media/') : strpos($path, 'components/')) : strpos($path, 'images/');


If you remove 'images/' and simply make it '' regardless of what is the default media folder NSP module should work properly.

Code: Select all
$start = ($k2_mode || $vm_mode) ? (($k2_mode) ? strpos($path, 'media/') : strpos($path, 'components/')) : strpos($path, '');


Gavick Team, may I request to make this change to the code so I/We don't need to make code modification after each upgrade. It is something that doesn't affect NSP functionality but it will make it work properly instead regardless of how user setup their Joomla.

Thank you!
User avatar
Junior Boarder

teitbite
Thu Dec 06, 2012 2:54 pm
Hi

I'm sending this to programmers.
User avatar
Moderator

GK User
Fri Dec 07, 2012 7:19 pm
Hi teitbite,

Thank you for forwarding this to your development team.

I just found out that there is an issue with my solution if Thumbnail image type : Use Joomla! images is being set in the module, again the thumbnails doesn't get processed. That is because $path variable is giving the absolute path to the image. So here's the fix (correct me if I'm wrong Gavick Dev Team please):

Code: Select all
               $params = JComponentHelper::getParams('com_media');
               $params = $params->get('image_path', 'images');

                $start = ($k2_mode || $vm_mode) ? (($k2_mode) ? strpos($path, 'media/') : strpos($path, 'components/')) : strpos($path, $params.'/');


Thanks!
User avatar
Junior Boarder

teitbite
Sat Dec 08, 2012 4:32 am
Hi

Ok. I'll let them know about this too.
User avatar
Moderator


cron