Do not display image in Marker description

Phoca Maps - displaying maps in Joomla! CMS
luandoson
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Dec 2014, 05:11

Do not display image in Marker description

Post by luandoson »

Hi,

I create new marker and add image into description.

Code: Select all

<p><img alt="" src="images/logo.png" /></p>
This code generated by Editor

My site turn on rewrite url, that image do not display.
I search in code
PhocaMapsHelper

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;
	}
I fixed

Code: Select all

public static function fixImagePath($description) {
		$description = str_replace('src="/images', 'src="' . JURI::root(true) . '/images', $description);
		return $description;
	}
Working.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Do not display image in Marker description

Post by Jan »

Hi, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply