11
jackt
Re: News bug and a typo
  • 2003/1/15 11:01

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


He's just saying it's a typo. It currently says "Display diclaimer" not "Display disclaimer". It's missing the 's' in disclaimer.



12
jackt
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/17 21:17

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


Well i think freecontent and the sections modules do different things. So I don't think they should be integrated. But a new or better wysiwyg editor wouldn't really be on a per module basis, but a replacement of the editor in the class files (if that's where it resides, I don't know. At least it should be.



13
jackt
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/17 0:17

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


Hi, it's not my module, it's Haruki's. I just hacked it a little. But his module does support pagebreaks, just read the readme file included.



14
jackt
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/16 10:48

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


Well.. this line..

$text =preg_replace("/(\015\012)|(\015)|(\012)/","<br />", $text);

on display, text sanitizer will not replace all line breaks with <br /> tags. So if you say post a news article it wont output any line breaks submit.

The line you added removes all <br /> tags. So there will never be any line breaks in anything you post. At least none will be output. Basically text sanitizer converts line breaks into <br /> and then your line deletes that <br /> and all others. By default <br /> isn't in the "allowed html" anyways, but I added it to my XOOPS config.

I'm not sure what you are trying to do. I'll assume you're posting html into the textarea and it's coming out with a lot of <br /> tags ruining your formatting. Well what you did will prevent ANY line breaks from being displayed that goes thru text sanitizer, which accounts for just about (if not) all XOOPS modules that come packaged with xoops.

I've hacked up Haruki's wfsection module to include a switch to Enable Line Break Filtering on display. So when you check it, the script will filter out any line breaks in your code before it runs thru text sanitizer. This may solve your line break problem, but text sanitizer will still check for "allowed html". So if you're using any weird tags it still might cause you problems.. I'll add a checkbox to disable html, smilies and forum codes a little later. You can try this hacked up wfsections module here:

http://www.dailabs.com/wfsection_hack-612.zip

I'd suggest you try it out before using it in production environment.. I'll take no responsibility if anything blows up tho it shouldn't.



15
jackt
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/6 0:34

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


I ran into this same problem. I used NSections and needed to somehow bypass textsanitizer in some way from replacing my line breaks into <br \> tags. What I did was include a new field in the database called "ignoreCR" (ignore carriage returns). This is either 0 or 1. The article view function detects this value. If it's 1 then you want to bypass the line break replace. What I do is include this line:

$content = preg_replace("/(\015\012)|(\015)|(\012)/","",$content);

to replace all line breaks. Now everytime you view your article it will replace all your line breaks so that none exist. Your content will be a glob of code with no line breaks. Therefore textsanitizer can't insert any line breaks when it runs. It also only does this on view, so your code in the database still looks line break formatted. You'll also need to add <p \>, <p>, <br>, and <br \>, depending on which you use for line breaking, to your allowable html. The ones with the '\>' closing are to keep the xhtml 1.0 standard. You may even want to add all these to your allowable html tags. I thought this might cause from problems with other content, but it hasn't and I don't see how a user can misuse these tags to screw up your site. The file to edit this is in class/xoopslists.php.

Now whenever I want to import content that is html preformatted I just paste it in, set ignoreCR to 1 and it'll skip all line break replacements. I also had to add this to the admin forms, but it didn't take much work. Works like a charm for me so far.




TopTop
« 1 (2)



Login

Who's Online

147 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

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

Latest GitHub Commits