The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Mar 18, 2010 6:31 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Feb 13, 2007 9:40 am
Posts: 40
Hi there,

I have been having an issue with hr id="system-readmore".

For some unknown reason, the JCE is wrapping hr id="system-readmore" with a div tag as in:

Code:
<div dir="rtl" style="text-align: right;">
    <hr id="system-readmore" />
</div>


This basically results in a left module sliding to the bottom left, so I need to find a way of eliminating the div tag in hr id="system-readmore".

I have set Use Template CSS=NO, but Still, not good

JCE Versions:

Component Version 1.5.7
Plugin Version 1.5.6

Joomla Version:

Joomla! 1.5.15 Stable


Any thoughts?

Cheers,Tamirzzz


Top
 Profile  
 
PostPosted: Sun Mar 21, 2010 1:01 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Fri Aug 12, 2005 7:19 am
Posts: 9206
Location: Leeds, UK
Are you using the joomla readmore button at the bottom of the editor window or the one in the JCE toolbar. I found I get better results with the one in the toolbar.

_________________
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/


Top
 Profile  
 
PostPosted: Mon Oct 04, 2010 9:07 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Sep 28, 2010 12:45 pm
Posts: 6
Hey Tamirzzz,

I'm having exact same problem, except in my case the editor is Tiny, and the div only holds the read-more tag without options.

Have you found a solution for this?


Top
 Profile  
 
PostPosted: Tue Jan 18, 2011 5:11 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Mon Feb 16, 2009 4:38 am
Posts: 337
I am having the same issue.


Top
 Profile  
 
PostPosted: Sat Mar 31, 2012 9:24 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat May 08, 2010 1:04 am
Posts: 17
I am having the same issue and I can't find a simple answer. I am using joomla 2.53 and i have over 2000 articles that I simply want to remove the "hr id="system-readmore" \div" in every article because it messes up some of the pages. Its not in the databse (or atleast dbreplacer doesn't show it).

There has got to be a simple answer to this question.


Top
 Profile  
 
PostPosted: Sat Jun 30, 2012 6:38 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jun 28, 2012 3:40 am
Posts: 4
anyone find a fix yet - same issue


Top
 Profile  
 
PostPosted: Wed Jul 18, 2012 4:05 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Jul 18, 2012 3:47 am
Posts: 1
I had the same issue and corrected it getting my hands dirt in the plugins code.
I'd have preferred a non-intrusive solution, but for now is still a solution.

My versions are:
    Joomla! is 1.5.20
    fckeditor.class.php 1154 03-8-2009 Andrew
    readmore.php 14401 2010-01-26 14:10:00Z louis
These files could have been modified by previous developers that worked on my client site, so I'm not sure you'll find the same lines of code.

I've first edited plugins/editors/fckeditor.class.php changing the following line:
Code:
return " oFCKeditor.InsertHtml = '" .  htmlentities($html) . "'; ";
with:
Code:
return " FCKeditorAPI.GetInstance('$editor').SetHTML('$html'); ";

I made this change because the original piece of code simply didn't work, as variable oFCKeditor is not defined in the scope of the function insertReadmore.

And then edited plugins/editors-xtd/readmore.php changing the following block:
Code:
   $js = "
      function insertReadmore(editor) {
         var content = $getContent
         if (content.match(/<hr\s+id=(\"|')system-readmore(\"|')\s*\/*>/i)) {
            alert('$present');
            return false;
         } else {
            jInsertEditorText('<hr id=\"system-readmore\" />', editor);
         }
      }
   ";
with:
Code:
   $setContent = $this->_subject->setContent($name, "'+content+'");
   $js = "
      function insertReadmore(editor) {
         var content = $getContent
         var systemReadmoreStr = '<hr id=\"system-readmore\" />';
         if (content.match(/<hr\s+id=(\"|')system-readmore(\"|')\s*\/*>/i)) {
            alert('$present');
         } else {
            jInsertEditorText(systemReadmoreStr, editor);
            content = $getContent
         }
         content = content.replace(/(<(div|p)[^>]*>)?\s*<hr\s+id=(\"|')system-readmore(\"|')\s*\/*>\s*(<\/(div|p)>)?/i, systemReadmoreStr);
         $setContent
      }
   ";

What I do here is to replace any hr element with id "system-readmore" surrounded by a div or p element with the hr element alone.
I placed it out of the if statement just to make it easier for the editors to clean previous articles (they can open old article and simply click the "readmore button" to clean the article code and save.

It's a quick solution, I'm sure and hope someone will come out with a better solution.
Hope it helps :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group