Jump to content
Sign in to follow this  
MaxiDVD

[Contribution] HTML WYSIWYG Editor for Product Desc, MS1 2.2

Recommended Posts

Hi camley88,

 

Have you set the Permissions( 777 ) on the image directory?

or windows IIS server need to be changed to.

 

Cheers Lee :lol:

Share this post


Link to post
Share on other sites

Does the top of your:

admin/htmlarea/popups/config.inc.php file look similar to this?

 

<?php



 require('../../includes/configure.php');

 

/*

** Change ONLY the following lines to match your server setup

*/



// CONSTRAIN_* indicates the image constraints used to scale uploads (0 = none)

define("CONSTRAIN_HEIGHT", 0);

define("CONSTRAIN_WIDTH", 0);



// IMAGE_DIR and IMAGE_URL identify the Image directory "root" (MUST end in "/")

// Do NOT include "http://my.hostname.com" in IMAGE_URL; just the path from the

// DocumentRoot of your webserver.

define("IMAGE_DIR", trim(DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG_IMAGES));

define("IMAGE_URL", trim(DIR_WS_CATALOG_IMAGES));



// NETPBM_DIR identifies the directory where NETPBM is located (MUST end in "/")

// Not used if either CONSTRAIN_HEIGHT or CONSTRAIN_WIDTH (above) is specified as "0".

define("NETPBM_DIR", trim(DIR_FS_CATALOG));



// SCRIPT_DIR and SCRIPT_URL identify where these scripts reside (MUST end in "/")

// Do NOT include "http://my.hostname.com" in SCRIPT_URL; just the path from the

// DocumentRoot of your webserver.

define("SCRIPT_DIR", trim(DIR_FS_ADMIN . "htmlarea/popups/"));

define("SCRIPT_URL", trim(DIR_WS_ADMIN . "htmlarea/popups/"));

 

Try replacing it if its different.

Share this post


Link to post
Share on other sites

Hey Lee, thanks for the quick response.

 

This is what I have:

 

<?php

 

require('../../includes/configure.php');

 

/*

** Change ONLY the following lines to match your server setup

*/

 

// CONSTRAIN_* indicates the image constraints used to scale uploads (0 = none)

define("CONSTRAIN_HEIGHT", 0);

define("CONSTRAIN_WIDTH", 0);

 

// IMAGE_DIR and IMAGE_URL identify the Image directory "root" (MUST end in "/")

// Do NOT include "http://my.hostname.com" in IMAGE_URL; just the path from the

// DocumentRoot of your webserver.

define("IMAGE_DIR", trim("c:/program files/nusphere/apache/htdocs/maxidvd/images/"));

define("IMAGE_URL", trim("maxidvd/images/"));

 

// NETPBM_DIR identifies the directory where NETPBM is located (MUST end in "/")

// Not used if either CONSTRAIN_HEIGHT or CONSTRAIN_WIDTH (above) is specified as "0".

define("NETPBM_DIR", trim("c:/program files/nusphere/apache/htdocs/maxidvd/admin/htmlarea/popups/"));

 

// SCRIPT_DIR and SCRIPT_URL identify where these scripts reside (MUST end in "/")

// Do NOT include "http://my.hostname.com" in SCRIPT_URL; just the path from the

// DocumentRoot of your webserver.

define("SCRIPT_DIR", trim("c:/program files/nusphere/apache/htdocs/maxidvd/admin/htmlarea/popups/"));

define("SCRIPT_URL", trim("maxidvd/admin/htmlarea/popups/"));

 

You should recognize as it came from one of your own downloads!

 

I am using //localhost on a windows 98 os, does that make a difference? When I change to your supplied version, I did not get the proper directories.

 

Thanks again

Share this post


Link to post
Share on other sites

Hello All,

I have installed the contribution very easily but I cannot upload images.

I have the message "file'test.jpg' could not be created".

Any idea how to fix this?

 

Thanks in advance

 

Deltablue

Share this post


Link to post
Share on other sites

Same Problem here.

Just installed oscommerce 2.2 MS2 and and the WYSIWYG HTMLArea MS2 v1.7. The Editor does fine but the image manager does not.

No uploading, and the images root folder is shown without any files.

Any ideas?

Share this post


Link to post
Share on other sites

Have you made sure to set write permissions for for the image folder?

Are u running on Win or *nix?


Jpsy

 

DigiLog multimedia, Saarbr?cken, Germany

Share this post


Link to post
Share on other sites

The problem resides in your config.inc.php file, look at the examples below to determin your correct server settings, ensure file permission is all set, as mention above.

 

IMAGE UPLOADER MANUAL CONFIGURATION:

admin/htmlarea/popups/config.inc.php

 

This is what you file looks like now:

<?php

 

require('../../includes/configure.php');

 

/*

** Change ONLY the following lines to match your server setup

*/

 

// CONSTRAIN_* indicates the image constraints used to scale uploads (0 = none)

define("CONSTRAIN_HEIGHT", 0);

define("CONSTRAIN_WIDTH", 0);

 

// IMAGE_DIR and IMAGE_URL identify the Image directory "root" (MUST end in "/")

// Do NOT include "http://my.hostname.com" in IMAGE_URL; just the path from the

// DocumentRoot of your webserver.

define("IMAGE_DIR", trim(DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG_IMAGES));

define("IMAGE_URL", trim(DIR_WS_CATALOG_IMAGES));

 

// NETPBM_DIR identifies the directory where NETPBM is located (MUST end in "/")

// Not used if either CONSTRAIN_HEIGHT or CONSTRAIN_WIDTH (above) is specified as "0".

define("NETPBM_DIR", trim(DIR_FS_CATALOG));

 

// SCRIPT_DIR and SCRIPT_URL identify where these scripts reside (MUST end in "/")

// Do NOT include "http://my.hostname.com" in SCRIPT_URL; just the path from the

// DocumentRoot of your webserver.

define("SCRIPT_DIR", trim(DIR_FS_ADMIN . "htmlarea/popups/"));

define("SCRIPT_URL", trim(DIR_WS_ADMIN . "htmlarea/popups/"));

Try changing your paths to suit your needs like below:

<?php

/*

** Change ONLY the following lines to match your server setup

*/

 

// CONSTRAIN_* indicates the image constraints used to scale uploads (0 = none)

define("CONSTRAIN_HEIGHT", 0);

define("CONSTRAIN_WIDTH", 0);

 

// IMAGE_DIR and IMAGE_URL identify the Image directory "root" (MUST end in "/")

// Do NOT include "http://my.hostname.com" in IMAGE_URL; just the path from the

// DocumentRoot of your webserver.

define("IMAGE_DIR", trim("/path/from/filesystem/root/"));

define("IMAGE_URL", trim("/path/from/webserver/document/root/"));

 

// NETPBM_DIR identifies the directory where NETPBM is located (MUST end in "/")

// Not used if either CONSTRAIN_HEIGHT or CONSTRAIN_WIDTH (above) is specified as "0".

define("NETPBM_DIR", trim("/path/from/filesystem/root/"));

 

// SCRIPT_DIR and SCRIPT_URL identify where these scripts reside (MUST end in "/")

// Do NOT include "http://my.hostname.com" in SCRIPT_URL; just the path from the

// DocumentRoot of your webserver.

define("SCRIPT_DIR", trim("/path/from/filesystem/root/"));

define("SCRIPT_URL", trim("/path/from/webserver/document/root /"));

Cheers Lee :lol:

Share this post


Link to post
Share on other sites

@InenGeschmack: :)

 

If your image folder appears to be empty it might be because the settings of the paths in in htmlarea/popups/config.inc.php and in htmlarea/popups/file/config.inc.php do not work for certain installations, e.g. with virtual paths.

Read my explanation here in this thread...

http://forums.oscommerce.com/viewtopic.php...r=asc&start=148

... or install my extension which also fixes this problem...

http://forums.oscommerce.com/viewtopic.php...r=asc&start=165


Jpsy

 

DigiLog multimedia, Saarbr?cken, Germany

Share this post


Link to post
Share on other sites

Ooops - MaxiDVD was faster than me.

Both of our postings describe the same cause and the same solution...


Jpsy

 

DigiLog multimedia, Saarbr?cken, Germany

Share this post


Link to post
Share on other sites

... and works !

Thanks for your fast and friendly support.

i should have figured that out by myself ... but on the other hand - i never would have :wink:

 

Cheers

Share this post


Link to post
Share on other sites

I just installed your contribution and I can edit My email and Newsletter but I cant even get in to edit My products now.. I get a blank admin page instead.. I have read thru the threads and found one guy having the same problem but couldnt find His solution.. I allready tried the single language hack. I would love to use this contribution but need to figure out this.. It seems to be a javascript error as I get the following error.. It changes line numbers depending on where and what Im trying to change..

 

Line: 192 **This changes**

Char: 1

Error: Object Expected

Code:0

URL:// **Again depending on what category etc Im in..

 

Any help would be appreciated


SLB Gifts & More

For all your gift ideas.

www.slbgifts.com

Share this post


Link to post
Share on other sites

Hi Slbgifts,

 

If you want to email me a copy of your categories.php file in admin, I will have a quick look at the code placement, the problem is on that page somewhere.

 

Cheers Lee

admin@maxidvd.com.au

Share this post


Link to post
Share on other sites

Got your email/file and have sent it back,

 

Try replacing your categories.php with this one I modified and attached,

rename your one in admin first so you dont over write it, if this dont work

try the one in the zip package you downloaded initially.

 

Cheers MaxiDVD :lol:

Share this post


Link to post
Share on other sites

Well the file you sent didnt seem to change anything.. I did some digging and found out that this line..

 

echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . ($tax_class_array[$i]['id']) . ';' . "n";

 

in the categories.php brings up a error saying the tep_tax_rate etc caused a fatal error.. Can someone direct Me to fixing this problem. As it is I just commented out the line and I got the contribution working fine now... :D :D :D :D


SLB Gifts & More

For all your gift ideas.

www.slbgifts.com

Share this post


Link to post
Share on other sites

The line that gives you the error is meant to transfer the osc taxrates from php into javascript code, so that - when defining a new article in your shop - you can select the appropriate tax rate and the net to gross conversion can happen on the fly while you type in a new net value into the price field of the article. If you comment it out, this conversion while most likely always be 1 to 1, e.g. the net price and the gross price will be identical, not reflecting any chosen taxrate. This is not a severe problem, as the net value is written correctly to the db never the less, but you cannot use the gross field any more.

 

Is it possible that there is some inconsistency in your tax classes and/or tax zone definitions? Have a look into the "extras" folder of MS2. There are sample definitions for differen tax scenarios. Try one of these to see if the error vanishes.


Jpsy

 

DigiLog multimedia, Saarbr?cken, Germany

Share this post


Link to post
Share on other sites
...this conversion while most likely always be...

 

--> "...this conversion will most likely always be..."

 

Sorry... It's late, I'm somewhat drunk and I still have to work. ;)


Jpsy

 

DigiLog multimedia, Saarbr?cken, Germany

Share this post


Link to post
Share on other sites

hi there,

i have installed the constribution and everything went ok.

i can modify the main page and i have got the button in my admin on the left that states WYSIWYG Editor 1.6! If i click on the

PRODUCT DESCRIPTIONS use WYSIWYG HTMLAREA? Enable

i can not see any WYSIWYG Editor???

 

i have checked all files in the installation and double checked the catagories.php but i just cant find the error! allso if i go to mail.php and newsletter.php its the same, even do i have exchanged the files with the ones included its still the same... as if the constribution never excists!!!

 

can anybody help or has made the same experience??!!

Share this post


Link to post
Share on other sites

You may find what we did to be useful. We simply replaced the following code:

 

define("IMAGE_DIR", trim(DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG_IMAGES));

define("IMAGE_URL", trim(DIR_WS_CATALOG_IMAGES));

 

 

with:

 

define("IMAGE_DIR", trim(DIR_FS_CATALOG . "graphics/"));

define("IMAGE_URL", trim(DIR_WS_CATALOG . "graphics/"));

 

 

Then we created a directory called "graphics" (without quotes) in the catalog directory and set permissions on this new directory to 777.

 

Works sweet as.

Thanks for the awesome contribution.

 

Wiz

Share this post


Link to post
Share on other sites

@ Wiz

 

do you mean me and my problem ?

 

and where can i find the code, i searched all files for the code but did not find it !!!

 

regards Thorsten

Share this post


Link to post
Share on other sites

Thank you for this great contribution I like it very much!

:D However I have some problems. I try clean installation of MS1 2.2 (06/15/2003) and WYSIWYG Editor, FULL RELEASE/FIX - v1.6.6. When I try to preview edited text, I get the following

Fatal error: Call to undefined function: tep_get_uploaded_file() in C:homeoscommerceadmincategories.php on line 532

or Call to undefined function: tep_get_local_path() in C:homeoscommerceadmincategories.php on line 533

 

The following cod is placed in this line:

// copy image only if modified

$products_image = tep_get_uploaded_file('products_image');

$image_directory = tep_get_local_path(DIR_FS_CATALOG_IMAGES);

 

Any ideas?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×