Emotion creates wrong link...

Phoca Guestbook - creating guestbooks in Joomla! CMS
tkn
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 28 Mar 2011, 15:40

Emotion creates wrong link...

Post by tkn »

Hi,

when guys want to use smilies/emotions in my phoca guestbook the insert emotions pop-up works fine but when you than submit the post to the guestbook the link changes from http://www.mysite.de/joomla16/media/edi ... y-cool.gif to
<img src="/joomla16/../../media/editors/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif" alt="Cool" title="Cool"> and with that link the emotion can not work, of course.

Does anyone have the same problem or know how to solve it. I can't found anything about it on google.

Thx,
tkn
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 28 Mar 2011, 15:40

Re: Emotion creates wrong link...

Post by tkn »

No idea ??

Or does anyone know, where will this link created? There must be a wrong entry in my system :(

Thx!
ändi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 30 Mar 2011, 19:39

Re: Emotion creates wrong link...

Post by ändi »

Hi!
I have the same problem.
Have you installed the version for Joomla 1.6?

Do you already have a solution?
ändi
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 30 Mar 2011, 19:39

Re: Emotion creates wrong link...

Post by ändi »

I have a solution :D :

In the file components/com_phocaguestbook/views/guestbook/tmpl/default.php of the Joomla installation there is already a hack from lines 119 to 123. I repeated these lines directly following this hack and changed the paths:

Code: Select all

if (function_exists('str_ireplace')) {
  $values->content = str_ireplace ('../media/editors/tinymce/', 'media/editors/tinymce/', $values->content);
} else {		
  $values->content	= str_replace ('../media/editors/tinymce/', 'media/editors/tinymce/', $values->content);
}
Works fine for me. I hope it helps you too.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48739
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Emotion creates wrong link...

Post by Jan »

Ok, thank you for this guide.

Jan
If you find Phoca extensions useful, please support the project
tkn
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 28 Mar 2011, 15:40

Re: Emotion creates wrong link...

Post by tkn »

It helps me a lot. i needed to change the folders quite similar, because i have joomla in an extra folder like that:

Code: Select all

		if (function_exists('str_ireplace')) {
			$values->content	= str_ireplace ('../media/editors/tinymce/', '/joomla16/media/editors/tinymce/', $values->content);
		} else {		
			$values->content	= str_replace ('../media/editors/tinymce/', '/joomla16/media/editors/tinymce/', $values->content);
		}

Thx a lot !!!
Nimras
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 17 Sep 2011, 16:04

Re: Emotion creates wrong link...

Post by Nimras »

I tried this yes now the smileys work in the front end but when i go to edit a post where there are smileys i only see blank spots.

And it has changed the code to: <img src="../media/editors/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif" border="0" alt="Cool" title="Cool">

Which offcourse do not work it should be: <img src="media/editors/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif" border="0" alt="Cool" title="Cool">

Ohh if i go back to the old file that are edited in this topic i get this when i go into back end editor: <img src="../media/editors/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif" border="0" alt="Cool" title="Cool">

Any ideas to why that goes wrong?
Post Reply