Zen Cart Logo
Forums / All Other Contributions/Addons / FCKeditor 2.4.3 - Content Editor addon for Zen Cart

FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Locked

Views: 35,792

Results 81 to 100 of 149
This thread is locked. New replies are disabled.
29 Jan 2008, 1:19 AM
#81
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Jbraz:

Thanks Diva, tried that but doesn't work. It doesn't even show up for me if I am adding a new product. I get the same thing, the top toolbar but no text area to enter anything into. Like I said, it works fine on the Define Pages but not anywhere in the Products section.Well I got nothing else in the way of suggestions..:cool: I know how it is trying to get something to work, and it doesn't work the way you want.. I'm sure it's something minor.. Wish I could be more help.. :dontgetit

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Jan 2008, 9:27 AM
#82
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Website Rob:

testuser, I am wondering if there is any difference between the version offered at your site and the one offered at the FCKeditor script site, other than the version currently available.

Hello Website Rob,

No there isn't, except that it's coded to plug into Zen Cart. The structure and necessary files per say.

Jbraz:

Thanks Diva, tried that but doesn't work. It doesn't even show up for me if I am adding a new product. I get the same thing, the top toolbar but no text area to enter anything into. Like I said, it works fine on the Define Pages but not anywhere in the Products section.

Hello Jbraz,

Try this. Depending on the version of PHP your server is running you'll need to edit one of the following files (You can find out here-> Tools :: Server/Version Info):

admin/includes/fckeditor_php4.php
admin/includes/fckeditor_php5.phpFind this line and change 200 to let's say 500 see if it makes a difference for you:

$this->Height        = '200' ;

Colin @ iChoze Internet Solutions
Zen Cart Stuff powered by Zen Cart
http://zen-cart-templates.ichoze.net

29 Jan 2008, 10:39 PM
#83
jbraz avatar

jbraz

New Zenner

Join Date:
Mar 2007
Posts:
59
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Testuser , I don't have either of those files in my admin/includes. I do have a fckeditor.php file and I checked my server info and am running PHP 5 . Found this section in that fckeditor.php file

 
// PHP 5 Constructor (by Marcus Bointon <[email protected]>)
function __construct( $instanceName )
{
$this->InstanceName = $instanceName ;
$this->BasePath = DIR_WS_CATALOG.'editors/fckeditor/' ;
$this->Width = '100%' ;
$this->Height = '250' ;
$this->ToolbarSet = 'Default' ; // 'Default'/blank or "Basic"
$this->Value = '' ; // default text
$this->EditorAreaCSS = DIR_WS_CATALOG . 'includes/templates/template_default/css/stylesheet.css';
$this->AutoDetectLanguage = true ;
$this->DefaultLanguage = strtolower($_SESSION['languages_code']);
// $this->CanUpload = 'true' ; // true or none
// $this->CanBrowse = 'true' ; // true or none
$this->Config = array() ;

I did try changing the $this->Height = '250'; to 500 but it made no difference.

Any other suggestions ? Is there a file I need to check and maybe post the contents here for you to check ?

Thanks for the help on this.

29 Jan 2008, 10:57 PM
#84
jbraz avatar

jbraz

New Zenner

Join Date:
Mar 2007
Posts:
59
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Also, in case this may help, I clicked the View Document on the fck editor toolbar there and it gives me this error

An error has occured in the script on this page
Line 31
Char 1
'parent FCKeditor document' is null or not an object
/editors/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html
29 Jan 2008, 11:10 PM
#85
jbraz avatar

jbraz

New Zenner

Join Date:
Mar 2007
Posts:
59
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

OK, I checked on the server and there was a fckeditor_php5.php file so I downloaded it to my local HD, edited it and changed the 200 to 500, reuploaded it, logged off my admin, closed my browser then opened a new one and logged back in and checked again but still no area to input text or anything while adding a new product or editing an exisisting one.

Here is my fckeditor_php5.php file in case it may help.

 
This is the integration file for PHP 5.
*
* It defines the FCKeditor class that can be used to create editor
* instances in PHP pages on server side.
*/
class FCKeditor
{
var $InstanceName ;
var $BasePath ;
var $Width ;
var $Height ;
var $ToolbarSet ;
var $Value ;
var $EditorAreaCSS ;
var $AutoDetectLanguage ;
var $DefaultLanguage ;
var $Config ;
// PHP 5 Constructor (by Marcus Bointon <[email protected]>)
function __construct( $instanceName )
{
$this->InstanceName = $instanceName ;
$this->BasePath = HTTP_SERVER . DIR_WS_CATALOG. 'editors/fckeditor/' ; 
$this->Width = '100%' ;
$this->Height = '500' ;
$this->ToolbarSet = 'Default' ;
$this->Value = '' ;
$this->EditorAreaCSS = HTTP_SERVER . DIR_WS_ADMIN . 'includes/stylesheet.css';
$this->AutoDetectLanguage = true ;
$this->DefaultLanguage = strtolower($_SESSION['languages_code']);
$this->Config = array() ;
}
function Create()
{
echo $this->CreateHtml() ;
}
function CreateHtml()
{
$HtmlValue = htmlspecialchars( $this->Value ) ;
$Html = '<div>' ;
if ( $this->IsCompatible() )
{
if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
$File = 'fckeditor.original.html' ;
else
$File = 'fckeditor.html' ;
$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ;
if ( $this->ToolbarSet != '' )
$Link .= "&Toolbar={$this->ToolbarSet}" ;
// Render the linked hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ;
// Render the configurations hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ;
// Render the editor IFRAME.
$Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>" ;
}
else
{
if ( strpos( $this->Width, '%' ) === false )
$WidthCSS = $this->Width . 'px' ;
else
$WidthCSS = $this->Width ;
if ( strpos( $this->Height, '%' ) === false )
$HeightCSS = $this->Height . 'px' ;
else
$HeightCSS = $this->Height ;
$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;
}
$Html .= '</div>' ;
return $Html ;
}
function IsCompatible()
{
return FCKeditor_IsCompatibleBrowser() ;
}
function GetConfigFieldString()
{
$sParams = '' ;
$bFirst = true ;
foreach ( $this->Config as $sKey => $sValue )
{
if ( $bFirst == false )
$sParams .= '&' ;
else
$bFirst = false ;
if ( $sValue === true )
$sParams .= $this->EncodeConfig( $sKey ) . '=true' ;
else if ( $sValue === false )
$sParams .= $this->EncodeConfig( $sKey ) . '=false' ;
else
$sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ;
}
return $sParams ;
}
function EncodeConfig( $valueToEncode )
{
$chars = array(
'&' => '%26',
'=' => '%3D',
'"' => '%22' ) ;
return strtr( $valueToEncode, $chars ) ;
}
}
?>
30 Jan 2008, 12:20 PM
#86
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Location:
Wales
Posts:
80
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Hi Testuser,
I emailed you a couple of times about the fckeditor for v1.3.02.
You were going to send me a copy?
I know you've been very busy, but it is urgent & I would be so grateful.
The htmleditor thing is driving me mad!
Sorry to be a pain.
Regards
Gay Elston
http://www.artyfactsforcrafts.com

30 Jan 2008, 12:28 PM
#87
gayelston avatar

gayelston

New Zenner

Join Date:
Aug 2006
Location:
Wales
Posts:
80
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

I think we passed in the post, so to speak!
I've replied to your email & eagerly await the fckeditor.
Perhaps my sanity will be saved after all!:lookaroun
Regards
Gay Elston
http://www.artyfactsforcrafts.com

30 Jan 2008, 4:18 PM
#88
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Jbraz:

OK, I checked on the server and there was a fckeditor_php5.php file so I downloaded it to my local HD, edited it and changed the 200 to 500, reuploaded it, logged off my admin, closed my browser then opened a new one and logged back in and checked again but still no area to input text or anything while adding a new product or editing an exisisting one.

Here is my fckeditor_php5.php file in case it may help.

This is the integration file for PHP 5.
*

  • It defines the FCKeditor class that can be used to create editor
  • instances in PHP pages on server side.
    */
    class FCKeditor
    {
    var $InstanceName ;
    var $BasePath ;
    var $Width ;
    var $Height ;
    var $ToolbarSet ;
    var $Value ;
    var $EditorAreaCSS ;
    var $AutoDetectLanguage ;
    var $DefaultLanguage ;
    var $Config ;
    // PHP 5 Constructor (by Marcus Bointon [email protected])
    function __construct( $instanceName )
    {
    $this->InstanceName = $instanceName ;
    $this->BasePath = HTTP_SERVER . DIR_WS_CATALOG. 'editors/fckeditor/' ;
    $this->Width = '100%' ;
    $this->Height = '500' ;
    $this->ToolbarSet = 'Default' ;
    $this->Value = '' ;
    $this->EditorAreaCSS = HTTP_SERVER . DIR_WS_ADMIN . 'includes/stylesheet.css';
    $this->AutoDetectLanguage = true ;
    $this->DefaultLanguage = strtolower($_SESSION['languages_code']);
    $this->Config = array() ;
    }
    function Create()
    {
    echo $this->CreateHtml() ;
    }
    function CreateHtml()
    {
    $HtmlValue = htmlspecialchars( $this->Value ) ;
    $Html = '<div>' ;
    if ( $this->IsCompatible() )
    {
    if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
    $File = 'fckeditor.original.html' ;
    else
    $File = 'fckeditor.html' ;
    $Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}" ;
    if ( $this->ToolbarSet != '' )
    $Link .= "&Toolbar={$this->ToolbarSet}" ;
    // Render the linked hidden field.
    $Html .= "<input type="hidden" id="{$this->InstanceName}" name="{$this->InstanceName}" value="{$HtmlValue}" style="display:none" />" ;
    // Render the configurations hidden field.
    $Html .= "<input type="hidden" id="{$this->InstanceName}___Config" value="" . $this->GetConfigFieldString() . "" style="display:none" />" ;
    // Render the editor IFRAME.
    $Html .= "<iframe id="{$this->InstanceName}___Frame" src="{$Link}" width="{$this->Width}" height="{$this->Height}" frameborder="0" scrolling="no"></iframe>" ;
    }
    else
    {
    if ( strpos( $this->Width, '%' ) === false )
    $WidthCSS = $this->Width . 'px' ;
    else
    $WidthCSS = $this->Width ;
    if ( strpos( $this->Height, '%' ) === false )
    $HeightCSS = $this->Height . 'px' ;
    else
    $HeightCSS = $this->Height ;
    $Html .= "<textarea name="{$this->InstanceName}" rows="4" cols="40" style="width: {$WidthCSS}; height: {$HeightCSS}">{$HtmlValue}</textarea>" ;
    }
    $Html .= '</div>' ;
    return $Html ;
    }
    function IsCompatible()
    {
    return FCKeditor_IsCompatibleBrowser() ;
    }
    function GetConfigFieldString()
    {
    $sParams = '' ;
    $bFirst = true ;
    foreach ( $this->Config as $sKey => $sValue )
    {
    if ( $bFirst == false )
    $sParams .= '&' ;
    else
    $bFirst = false ;
    if ( $sValue === true )
    $sParams .= $this->EncodeConfig( $sKey ) . '=true' ;
    else if ( $sValue === false )
    $sParams .= $this->EncodeConfig( $sKey ) . '=false' ;
    else
    $sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ;
    }
    return $sParams ;
    }
    function EncodeConfig( $valueToEncode )
    {
    $chars = array(
    '&' => '%26',
    '=' => '%3D',
    '"' => '%22' ) ;
    return strtr( $valueToEncode, $chars ) ;
    }
    }
    ?>

Can you provide access to the site for a quick debug run?  

Judging by the error you sent ... FCK is missing some files.  Try re-uploading the entire editor folder included in the download.  Make sure that all files complete, sometimes while using FTP files can become corrupted while uploading.  Also, make sure your using the most recent version, which can be found in my sig.

Colin @ iChoze Internet Solutions
Zen Cart Stuff powered by Zen Cart
http://zen-cart-templates.ichoze.net

2 Feb 2008, 7:24 PM
#89
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Hello all,

After Upgrade code from 1.36 into 1.38a. I tested my website in local host and everything work fine. After that, i upload them into Bluehost server, i change patch in of config.php in include and admin folder.

I test use FCKEditor and upload image ....and i was see the trouble.The image can not upload into /shop/image/.... It was change into localhost/xxxxmyfile/.....

How to fix this trouble? I can not remember where to edit this file...humm i am confusing now .....:dontgetit

**Thanks you for your help **

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

2 Feb 2008, 7:32 PM
#90
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

This is image :

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

2 Feb 2008, 7:46 PM
#91
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

kimsonvu:

Hello all,

After Upgrade code from 1.36 into 1.38a. I tested my website in local host and everything work fine. After that, i upload them into Bluehost server, i change patch in of config.php in include and admin folder.

I test use FCKEditor and upload image ....and i was see the trouble.The image can not upload into /shop/image/.... It was change into localhost/xxxxmyfile/.....

How to fix this trouble? I can not remember where to edit this file...humm i am confusing now .....:dontgetit

**Thanks you for your help **

Is your site in the root directory, or in another folder?

It's in the filemanager folder.

Colin @ iChoze Internet Solutions
Zen Cart Stuff powered by Zen Cart
http://zen-cart-templates.ichoze.net

3 Feb 2008, 5:34 AM
#92
kimsonvu avatar

kimsonvu

Zen Follower

Join Date:
Aug 2006
Location:
HCMC
Posts:
263
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

testuser:

Is your site in the root directory, or in another folder?

It's in the filemanager folder.

My site is in the /shop folder. Can you tell me where that file to edit again?

Thanks you !

From Hochiminh City - Vietnam !
Call me when you travel here : +840983038939
KIMSON

3 Feb 2008, 7:34 AM
#93
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

kimsonvu:

My site is in the /shop folder. Can you tell me where that file to edit again?

Thanks you !

Sent PM.

Colin @ iChoze Internet Solutions
Zen Cart Stuff powered by Zen Cart
http://zen-cart-templates.ichoze.net

9 Feb 2008, 7:10 AM
#94
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

This relates to my new install of FCKeditor 2.5 on a site with ZenCart v.1.3.7.

Installation went smoothly and I have been using the editor for Product Information pages.

I went to edit a category description and got the following error:

Fatal error: Class 'FCKeditor' not found in /home/aspenshop/www/www/rcl/categories.php on line 849

note: I have previously renamed my /admin folder /rcl
note: /home/aspenshop/www/www/ is the location of the root of my website on an ICDSoft hosted server.

Here is some of the categories.php code that includes line 849 as pulled from the server:

 
845    $category_inputs_string_metatags_description = '';
846    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
847      $category_inputs_string_metatags_description .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' ;
848      if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
849                $oFCKeditor = new FCKeditor('metatags_description[' . $languages[$i]['id']  . ']') ;
850                $oFCKeditor->Value = zen_get_category_metatags_description($cInfo->categories_id, $languages[$i]['id']);
851                $oFCKeditor->Width  = '97%' ;
852                $oFCKeditor->Height = '200' ;
853//                $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;
854//                $oFCKeditor->Create() ;

Any ideas how to correct this situation would be greatfully appreciated.

Ron

www.aspenshopsonline.com - ZenCart 1.3.9h
www.wilkssupply.com - ZenCart 1.3.9h
www.un-du.net - ZenCart 1.3.8a

9 Feb 2008, 7:29 AM
#95
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

ISSUE RESOLVED. ERRORS IN ADMIN/INCLUDES/CONFIGURE.PHP.

I realized I may have comprised some security by being so specific about the admin location so I have renamed the admin folder since posting.

Guess what? I found I had not originally made all the appropriate changes in the admin/includes/configure.php file. Once they were fixed the editor works fine for categories.

www.aspenshopsonline.com - ZenCart 1.3.9h
www.wilkssupply.com - ZenCart 1.3.9h
www.un-du.net - ZenCart 1.3.8a

9 Feb 2008, 8:20 AM
#96
ronlee67 avatar

ronlee67

Totally Zenned

Join Date:
Sep 2006
Location:
Colorado Springs CO USA
Posts:
519
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

What a night! Well I was wrong, that didn't resolve the issue. FCKEditor was not working to edit category meta tags. It was working okay to edit category descriptions. I found a post which addressed this problem exactly, and I have made the code changes and tested it.

So, if you have trouble editing category meta tags in ZenCart 1.3.7 with FCKEditor read this post: http://www.zen-cart.com/forum/showthread.php?t=71587&highlight=fckeditor+meta

www.aspenshopsonline.com - ZenCart 1.3.9h
www.wilkssupply.com - ZenCart 1.3.9h
www.un-du.net - ZenCart 1.3.8a

13 Feb 2008, 7:47 AM
#97
baltzar avatar

baltzar

New Zenner

Join Date:
Jul 2007
Posts:
25
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

Hi great edition mod!

How to prevent FCK ro tiny from destroying my php code or other custom tags?

15 Feb 2008, 12:30 AM
#98
testuser avatar

testuser

Inactive

Join Date:
Oct 2004
Location:
Houston, TX
Posts:
792
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

baltzar:

Hi great edition mod!

How to prevent FCK ro tiny from destroying my php code or other custom tags?

You can't insert PHP directly into any content section in the admin area of Zen and expect it to work. It's not built like that. As far as other tags, what would you be talking about?

FCK is built pretty well for XHTML compliant content editing. Tiny, at least the version included within Zen Cart, though has issues.

Personally, I prefer the plain text feature. :shocking:

Colin @ iChoze Internet Solutions
Zen Cart Stuff powered by Zen Cart
http://zen-cart-templates.ichoze.net

15 Feb 2008, 9:27 AM
#99
baltzar avatar

baltzar

New Zenner

Join Date:
Jul 2007
Posts:
25
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

testuser:

You can't insert PHP directly into any content section in the admin area of Zen and expect it to work. It's not built like that. As far as other tags, what would you be talking about?

FCK is built pretty well for XHTML compliant content editing. Tiny, at least the version included within Zen Cart, though has issues.

Personally, I prefer the plain text feature. :shocking:
haha, but its great for preview.

Anyway I'm using php tags for "html_includes/define_main_page" to insert some dynamic content into the main page(what else it for?) but each time my editor, who have no idea about how html looks like, touch it with FCK all get ruined.

24 Feb 2008, 10:10 AM
#100
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: FCKeditor 2.4.3 - Content Editor addon for Zen Cart

For ppl who could not upload image:
http://www.zen-cart.com/forum/showthread.php?t=86818

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me