1
Peekay
AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 15:23

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


There isn't a checkbox option to disable XOOPS line breaks in AMS when using a wysiwyg editor and I'm getting line breaks in all the wrong places.

I tried the this code hack in the XK_Editor (Koivi) module comments but that doesn't seem to work either.

Is there a fix?
A thread is for life. Not just for Christmas.

2
dickinsd
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 15:46

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Not sure if this is the same thing, but I was asking about html at ITHQ a few days back, as I was getting blank lines for each HTML tag, unfortunately I was told that it's not really the job of the modules:

Quote:
Hi Dave,

HTML is a tricky one, and the reason that very few article modules can handle it properly is because strictly speaking it is not a job for the module. All the text you put into your article must first pass through the XOOPS text sanitizer, and it is usually here that the issues with HTML begin. Haven't uses the articles module in a while, but I would assume it uses some sort of work around for the XOOPS text sanitizer to get around the issue your having.

This answer was in relation to a question about HTML not appearing properly in AMS but fine in Articles, articles does offer more support for HTML in that you can tick a box so that the module ignores the lines that HTML tags are on, AND you can tick a box to remove blank lines. this combination seems to be the best I have seen in any articles module.

However for me, at the time I felt that AMS could offer a bit more in other areas of the module (but perhaps I was mistaken as the latest version of articles has improved on the version I was using)
Anyway I had already decided to go with AMS by that point and have rewritten my articles so that they are better suited to AMS.

AMS is a great module, but if you can't be bothered rewriting articles to get rid of blank lines etc then I would recommend the articles module from sirium.net.
link: click

To be honest, It is my opinion that the best module would be a combination of both, at the very least if your a programmer you could maybe rip the functions from the articles module that deal with line breaks and html and modify AMS to be a 'super' module.

I don't have such skills though which is why I ended up rewriting (Or at least editing) my existing articles.

Dave

3
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 15:55

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Sorry, to clarify that:

In Firefox there's a problem if there's a line break in the text (e.g. cut-n-pasted). It may not show in wysiwyg mode, but in HTML view if there's a line break, it is preserved and carried through to the article on saving.

If I edit the same file in Internet Explorer, Koivi removes the breaks and saves the file properly. That particular problem looks like a Koivi + Firefox issue, not an AMS one.

However, pressing 'Enter' twice (to create a para break in Koivi) results in 4 < br > tags in the code, even in IE, so something is wrong.
A thread is for life. Not just for Christmas.

4
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 16:02

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Hi dickinsd.

In 'News' and 'SmartSection' there's a checkbox to disable XOOPS linebreaks if you are using an HTML editor. If you forget to check it, you get the same problem.

I just wondered why that wasn't in AMS?.

Got another problem too. When you select 'Preview', all the illegal chars in the textarea are escaped, e.g.

Quote:
Bob\'s your Uncle


No change to my Magic Quotes settings. Using the same Koivi in AMS and SmartSection and only does this in AMS.
A thread is for life. Not just for Christmas.

5
Jaypee
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 16:03

  • Jaypee

  • Just popping in

  • Posts: 19

  • Since: 2003/4/26


If you look for my comments here:

https://xoops.org/modules/news/article.php?storyid=2617

You'll find what I did to get around this issue

(Mine is somewhere around the 17th comment, under the name "Jaypee")

6
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 16:17

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@Jaypee.
Many thx. Yours was the code hack I mentioned in my first post. Didn't work for me last time, but I'll try it again.
A thread is for life. Not just for Christmas.

7
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 16:57

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@Jaypee. Your fix works if I change:
$text str_replace("<br />""<br />"$text);

to:
$text str_replace("<br /><br />""<br />"$text);

This doesn't seem to have an adverse affect using Koivi + SmartSection either, but... it kills XOOPS line breaks in any block or module that doesn't use a wysiwyg editor.

This really needs a fix in AMS IMHO.

Failing that, are there any PHP wizzards that can hack AMS to disable XOOPS linebreaks like in 'News' or 'SmartSection' as dickinsd suggested?
A thread is for life. Not just for Christmas.

8
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/10 17:25

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Quote:
In 'News' and 'SmartSection' there's a checkbox to disable XOOPS linebreaks

Apologies, I'm wrong. Only a checkbox in SmartSection. In News it just works automatically.
A thread is for life. Not just for Christmas.

9
Peekay
Re: AMS - How do I disable Xoops linebreaks?
  • 2005/12/12 18:34

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Bump. Want to use AMS but this makes it unusable for me at the moment.

I'm also confused, 'cos I thought the core of AMS was based on 'News'. Koivi works fine in news.
A thread is for life. Not just for Christmas.

Login

Who's Online

236 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 236


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits