Kunena Menu
Thumbnail doesn't work in localhost
6 years 10 months ago #54684
by ginestep
Thumbnail doesn't work in localhost was created by ginestep
Hello,
I have encountered a problem in IE11: the thumbnails are displayed but the width is full width of the original image.
After trying to find out what is the problem, i found this :
i'm using the last free version of slideshowck.
my site is currently in localhost (test i'm making) :
my joomla site is :
http://localhost/cotecanal-v34
when i set the image like this in the bachend:
images/appartement/appartement-exterieur.JPG
or even like this:
/images/appartement/appartement-exterieur.JPG
The thumbnail images of subdirectory "th" are not used.
I saw that the items i receive (in the foreach items) in default.php start with :
/cotecanal-v34/images/appartement/appartement-exterieur.JPG
The problem is that the code below doesn't work (it should work on live site) :
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
$item->thumb = JURI::root(true) . '/' . trim($thumbfile, '/');
}
because JPATH_ROOT is set to:
C:\xampp\htdocs\cotecanal-v34
so that it works, i have added this line:
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
$item->thumb = JURI::root(true) . '/' . trim($thumbfile, '/');
}
else
$item->thumb = $thumbfile;
May be i should do in another way ?
Regards,
P. Gineste
I have encountered a problem in IE11: the thumbnails are displayed but the width is full width of the original image.
After trying to find out what is the problem, i found this :
i'm using the last free version of slideshowck.
my site is currently in localhost (test i'm making) :
my joomla site is :
http://localhost/cotecanal-v34
when i set the image like this in the bachend:
images/appartement/appartement-exterieur.JPG
or even like this:
/images/appartement/appartement-exterieur.JPG
The thumbnail images of subdirectory "th" are not used.
I saw that the items i receive (in the foreach items) in default.php start with :
/cotecanal-v34/images/appartement/appartement-exterieur.JPG
The problem is that the code below doesn't work (it should work on live site) :
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
$item->thumb = JURI::root(true) . '/' . trim($thumbfile, '/');
}
because JPATH_ROOT is set to:
C:\xampp\htdocs\cotecanal-v34
so that it works, i have added this line:
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
$item->thumb = JURI::root(true) . '/' . trim($thumbfile, '/');
}
else
$item->thumb = $thumbfile;
May be i should do in another way ?
Regards,
P. Gineste
Please Log in or Create an account to join the conversation.
6 years 10 months ago #54685
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Thumbnail doesn't work in localhost
Hi
please tell me which version of Slideshow CK you are using. Strange that you are the only one to have this issue for now
please also tell me which file / line you are talking about for the code so that I can check
CEd
please tell me which version of Slideshow CK you are using. Strange that you are the only one to have this issue for now
please also tell me which file / line you are talking about for the code so that I can check
CEd
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
6 years 10 months ago #54690
by ginestep
Replied by ginestep on topic Thumbnail doesn't work in localhost
Hello,
I use the 2.0.14 version.
The source that have the problem is the source:
modules\mod_slideshowck\tmpl\default.php
On line 16:
foreach ($items as $i => $item)
all the items starts with:
/cotecanal-v34/images/appartement/*.JPG
On line 35:
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
This line doesn't work, because the site name already exists in both JPATH_ROOT and $thumbfile variable
For information, i'm using php 5.6.40
Last information, on the backend, and in the source tab, the button "browse the image" and "dete the image" doesn't work in IE 11.
Regards
P. Gineste
I use the 2.0.14 version.
The source that have the problem is the source:
modules\mod_slideshowck\tmpl\default.php
On line 16:
foreach ($items as $i => $item)
all the items starts with:
/cotecanal-v34/images/appartement/*.JPG
On line 35:
if (file_exists(JPATH_ROOT . '/' . trim($thumbfile, '/'))) {
This line doesn't work, because the site name already exists in both JPATH_ROOT and $thumbfile variable
For information, i'm using php 5.6.40
Last information, on the backend, and in the source tab, the button "browse the image" and "dete the image" doesn't work in IE 11.
Regards
P. Gineste
The following user(s) said Thank You: ced1870
Please Log in or Create an account to join the conversation.
6 years 10 months ago #54696
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Thumbnail doesn't work in localhost
thank you for your explanations, I will check that by my side and let you know
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
6 years 10 months ago #54715
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic Thumbnail doesn't work in localhost
for info I have fixed this issue with thumbs in the 2.0.15 that I have just released. Please confirm if all is ok for you
Joomlack Webmaster and Developer
Please Log in or Create an account to join the conversation.
Time to create page: 0.215 seconds





