PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
benson
Worker
Worker


Joined: May 15, 2004
Posts: 119
Location: Germany

PostPosted: Sun Jun 12, 2005 4:07 am Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1140
Location: Manchester, NH USA

PostPosted: Sun Jun 12, 2005 5:48 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
benson
Worker
Worker


Joined: May 15, 2004
Posts: 119
Location: Germany

PostPosted: Mon Jun 13, 2005 12:00 am Reply with quote Back to top

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:

Image

The values are submitted via POST and shown on the next site:
(Remember, I use TINY MCE and e.g. the center option)

Image

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."&nbsp;".$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\">&nbsp;</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";
View user's profile Send private message Visit poster's website
RendiBoy
New Member
New Member


Joined: Apr 27, 2004
Posts: 9

PostPosted: Fri Oct 27, 2006 5:50 am Reply with quote Back to top

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!
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum