Page Editor Glitches

Forum
Last Post
Threads / Messages

AlexC

Moderator
Moderator
Joined
Dec 17, 2009
Messages
742
Points
0
Age
28
Location
Canada
Mysidian Dollar
43,036
I mentioned this briefly in another thread, but another issue there arose, so I'm reposting it.

I'm having issues with my page editor creating massive spaces, line breaks ans shoving things like tables and forms far down the page. I've taken some screenshots;

This is of a page right now;

33as9ap.jpg



This is what it looks like when I'm editing it;

6iwg8y.jpg



And this is the preview the editor provides;

2jfbmlz.jpg


I have some live examples;

http://ratties.x10.mx/contact.php
http://ratties.x10.mx/sites.php
http://ratties.x10.mx/index.php
http://ratties.x10.mx/contests.php

I can throw a table up if anyone would like to see - the pages that look half decent have been dramatically altered through the editor to get them as normal looking as possible.
 
Yep had that problem too, which is why I don't use the editor at all. I'm so sure that helps you tons. LoL
 
You can disable the editor? Darn, that'd be nice. It's great in theory and for beginners, but I prefer to be given the barebones and work up from there. I can do a ton more with bbcodes.
 
Well the CKEditor inserts an empty line into the database out of nowhere. You can find the page from table prefix.content and edit out the <p> which is causing problem.
 
Sorry for the delay in getting back, issues...

Anyway, I tried looking for an extra <p> in my content table and couldn't find it. Actually, in the content area, it looks (html wise) exactly how I wanted it to appear.
 
Well at this point you can fix this by going to phpmyadmin and edit table prefix.content. Remove every instance of <div> and </div> except for the one at the beginning or end of a paragraph. An example is shown here(as you find from table prefix.content:

PHP:
<div>
    <u><strong>The Excellent CKEditor Page!</strong></u></div>
<div>
    But looks like linebreak is not working, umm...</div>
The <div> and </div> at the beginning/end of the entry should remain untouched, what to do with the extra <div>'s inside the entry is up to you though. If I remove the inner </div><div> I will get this:

PHP:
<div>
    <u><strong>The Excellent CKEditor Page!</strong></u>
    But looks like linebreak is not working, umm...</div>
And the page will appear normally without linebreak. For now this is what you can do, and by the release Mys v1.3.2 I will figure out a better and easier way to fix this extra linebreak issue since not everyone knows how to edit in phpmyadmin.
 
Okay, so I did that on the index page and I didn't seem to notice a difference, so I went to check the contest page and edit that thinking perhaps I'd get better results, and here is what it looks like;

Code:
<div style="text-align: center;">
	I am your best follower,</div>
<div style="text-align: center;">
	Constant as the air,</div>
<div style="text-align: center;">
	Forever lingering near the ground,</div>
<div style="text-align: center;">
	I will keep at your heels all day long</div>
<div style="text-align: center;">
	But come the night I vanish,</div>
<div style="text-align: center;">
	And come the midday sun I hide.</div>
<div style="text-align: center;">
	 </div>
<div style="text-align: center;">
	What am I?</div>
<div style="text-align: center;">
	 </div>
<div style="text-align: center;">
	<em>Message Bea the answer and she'll reward you with nibbles and a </em>Standard Amber Bareback Rat.</div>
<div style="text-align: center;">
	Check back on the first of May for another riddle!</div>
<div style="text-align: center;">
	 </div>
<div style="text-align: center;">
	<a href="http://ratties.x10.mx/forum/private.php?action=send&uid=1">Click here to answer!</a></div>

I'm... not really sure how to remove all those divs without destroying it.
 
Remove every instance of the following code as below except when you actually want a linebreak.

PHP:
</div> <div style="text-align: center;">
And I can fix it for you now:

PHP:
<div style="text-align: center;">    
 I am your best follower,     
Constant as the air,     
Forever lingering near the ground,     
I will keep at your heels all day long     
But come the night I vanish,     
And come the midday sun I hide.</div> 
<div style="text-align: center;">     
What am I?      </div> 
<div style="text-align: center;">     
<em>Message Bea the answer and she'll reward you with nibbles and a </em>Standard Amber Bareback Rat.     
Check back on the first of May for another riddle!</div> 
<div style="text-align: center;">     
<a href="http://ratties.x10.mx/forum/private.php?action=send&uid=1">Click here to answer!</a></div>
 
I Have figured out what causes the massive spaces, line breaks and shoving things like tables and forms far down the page.

In The File-Manager, Open Whatever php you want to edit. and search for this line
PHP:
// Convert line breaks to <br>
$article_content = nl2br ($article_content);

Replace it with this:
PHP:
// Convert line breaks to <br>
$article_content = ($article_content);

Fixed.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top