Hello all,
actually,I have a php page where i want to include fckeditor. My tutes.php(which is source/admin and also here fckeditor.php as well as fckeditor folder as well as emoticons.php) is as follows
$this->output = "<script language='Javascript' src='../FCKeditor/fckeditor.js'></script>";
$this->output = "<script> function FCKeditor_OnComplete( editorInstance )
{
window.status = editorInstance.Description ;
}</script>";
//var sBasePath =document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
include('fckeditor.php');
$oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
//oFCKeditor.BasePath = sBasePath ;
$oFCKeditor->Value = "";
//</script>
$this->output = "<script language='Javascript' src='js/code.js'></script>";
$this->output .= $html->start_form("act=tutes&CODE=02&type=02","POST","add","enctype='multipart/form-data'");
$this->output .= $html->row("Name of the tutorial",$html->textbox("tutename",stripslashes($r->title)));
$this->output .= $html->row("Author's name",$html->textbox("name",stripslashes($r->author_name)));
$this->output .= $html->row("Description",$html->textarea("desc",stripslashes($r->descr),40,5));
$this->output .= $html->row("Introductory title",$html->textbox("intro",stripslashes($r->intro)));
$this->output .= $html->row("Thumbnail image<br>Image size must be 70x70<br><i>Choose only if you want to change the current thumbail! - Optional</i>",$html->file("s_image",""));
$this->output .= $html->head("Link only tutorial");
$this->output .= $html->row("Link",$html->textbox("link",$r->link));
$this->output .= $html->head("Normal tutorial");
$this->output .= $html->head(array("Tutorial",""));
$this->output .= $html->row("array($func->build_emoticons(),$oFCKeditor->ReturnFCKeditor('tutorial'))");
The page is coming with this error
IPB WARNING [2] Missing argument 2 for row() (Line: 647 of /sources/Admin/admin_class.php)
and admin_class.php (line number 645 to 647 is)
function row($text,$text2) {
return "<tr>\n<td width='50%' id='col1'>$text</td>\n<td width='50%' id='col2'>$text2</td>\n</tr>\n";
}
why the editor otion is not coming????
actually,I have a php page where i want to include fckeditor. My tutes.php(which is source/admin and also here fckeditor.php as well as fckeditor folder as well as emoticons.php) is as follows
$this->output = "<script language='Javascript' src='../FCKeditor/fckeditor.js'></script>";
$this->output = "<script> function FCKeditor_OnComplete( editorInstance )
{
window.status = editorInstance.Description ;
}</script>";
//var sBasePath =document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
include('fckeditor.php');
$oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
//oFCKeditor.BasePath = sBasePath ;
$oFCKeditor->Value = "";
//</script>
$this->output = "<script language='Javascript' src='js/code.js'></script>";
$this->output .= $html->start_form("act=tutes&CODE=02&type=02","POST","add","enctype='multipart/form-data'");
$this->output .= $html->row("Name of the tutorial",$html->textbox("tutename",stripslashes($r->title)));
$this->output .= $html->row("Author's name",$html->textbox("name",stripslashes($r->author_name)));
$this->output .= $html->row("Description",$html->textarea("desc",stripslashes($r->descr),40,5));
$this->output .= $html->row("Introductory title",$html->textbox("intro",stripslashes($r->intro)));
$this->output .= $html->row("Thumbnail image<br>Image size must be 70x70<br><i>Choose only if you want to change the current thumbail! - Optional</i>",$html->file("s_image",""));
$this->output .= $html->head("Link only tutorial");
$this->output .= $html->row("Link",$html->textbox("link",$r->link));
$this->output .= $html->head("Normal tutorial");
$this->output .= $html->head(array("Tutorial",""));
$this->output .= $html->row("array($func->build_emoticons(),$oFCKeditor->ReturnFCKeditor('tutorial'))");
The page is coming with this error
IPB WARNING [2] Missing argument 2 for row() (Line: 647 of /sources/Admin/admin_class.php)
and admin_class.php (line number 645 to 647 is)
function row($text,$text2) {
return "<tr>\n<td width='50%' id='col1'>$text</td>\n<td width='50%' id='col2'>$text2</td>\n</tr>\n";
}
why the editor otion is not coming????
RE: Want to add fckeditor in php file
put the complete editor in a subfolder of the location of your own php file. Name the Folder "FCKeditor".
Change your include to "./FCKeditor/fckeditor.php"
Do your custum commands on your Editor object and than call Create() on your object, this will echo the editor.
If you need it like I do, just change the fckeditor.php and change substitute "echo" with "return" (Create()).
This is how it worked for me.