1
krewl
News Module, Whitespace and Includes
  • 2006/11/1 15:53

  • krewl

  • Just popping in

  • Posts: 39

  • Since: 2006/3/14


First, I have the latest News Module from xoops.org and the latest updates.

If I edit a document offline and get the table formats and past them into the News form, I get a mess of whitespace and extra break returns in the article page. I can clean it up by removing all whitespace between tags (offline), but its not practical if a user submits and is unaware.

So, I tried to remove the white space with the index page. I added a few lines:

->$story = str_replace('![\t ]*[\r\n]+[\t ]*!', '', $story);
->$story = str_replace(' ', '', $story); //This removed most table formatting
->$story = preg_replace('/\s+/','',$story); //Also removed table formatting... Don't know why

I also tried trim() and didn't help.

If there is something that I might be missing please let me know.

------------------
My preferred choice would be to allow an include, but I can't get any to show in the article.

I have tried the folling in the News form:



The php include's results are this:
include('path/doc.htm'); ?>

And the SSI include is blank.

Is it possible to include when adding it through the form? I have searched the forums for ways to include but they aren't relevant to including through a form...

Thanks.
-------------------
http://www.illinoisbmx.com

2
hervet
Re: News Module, Whitespace and Includes
  • 2006/11/22 13:03

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


I'm not really sure to understand but if you are writing html codes, then put them on a unique line.

Login

Who's Online

284 user(s) are online (196 user(s) are browsing Support Forums)


Members: 0


Guests: 284


more...

Donat-O-Meter

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

Latest GitHub Commits