Hi,
add a slash before the address link to the image in the description of the marker.
The path on the site looks wrong
Simply link to another site is working properly. The problem is with a link to an image on another site. Slash (/) turns into a double link, which is still prescribed my site
version Joomla 3.3.6
Add a slash before the address link to the image
-
- Phoca Newbie
- Posts: 4
- Joined: 26 Feb 2015, 13:41
-
- Phoca Newbie
- Posts: 6
- Joined: 26 Feb 2015, 03:07
Re: Add a slash before the address link to the image
Have you tried:
Code: Select all
<img src="images/logo-top.jpg" alt="" />
-
- Phoca Newbie
- Posts: 4
- Joined: 26 Feb 2015, 13:41
Re: Add a slash before the address link to the image
Picture is in another site.
Code: Select all
<img src="http://another-site/images/logo-top.jpg" alt="" />
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add a slash before the address link to the image
Hi, try to see the database, the table Phoca Maps Markers - find the marker and see the description of it - which data you have here?
Are they with the slash or not?
Jan
Are they with the slash or not?
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 26 Feb 2015, 13:41
Re: Add a slash before the address link to the image
Hi,
in database not slash. Slash only appears on the site after the publication and the only link to the image (in the control panel no slash)
in database not slash. Slash only appears on the site after the publication and the only link to the image (in the control panel no slash)
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add a slash before the address link to the image
Hi, please test:
OPEN:
administrator\components\com_phocamaps\helpers\phocamaps.php
and change
FROM:
TO:
Now, the external image should be displayed for you.
Please let me know if this helped, so I can add it to next version.
Thank you, Jan
OPEN:
administrator\components\com_phocamaps\helpers\phocamaps.php
and change
FROM:
Code: Select all
public static function fixImagePath($description) {
$description = str_replace('<img src="'.JURI::root(true).'/', '', $description);// no double
$description = str_replace('<img src="', '<img src="'.JURI::root(true).'/', $description);
return $description;
}
Code: Select all
public static function fixImagePath($description) {
$description = str_replace('<img src="'.JURI::root(true).'/', '', $description);// no double
$description = str_replace('<img src="', '<img src="'.JURI::root(true).'/', $description);
// correct possible problems with full paths
$description = str_replace('<img src="'.JURI::root(true).'/http://', '<img src="http://', $description);
$description = str_replace('<img src="/http://', '<img src="http://', $description);
return $description;
}
Please let me know if this helped, so I can add it to next version.
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 26 Feb 2015, 13:41
Re: Add a slash before the address link to the image
Hi,
These changes have helped me. Now all is well. Thank you very much.
P.S.
I regret that I did not see your reply earlier and has already managed to convert 7 sites (rewrote markers and added all the pictures in the root of the site)
These changes have helped me. Now all is well. Thank you very much.
P.S.
I regret that I did not see your reply earlier and has already managed to convert 7 sites (rewrote markers and added all the pictures in the root of the site)
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add a slash before the address link to the image
Ok, thank you for the information.
Jan
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Add a slash before the address link to the image
Hi, set in version 3.0.3
Jan
Jan
If you find Phoca extensions useful, please support the project