fatepower
01-31-2007, 10:36 PM
Hi i need help with turn off tinymce for this script (php). Im useing phpfox but that shoudnt have eny sence, I have html on in config and tinymce installed on my site but on this site musicadd.php ( a script there u can add music videos from exaple youtube, metacafe ect.. just html codes) but tinymce has hard to read the music-codes and not pasting them on the site so i need to turn tinymce off just for this page:
i think this can turn it off but i dont know where or how to paste it or if this is right?:
if ($_GET['action'] == 'music')
{
$tinyMCE = FALSE;
}
heres the script:
<?
if ( !defined('SECTION_MODE') )
{
define("PHPFOX_PROTECT","section_music");
define("PHPFOX_RUNTIME",TRUE);
define("PHPFOX_DIR","../");
define("PHPFOX_SCRIPT","music");
if (!@include_once(PHPFOX_DIR."phpfox_loader.php"))
{
die("<b>Fatal Error:</b> Cant Load ". PHPFOX_DIR ."phpfox_loader.php");
}
if (@$GLOBALS['phpfox_config']['error_reporting'])
{
error_reporting(0);
}
}
if (isset($_POST['text']))
{
if (!((((!($_POST['artist'] == '') AND !($_POST['title'] == '')) AND !($_POST['letter'] == '')) AND !($_POST['text'] == '')))) {
$FAIL2 = '<div style="font-size:10pt;" class="color"><b>Error:</b> Please fill out all the fields before adding your item. </div>';
} else {
phpfox_mysql_query("INSERT INTO `music` (`id`,`artist`,`title`,`code`,`letter`) VALUES ('$_POST[id]','$_POST[artist]','$_POST[title]','$_POST[text]','$_POST[letter]')");
$FAIL2 = "Your video has just been added.";
}
}
$a = phpfox_mysql_query("SELECT * FROM `music` ORDER BY `id` DESC LIMIT 0,1");
$b = mysql_fetch_array($a);
++$b['id'];
$DATA =<<<HTML
<form method="post" action="$VAR[0]/music/musicadd.php">
<input type="hidden" name="id" value="' .$b[id] . '" />
<table cellspacing="0" width="100%" class="forumline">
<tr>
<td class="row-header" colspan="2"><span><a href="$VAR[0]/adminpanel/?action=aW5kZXg=&source=YWRkX211c2lj">ADD TO MUSIC SECTION</a></span></td>
</tr>
<tr>
<td colspan="2" class="catBottom"><span class="gensmall">$FAIL2</span></td>
</tr>
<tr>
<td class="row1" width="38%" style="text-align:right;"><span class="gen">Artist:</span></td>
<td class="row2"><input type="text" name="artist" size="50" /></td>
</tr>
<tr>
<td class="row1" style="text-align:right;"><span class="gen">Songs Title:</span></td>
<td class="row2">
<input type="text" name="title" size="50" />
</td>
</tr>
<tr>
<td class="row1" width="38%" style="text-align:right;"><span class="gen">First Letter Or Number Of Artist Name:</span></td>
<td class="row2">
<select name="letter" style="width:100px;">
<option value="#">#</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E</option>
<option value="F">F</option>
<option value="G">G</option>
<option value="H">H</option>
<option value="I">I</option>
<option value="J">J</option>
<option value="K">K</option>
<option value="L">L</option>
<option value="M">M</option>
<option value="N">N</option>
<option value="O">O</option>
<option value="P">P</option>
<option value="Q">Q</option>
<option value="R">R</option>
<option value="S">S</option>
<option value="T">T</option>
<option value="U">U</option>
<option value="V">V</option>
<option value="W">W</option>
<option value="X">X</option>
<option value="Y">Y</option>
<option value="Z">Z</option>
</select>
</td>
</tr>
<tr>
<td class="row1" style="text-align:right;vertical-align:top;"><span class="gen">HTML source code for your video:</span></td>
<td class="row2"><TEXTAREA NAME="text" cols="40" rows="10"></TEXTAREA></td>
</tr>
<tr>
<td class="catBottom" style="text-align:right;"></td>
<td class="catBottom" style="text-align:left;font-size:8pt;">
<input type="submit" value="Add Video" />
</td>
</tr>
</table>
</form>
HTML;
include("html/template.php");
#############################
html_main($DATA,"","");
#############################
?>
here it only should be an textbox but the php is pasting the tinymce who is really bad :(
<td class="row2"><TEXTAREA NAME="text" cols="40" rows="10"></TEXTAREA></td>
i think this can turn it off but i dont know where or how to paste it or if this is right?:
if ($_GET['action'] == 'music')
{
$tinyMCE = FALSE;
}
heres the script:
<?
if ( !defined('SECTION_MODE') )
{
define("PHPFOX_PROTECT","section_music");
define("PHPFOX_RUNTIME",TRUE);
define("PHPFOX_DIR","../");
define("PHPFOX_SCRIPT","music");
if (!@include_once(PHPFOX_DIR."phpfox_loader.php"))
{
die("<b>Fatal Error:</b> Cant Load ". PHPFOX_DIR ."phpfox_loader.php");
}
if (@$GLOBALS['phpfox_config']['error_reporting'])
{
error_reporting(0);
}
}
if (isset($_POST['text']))
{
if (!((((!($_POST['artist'] == '') AND !($_POST['title'] == '')) AND !($_POST['letter'] == '')) AND !($_POST['text'] == '')))) {
$FAIL2 = '<div style="font-size:10pt;" class="color"><b>Error:</b> Please fill out all the fields before adding your item. </div>';
} else {
phpfox_mysql_query("INSERT INTO `music` (`id`,`artist`,`title`,`code`,`letter`) VALUES ('$_POST[id]','$_POST[artist]','$_POST[title]','$_POST[text]','$_POST[letter]')");
$FAIL2 = "Your video has just been added.";
}
}
$a = phpfox_mysql_query("SELECT * FROM `music` ORDER BY `id` DESC LIMIT 0,1");
$b = mysql_fetch_array($a);
++$b['id'];
$DATA =<<<HTML
<form method="post" action="$VAR[0]/music/musicadd.php">
<input type="hidden" name="id" value="' .$b[id] . '" />
<table cellspacing="0" width="100%" class="forumline">
<tr>
<td class="row-header" colspan="2"><span><a href="$VAR[0]/adminpanel/?action=aW5kZXg=&source=YWRkX211c2lj">ADD TO MUSIC SECTION</a></span></td>
</tr>
<tr>
<td colspan="2" class="catBottom"><span class="gensmall">$FAIL2</span></td>
</tr>
<tr>
<td class="row1" width="38%" style="text-align:right;"><span class="gen">Artist:</span></td>
<td class="row2"><input type="text" name="artist" size="50" /></td>
</tr>
<tr>
<td class="row1" style="text-align:right;"><span class="gen">Songs Title:</span></td>
<td class="row2">
<input type="text" name="title" size="50" />
</td>
</tr>
<tr>
<td class="row1" width="38%" style="text-align:right;"><span class="gen">First Letter Or Number Of Artist Name:</span></td>
<td class="row2">
<select name="letter" style="width:100px;">
<option value="#">#</option>
<option value="A">A</option>
<option value="B">B</option>
<option value="C">C</option>
<option value="D">D</option>
<option value="E">E</option>
<option value="F">F</option>
<option value="G">G</option>
<option value="H">H</option>
<option value="I">I</option>
<option value="J">J</option>
<option value="K">K</option>
<option value="L">L</option>
<option value="M">M</option>
<option value="N">N</option>
<option value="O">O</option>
<option value="P">P</option>
<option value="Q">Q</option>
<option value="R">R</option>
<option value="S">S</option>
<option value="T">T</option>
<option value="U">U</option>
<option value="V">V</option>
<option value="W">W</option>
<option value="X">X</option>
<option value="Y">Y</option>
<option value="Z">Z</option>
</select>
</td>
</tr>
<tr>
<td class="row1" style="text-align:right;vertical-align:top;"><span class="gen">HTML source code for your video:</span></td>
<td class="row2"><TEXTAREA NAME="text" cols="40" rows="10"></TEXTAREA></td>
</tr>
<tr>
<td class="catBottom" style="text-align:right;"></td>
<td class="catBottom" style="text-align:left;font-size:8pt;">
<input type="submit" value="Add Video" />
</td>
</tr>
</table>
</form>
HTML;
include("html/template.php");
#############################
html_main($DATA,"","");
#############################
?>
here it only should be an textbox but the php is pasting the tinymce who is really bad :(
<td class="row2"><TEXTAREA NAME="text" cols="40" rows="10"></TEXTAREA></td>