Author |
Message |
benson
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/d565e607446586bbb82ae.jpg)
Joined: May 15, 2004
Posts: 119
Location: Germany
|
Posted:
Sun Jun 12, 2005 4:07 am |
|
Hello,
Code:
OpenTable();
echo stripslashes($kommentar);
CloseTable();
...
echo "<form action=\"modules.php?name=".$module_name."\" method=\"post\" name=\"Kommentarkontrolle\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"".$kommentar."\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</form>\n";
|
I try to use above code to enable the user to verify his entered comment.
If I key some text in the 'new' editor wich is centered, using the TINY MCE option, I have the following problem.
The left part of the centered text, e.g. I key 'test', will show up direct in front of the button 'speichern'. For a centered text 'test' there is 'test">' shown before the button ?
The variable '$kommentar' will be shown correctly in the echo part, but after submitting with above form to save in my SQL fields, there is only '<div align=\' saved.
So, saved '<div align=\' plus shown 'test">' will nearly be the content I want to have ... '<div align=\test">' (missing "center\"></div>)
In the editors html option the following code is schown: <div align="center">test</div> ...
What is going wrong ? I do not understand why the content of $kommentar is splitted ...
Please help, even I am using phpNuke 7.7 patched ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
64bitguy
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/183ecd6a404a3683445de.gif)
Joined: Mar 06, 2004
Posts: 1164
|
Posted:
Sun Jun 12, 2005 5:48 pm |
|
I'm a little confused about what you are describing, but let me start by asking where exactly are you putting this? What page?
Normally, you would structure your forms with a table scenario.
The normal structure would be something like this:
Code:<form...><table....><tr....><td.....><input....></td></tr></table></form>
|
For example. Using the above as an example:
Code:OpenTable();
echo stripslashes($kommentar);
CloseTable();
...
echo "<form action=\"modules.php?name=$module_name\" method=\"post\" name=\"Kommentarkontrolle\">\n";
echo "<table width=\"90%\" cellpadding=\"0\" cellspacing=\"2\"><tr><td align=\"left\">";
echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"$kommentar\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</td></tr></table></form>\n";
|
Now, if you wanted to move your button around, you would close the <td> before the input submit and add a new one like this:
Code:echo "<form action=\"modules.php?name=$module_name\" method=\"post\" name=\"Kommentarkontrolle\">\n";
echo "<table width=\"90%\" cellpadding=\"0\" cellspacing=\"2\"><tr><td align=\"left\">";
echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"$kommentar\"></td><td align=\"center\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</td></tr></table></form>\n";
|
In this example, it would move the button to the center of your defined table size. If you wanted, you could even add background colors and you would do that inside the <TD> call before the the element itself.
Now, if you wanted to add a column space, you would first close both the <TD> and <TR> elements and open new ones. For example:
Code:echo "<form action=\"modules.php?name=$module_name\" method=\"post\" name=\"Kommentarkontrolle\">\n";
echo "<table width=\"90%\" cellpadding=\"0\" cellspacing=\"2\"><tr><td align=\"left\">";
echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"$kommentar\"></td></tr><tr><td align=\"center\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</td></tr></table></form>\n";
|
Remember, if you have a form above this one, you need to close it (and the table) before adding this one. The reason being is that you can't (according to compliance rules) nest a form inside another form, nor can you create new form elements (like calling for an input) inside a <tr> or <table> element. (Meaning again, the form call can't come after the table, but rather must be before it).
While I realize that you've probably seen examples to the contrary inside of PHP-Nuke, I want to emphasize that THEY ARE WRONG. Many of those compliance issues have yet to be fixed in Nuke (though I have made my site completely compliant and raven has done a great job working on his here as well.)
Hope this helps.
Steph |
_________________ Steph Benoit
100% Section 508 and W3C HTML5 and CSS Compliant (Truly) Code, because I love compliance. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
benson
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 13, 2005 12:00 am |
|
Hello,
thanks for your help, but I think my question was not exact enought ...
I cut the code excamples to be shorter, I know that I can/must use <table> functions to get a layout that fits my needs.
Here is a picture of my entry form:
The values are submitted via POST and shown on the next site:
(Remember, I use TINY MCE and e.g. the center option)
Here you see the 'test">' text in front of the button.
The <form> I use here is completely made with hidden inputs to get the values if 'speichern' is pressed as confirmation.
Code:echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"$kommentar\">\n";
|
Therefor I assume that the value of variable $kommentar contains code that cause this error. My question is now, how can I check the input from a <textarea> part ?
Code: echo "<center><form action=\"modules.php?name=".$module_name."\" method=\"post\" name=\"Kommentareingabe\">\n";
echo "<textarea cols=\"70\" rows=\"15\" name=\"kommentar\"></textarea>\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"speicherKommentar\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"ok\" VALUE=\"0\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"tid\" VALUE=\"".$tid."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"datum\" VALUE=\"".$curDate." ".$curTime."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"ip\" VALUE=\"".$absender_ip."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kuser\" VALUE=\"".$user_name."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kemail\" VALUE=\"".$user_email."\">\n";
echo "<br><INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</form></center>\n";
|
I know that there are serious concerns against 7.7 and 7.8, but is there anything I can do to check the content of a submitted <textarea> my self ?
Many thanks for your help anyway ...
btw: that is my code for the input part:
Code:echo "<table bgcolor=\"".$bgcolor1."\" border=\"0\" align=\"center\" width=\"100%\" cellspacing=\"0\" cellpadding=\"5\">\n";
echo "<tr>\n";
echo "<td align=\"right\" width=\"210\">\n";
echo "<h1>Kommentar:</h1>\n";
echo "</td>\n";
echo "<td valign=\"top\">\n";
OpenTable();
echo stripslashes(FixQuotes($kommentar));
CloseTable();
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width=\"210\"> </td>\n";
echo "<td align=\"left\" valign=\"middle\">\n";
echo "<form action=\"modules.php?name=".$module_name."\" method=\"post\" name=\"Kommentarkontrolle\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"op\" VALUE=\"speicherKommentar\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"ok\" VALUE=\"1\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"tid\" VALUE=\"".$tid."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"datum\" VALUE=\"".$datum."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"ip\" VALUE=\"".$ip."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kuser\" VALUE=\"".$kuser."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kemail\" VALUE=\"".$kemail."\">\n";
echo "<INPUT TYPE=\"hidden\" NAME=\"kommentar\" VALUE=\"".$kommentar."\">\n";
echo "<INPUT TYPE=\"submit\" VALUE=\"speichern\">\n";
echo "</form>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
RendiBoy
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Apr 27, 2004
Posts: 9
|
Posted:
Fri Oct 27, 2006 5:50 am |
|
Hi!
I have a problem.
I use NSN News.
This in NSN news doesn't visible Tiny MCE.
Maybe work NSN news with FCK editor or Wysiwyg Spaw editor?
My Nuke Version: v7.7 patch 3.2 C
Help! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|