xoops forums

Forum Index


Board index » All Posts




bob

Just popping in
Posted on: 2002/7/6 12:45
bob
bob (Show more)
Just popping in
Posts: 8
Since: 2002/1/9 1
#292191

Re: HTML problem in XOOPS and Other CMS?

<table border="0" width="913" bgcolor="#FFFFFF" cellspacing="1" height="2194" >
<tr>
<td width="148" height="132">
<p align="left"> </p>
</td>
<td width="751" colspan="4" rowspan="3" height="443">
<p align="left">

In your code above, you might try adding valign="top" to the table and td tags in which you have a specific height value. See if that pulls the text up some.


onokazu

XOOPS Founder
Posted on: 2002/7/6 1:50
onokazu
onokazu (Show more)
XOOPS Founder
Posts: 617
Since: 2001/12/13
#292192

Re: HTML problem in XOOPS and Other CMS?

If you need to just output data stored in DB as pure html, you can do so by just echoing the content.

so changing the line

echo makeTareaData4Show($content);

to

echo $content;

will allow you to just ouput your content in pure html format, bypassing the new line conversions in textsanitizer. However, this will also skip the smileys and xoopscodes conversions, and the allowed html tags checking routine.


jackt

Just popping in
Posted on: 2002/7/6 0:34
jackt
jackt (Show more)
Just popping in
Posts: 31
Since: 2002/6/2 2
#292193

Re: HTML problem in XOOPS and Other CMS?

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.


danyblue

Just popping in
Posted on: 2002/7/5 22:07
danyblue
danyblue (Show more)
Just popping in
Posts: 48
Since: 2002/4/15
#292194

Re: HTML problem in XOOPS and Other CMS?

Hi,
don't get me wrong, i am not unsatisfied with Xoops, in the contrary, I like a lot, i think that is far better than PHP nuke and others.
If I reported what seemed to me a problem is just to contribute to its evolution.
I am confident that a solution will come that will solve the problem and allow me to publish my hometown local newspaper in the net.

Regards,
Daniel


MaxIT

Just popping in
Posted on: 2002/7/5 15:18
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#292195

Re: Account re-activation required on Profile email changes

Quote:
Currently, once a user had created an account, he could change his/her email address to anything without any verifications.

In the waiting for this useful fix, I've skipped this problem by removing the option to change the email by XOOPS users (RC2-only hack)

Just look at the edituser.php file at line 43:

<table cellpadding='8' border='0'><tr><td><form name='userinfo' action='edituser.php' method='post'><b>". _US_REALNAME ."</b> ". _US_OPTIONAL ."<br /><input class='textbox' type='text' name='name' value='". $xoopsUser->name("E")."' size='30' maxlength='60' /><br /><b>". _US_EMAIL ."</b> ". _US_REQUIRED ."<br />". _US_THISWILLBEPUBLIC ."<br /><input class='textbox' type='text' name='email' value='". $xoopsUser->email("E") ."' size='30' maxlength='60' /><br />". _US_OPTION ." <input type='checkbox' name='user_viewemail' value='1'";

and change it in this way:

<table cellpadding='8' border='0'><tr><td><form name='userinfo' action='edituser.php' method='post'><b>". _US_REALNAME ."</b> ". _US_OPTIONAL ."<br /><input class='textbox' type='text' name='name' value='". $xoopsUser->name("E")."' size='30' maxlength='60' /><br /><b>". _US_EMAIL ."</b> ". _US_REQUIRED ."<br />". _US_THISWILLBEPUBLIC ."<br />". $xoopsUser->email("E") ."<br />". _US_OPTION ." <input type='checkbox' name='user_viewemail' value='1'";

Rc3 is some different and I'm still working on it (but should be easier)

Why should use a temporary solution? well, as soon I've published on xoops.it about this issue, just 2 minutes after lots of trolls was subscribing with fantasious email addresses


MaxIT

Just popping in
Posted on: 2002/7/5 14:14
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#292196

Re: HTML problem in XOOPS and Other CMS?

Quote:
The reason XOOPS lowers the message you paste is that TextSanitizer has convert all line breaks (PC style \r\n, Unix style \n and Mac style \r) to <br> automatically

A suggestion: add an additional XOOPS code (like i.e. [ HTMLONLY ]) to core system. Then, all text inside the HTMLONLY tags will be text-sanitized in a different way, avoiding to switch newlines to BR automatically.

In this way, you can still use easily your short HTML tags inside a text, but if you want to insert large HTML codes you can put them between this new tag, so they will be showed exactly as they are without any exceeding BR .


Posted on: 2002/7/5 14:01
goghs
goghs (Show more)
Posts: 8
Since: 2001/12/13
#292197

Re: HTML problem in XOOPS and Other CMS?

To tell the truth. this issue is not simple as you may think. Many users may find in PHPNuke, when you copy and paste html codes, and choose "HTML format", the outpu is good. But if you have noticed more detailed, you must find you have to add manually <br> to insert line break.
The reason XOOPS lowers the message you paste is that TextSanitizer has convert all line breaks (PC style \r\n, Unix style \n and Mac style \r) to <br> automatically.

It's a dillema. We can change the way to make pasted codes display as you expected, and you must add line breaks manually.

Also I wanna stress one thing: even html is allowed, you should use simple HTML tags like anchor, formatting tags etc. If you paste complicated html codes, especially table tags, the output may be messy. The reason is even XOOPS output well formatted HTML codes, if there is any unclosed table tags in theme file, the output will be corrupted.

Sure I understand you may be disappointed, and think XOOPS is not a good CMS. I should say it's a issue of choice. This is why no application as I know solves this problem well enough.

Sure we'll try to find a better solution. Just wanna know this problem is not simple in fact.


MaxIT

Just popping in
Posted on: 2002/7/5 13:11
MaxIT
MaxIT (Show more)
Just popping in
Posts: 65
Since: 2002/11/8
#292198

Re: HTML problem in XOOPS and Other CMS?

Quote:
If you are using HTML in a post is because you want to have a defined layout of you information, and you are expecting it to be where you are putting it

I think it is a different point of view regarding the Section's scope: allowing the use of HTML tags does not mean it needs HTML contents. Instead, Sections module would allow an unexperienced user to write a simple text document, so it needs to make all newlines as BRs. A quick & dirty hack should be probably a check to where is located your newline, and in case it's in the middle of HTML-only text part, then should skip the BR sanitizer.


danyblue

Just popping in
Posted on: 2002/7/5 12:55
danyblue
danyblue (Show more)
Just popping in
Posts: 48
Since: 2002/4/15
#292199

Re: HTML problem in XOOPS and Other CMS?

Hello,
I don't see why it would be normal to lower the content that you are trying to publish.
If you are using HTML in a post is because you want to have a defined layout of you information, and you are expecting it to be where you are putting it.
To right all the text in one line, isn't a solution. The solution is to removed the logic that is lowering the content, that way every one have what they want. If I want my content lower, i will do that myself puting some BR in the beginning of the content.
Regards,
Daniel


Posted on: 2002/7/5 10:11
goghs
goghs (Show more)
Posts: 8
Since: 2001/12/13
#292200

Re: HTML problem in XOOPS and Other CMS?

Yes, Jan304 is right. It's caused by myts processing logic when html post is allowed. Please wait for some time. I think I can solve it soon, though the first fix may be a quick and dirty one.