Jump to content
Sign in to follow this  
MaxiDVD

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

Recommended Posts

Thanks for this great contribution! :lol:

 

It works fine on 2.2MS1 after I made the changes in previous post to steps 1.5 (index.php) and 1.6 (application_top.php).

 

Your work is very much appreciated!

 

Kind regards,

EricK

Share this post


Link to post
Share on other sites

hello

 

i read all replies but i still cant figure out what is my problem.When i try to insert an image i see in Image Manager windows this error:

 

Warning: open_basedir restriction in effect.File in wrong directory in /usr/local/apache/www/site.com/catalog/admin/includes/configure.php on line 45

 

Fatal error: Failed opening required 'includes/modules/infopages/configure.php in /usr/local/apache/www/site.com/catalog/admin/includes/configure.php on line 45

 

please tell me where should i modify the paths to correct this error.

thanks

 

btw: great great script!greetz


Serban Ghita - my blog

Share this post


Link to post
Share on other sites

Hi zamolxe

 

IMAGE UPLOADER:

admin/htmlarea/popups/config.inc.php

 

Look for:

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

if you have no luck --> try dropping it back a level like so.

 

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

or

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

 

<?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/"));

 

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

Or completety delete this line and manually write in your new paths directly:

 

<?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

Share this post


Link to post
Share on other sites

Hey Lee,

First let me say that this seems like a great contribution! I say seems as I'm a bit confused regarding one of the 'New Files' stated in the instructions. This file is the admin/comment_customer_bar.php file.

 

  New Files to Add: 6                                                    #

 -----------------------------------------------------------------------*

 admin/comment_customer_bar.php                                         *

 admin/comment_newsletter_bar.php                                       *

 admin/define_mainpage.php                                              *

 

I have ssh access to this account and ran a find ~/ -name comment_customer_bar.php -print command which was not able to find this file either in the OSc code or in your .zip package. It is NOT in todays download. Forget to include it?

 

I'm reading the 'Step_by_step_Installation_ Instructions.txt' file for installation instructions as it has the latest "Revised 30Jun03" date. May I suggest renaming the old "_Easy_MS1_ Installation.txt" to something like _Easy_MS1_ Installation-old.txt? I had to open and read both in order to know which one to use. Not a big deal but it would be a bit cleaner. :-)

 

Also.. Are you planning on having this ready for the new MS2.2 r2 when its released soon or shortly afterwards?

 

Thanks!

Share this post


Link to post
Share on other sites

Hi Adrenolin

 

admin/comment_customer_bar.php

Thats meant to be:

admin/comment_email_bar.php

I will amend that too,

 

_Easy_MS1_ Installation.txt this is for people who have just installed a fresh (Original) osCommerce MS1 store with no-modifications, its meant to be a plug-and-play solution. simplifies the install.

 

where as:

 

Step_by_step_Installation_ Instructions.txt

Is mainly for people who have already made modifications to there store and cant copy paste the zip contents as it may interfer with other contributions they have installed.

 

So the two installation instructions illustrate step-by-step install OR plug-and-play depending on your store (Original or Modified)

 

I understand your confusion and will make changes to the naming of the installation instructions.

 

Also.. Are you planning on having this ready for the new MS2.2 r2 when its released soon or shortly afterwards?

 

This is on my TODO list and will be done with-in the 1st week of MS2 release, I would prefer to wait till its officially released - so I dont have to make and last minute alterations.

 

Cheers Lee

Share this post


Link to post
Share on other sites

Lee,

Thanks.. I'll attempt the installation using the Step_by_step_Install. Also thanks for clearing up the file miss naming for me.

Share this post


Link to post
Share on other sites

Lee,

Found the following while installing using the Step_by_step.. file.

 

STEP 5.0 -->  OPEN: /admin/includes/modules/newsletters/product_notifications.php

*should be*

STEP 5.0 -->  OPEN: /admin/includes/modules/newsletters/product_notification.php



Also



STEP 6.0 --> OPEN: /catalog/includes/languages/(yourlanguage)/mail.php

*should be*

STEP 6.0 --> OPEN: /admin/includes/languages/(yourlanguage)/mail.php

 

Problem..

After installation I've been unable to find the editor! I have followed the step-by-step guide twice now and its nowhere to be found. I'd have figured it would be visable on the product editing window. Any ideas? I'm using Mozilla 1.4 (does not work unfortunately yet with HTMLArea) but have also tested with IE 6.

Its late, drugged out on pain/spasm meds due to a MVA and to top it all off I just had a damn root canal today. I very well could have simply done something wrong :-) but dont think so.

 

I noticed at http://www.interactivetools.com/products/h...area/index.html that Mozilla was now supported in version 3 Beta. Is this planned to be added to your contribution in the future? My personal opinion of IE is fairly low and try to not use it as much as possible with the exception of page and layout testing. Test URL for Mozilla browsers can be found at http://www.interactivetools.com/staff/ben/...mo/example.html

Share this post


Link to post
Share on other sites

ACK! My Bad!! Somehow I skipped over the entire Step 1. I for some reason created the htmlarea directory but failed to copy the files over to it :oops:

Share this post


Link to post
Share on other sites

initially I did implement HTMLArea 3.0 Beta, but due to the incompatabiltiy with the Image Uploader I decided to go back to 2.0, when v3.0 is officially released I will update too, shouldnt be too far away now..

 

The HTMLArea should be visable in product editing window under IE 5.5 or Above, make sure there is no Javascript or Runtime Errors (Visible Yellow Icon) in the lowest left corner of IE, if thats ok and displays a Blue IE Logo.

 

you really need to go over categories.php the code placement is very crucial. if its even 1 line out it wont display.

this is the main problem with the HTMLArea so double check and tripple check categories.php.

 

Make sure you ran the SQL script too, as it relies heavily on the DB settings found in admin-configurations.

 

Is the HTMLArea showing in other TEXT AREAs, send email and newsletter create or edit?

 

or is it just product editing window?

 

Cheers Lee

 

I need a good proof reader to go over my instructions before uploading contributions :lol:

 

thats why its in Beta Stage 1.6.6 HTMLArea is fine, but its my instructions that need to be BETA... Lol

 

Thanks for the error reports

:shock:

Share this post


Link to post
Share on other sites

Just curious...

 

( sorry I havnt read all 12 pages of this post , and I may be doubling up on some previously discussed topic , and if so I appoligise..)

 

But , was Solmetra's SPAW Editor, or Fernando ?lvarez's wysiwyg_web_edit ever considered as options for a HTML Editor... ?

 

Both offer options that are not currenlty incorporated as part of HTMLArea.

 

The main differences being in the way they handle tables and table atributes. ( Apart from the fact that Spaw has an inhansed Graphical interface ). And although Im not sure about HTMLArea, but hte other 2 are php based, with Spaw utilising a php call to initiate it.

 

Also, Spaw has the capibility to usilise your existing CSS file , giving you the ability to select your pre-existing CSS styles rather than font names. This is surly an added advantage.

 

Well thats my 2c's... If anyone is interested I'd be happy to convert the module to Spaw ( just take into consideration that spaw is around 500k )

 

Cheers -

 

lawsy

Share this post


Link to post
Share on other sites

Hey Lawsy.

 

Your Topic is new to me and Im interested, I think SPAW looks really good, not to mention the incorparation of osCommerce CSS (This is definity a Thumbs Up) I notice it also offers a image uploader feature similar to the one being used by HTMLArea.

 

This is a open source community so feel free to contribute, you say that SPAW is 500k the contribution section only allows a MAX size of 300k,

 

Actually I have just downloaded spaw 1.02 and its only standalone 245k, Im sure I read somewhere that if a mod exceeds 300k to email the osCommerce Team and they "may" sort it out.

 

Just another note osCommerce MS2 is due for release very soon... and some core code structure has been changed from MS1 release.

 

Also, Spaw has the capibility to utsalize your existing CSS file , giving you the ability to select your pre-existing CSS styles rather than font names. This is surly an added advantage.

HTMLArea does this but its just a matter or setting it up..

 

Cheers Lee

Share this post


Link to post
Share on other sites

Hey Maxi...

 

I'm inpressed that you responded so quickly...

 

Ive loked that the way the other have to set up to utilie CSS type intergration , but I still like the way Spaw does it...

 

Basically it can be pointed at the stardard CSS file, or a PHP var that corresponds to it ( it the case of themes ) and all your HTML editing will reflect your chosen sytle or theme...

 

I'll test the module and post it up as a addon for MS1... Im sure there will still be poepole that will utilise it, and besides it will give a chance for some feedback...

 

Its pretty groovy hey...

 

Cheers

 

-lawsy

Share this post


Link to post
Share on other sites

I have just installed the contribuation exactly as the instructions state. I am not getting any error message nor any wysiwyg box when I edit the products attributes. I am sure I installed it correctly but I can't figure out why it won't work.. Please help

 

Thanks

Moneer

Share this post


Link to post
Share on other sites

I still cannot get the editor in products description. I am using a version that has the categories,description, page header, etc. I have tried this fresh each time for four times and no go.

 

This is the error I get when I look at Java details error

Line 147

Char 3

Error 'document.all..[...]' is null or not an object

Code 0

www.website.com/admin/categories.php?cPath=26_27&action=new_product

 

There is nothing on line 147 so I take it the ccounting for the lines is off. I would apprecite some help.

Thanks


"If you rundown your shadow, you will never catch it"

Bob Marley

Share this post


Link to post
Share on other sites

I've got the contribution installed and running fine, but it does't seem to load the previous descriptions.... meaning, when I open a product to edit, the description field is always blank, whether or not I had anything there before.

 

I have a heavily modified categories.php - any ideas where I should start looking for this bug? or is this the way this contribution is supposed to function?


-D. M. 8)

Share this post


Link to post
Share on other sites

for further clarification, I think someone had this same problem on page 8 - the html editor 'not reading from the database' - this seems to be the same problem that I am having, only I am certain that I put both javascript bits in the correct places... as well as everything else.

 

If I run it in debug mode, the old description shows up in the regular description field, but nothing in the html editor field.... yeah, basically it seems like the html editor is not reading the products_description from the database.

 

Hmm... well I've tried just about everything I can think of - please let me know if you have any ideas.


-D. M. 8)

Share this post


Link to post
Share on other sites

Moneer,

You really need to go over everything and make sure you have followed each step, check you installed the MySQL script. if so make sure you copied the folder contents "HTMLArea" into your store Admin directory. are you seeing the HTMLArea in the customer email section or Newsletter Section? if its visiable in these areas it means your code placement is wrong in categories.php

 

If none of the HTML areas are showing at all it has to be SQL script or the HTMLArea folder.

page_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gif

 

 

bluephoenix,

Your problem relates to dynamic generation of multilanguages in categories.php, are you haveing problems displaying categories description or products description or both? do you use a multilingual store or one language?

 

If you have the categories description contribution installed you would have place 3 parts of code on your categories.php page in this order:

 

Part Above </head>

<script language="Javascript1.2"><!-- // load htmlarea

//MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.6 <head>

_editor_url = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>htmlarea/"; // URL to htmlarea files

var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);

if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; }

if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }

if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; }

<?php if (HTML_AREA_WYSIWYG_BASIC_PD == 'Basic'){ ?> if (win_ie_ver >= 5.5) {

document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_basic.js"');

document.write(' language="Javascript1.2"></scr' + 'ipt>');

} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }

<?php } else{ ?> if (win_ie_ver >= 5.5) {

document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_advanced.js"');

document.write(' language="Javascript1.2"></scr' + 'ipt>');

} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }

<?php }?>

// --></script>

 

</head>

Part below Categories Description </form>

</form>

 

<?php if (HTML_AREA_WYSIWYG_DISABLE == 'Disable') {} else { ?>

<script language="JavaScript1.2" defer>

// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.6 Categories Description

var config = new Object();

config.width = "<?php echo HTML_AREA_WYSIWYG_WIDTH; ?>px";

config.height = "<?php echo HTML_AREA_WYSIWYG_HEIGHT; ?>px";

config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';

config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;

// More Configs can added here:

// Dreamscape added Dynamic Language Function

<?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?>

editor_generate('categories_description[<?php echo $languages[$i]['id']; ?>]',config);

<?php } } ?>

</script>

Last but not least this Part below Products Description </form>

</form>

 

<?php if (HTML_AREA_WYSIWYG_DISABLE == 'Disable') {} else { ?>

<script language="JavaScript1.2" defer>

// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.6 Products Description

var config = new Object(); // create new config object

config.width = "<?php echo HTML_AREA_WYSIWYG_WIDTH; ?>px";

config.height = "<?php echo HTML_AREA_WYSIWYG_HEIGHT; ?>px";

config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';

config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;

// More Configs can added here:

// Dreamscape added Dynamic Language Function

<?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?>

editor_generate('products_description[<?php echo $languages[$i]['id']; ?>]',config);

<?php } } ?>

</script>

If you have all that correct and still have troubles. you can delete the multilingual step (Only if you have 1 Langauge) if you use multilingaul this will cause problems ok.

<?php if (HTML_AREA_WYSIWYG_DISABLE == 'Disable') {} else { ?>

<script language="JavaScript1.2" defer>

// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.6.6 Products Description

var config = new Object(); // create new config object

config.width = "<?php echo HTML_AREA_WYSIWYG_WIDTH; ?>px";

config.height = "<?php echo HTML_AREA_WYSIWYG_HEIGHT; ?>px";

config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';

config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;

// More Configs can added here:

editor_generate('products_description[1]',config);

<?php } ?>

</script>

we remove the multingual step and assigned products_description[1] as the name of the textarea field, if your not using English Language the [1] will be different and will need to changed accordingly or the HTML wont show and generate Java Errors, check you Language settings to see what number your langauge is using.

 

This step should also be repeated on categories_description area too.

page_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gifpage_header_line_break_right.gif

 

 

dmGremlin,

I've got the contribution installed and running fine, but it does't seem to load the previous descriptions.... meaning, when I open a product to edit, the description field is always blank, whether or not I had anything there before.

 

I have a heavily modified categories.php - any ideas where I should start looking for this bug? or is this the way this contribution is supposed to function?

 

No! HTMLArea Definitly pulls data from your database, why its not working for you I dont know, it may be a clash with some other mods you have preformed around your products description fields I would start looking there first compare the difference between your modified categories.php and the one included in the htmlarea.zip package.

 

when I open a product to edit, the description field is always blank, whether or not I had anything there before.
when editing a product the information is pulled form the database and displayed in your HTMLarea box in the same WYSIWYG format it was submitted in.

Cheers Lee

Share this post


Link to post
Share on other sites

I got this working.

 

There is an error in the install - at least as it pertains to the categories which has a lot of mods. I was going by the line numbers listed and that generated problems. I just took a previous suggestion Maxi made to look for the< /form> tag and put ift after that and it worked as I followed the thread for the products_description.

 

I am trying to get it to work with latest_news and zxz_faq but having some problems.

 

 

Also, The only way I can get the image function to when I uze the zz faq mod was to move some functions. Otherwise I have to turn off this define in application_top.php

require('includes/local/zz_configure.php');

which if course breaks the faq.


"If you rundown your shadow, you will never catch it"

Bob Marley

Share this post


Link to post
Share on other sites

Maxi..

 

Just something htat I forgot to respond too...

 

Im not sure about HTMLArea... but with spaw you do not need to upload a pix in order to have it dispalyed.. you can simply drop and drag or copy/paste from basically any source..

 

I've tested it with MS word / power point , wordpad , adobe, dreamweaver and frountpage..

 

and all seem to work fine.. the only thing I find is that the CSS have to be added after as when you copy and paste it only gives you standard text.. but hte sizes, colors formats etc all saty... even coping tables work fine..

 

infact you can even copy and paste from a web page.. images etc all copy accross without error...

 

I'll have the contribution ready tommorrow ( hopfully ) just addressing some installation readme how too's....

 

Cheers

 

-lawsy

Share this post


Link to post
Share on other sites

Hi Lawsy

I've tested it with MS word / power point , wordpad , adobe, dreamweaver and frountpage..  

 

and all seem to work fine.. the only thing I find is that the CSS have to be added after as when you copy and paste it only gives you standard text.. but hte sizes, colors formats etc all saty... even coping tables work fine..  

 

infact you can even copy and paste from a web page.. images etc all copy accross without error...

 

Yes HTMLArea has this feature too, but I would still like to see SPAW in action, Ive looked into impletementing Custom Style Sheets into the coding of the HTML editor, I found the solution I was asked about this by kooyan about 5-6 pages back so I will post my findings:

 

in both editor_basic.js and editor_advanced.js you will find:

 

this.stylesheet = _editor_url + 'stylesheet.css'; // full URL to stylesheet

 

this.fontstyles = [     // make sure these exist in the header of page the content is being display as well in or they won't work!

  { name: "headline",     className: "headline",  classStyle: "font-family: arial black, arial; font-size: 28px; letter-spacing: -2px;" },

  { name: "arial red",    className: "headline2", classStyle: "font-family: arial black, arial; font-size: 12px; letter-spacing: -2px; color:red" },

  { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px; letter-spacing: -2px; color:blue" },

];

 

You can simply replace it with this:

this.stylesheet = _editor_url + 'stylesheet.css'; // full URL to stylesheet

 

this.fontstyles = [     // make sure these exist in the header of page the content is being display as well in or they won't work!

   { name: "boxText",     className: "boxText",  classStyle: "" },

   { name: "errorBox",    className: "errorBox", classStyle: "" },

   { name: "stockWarning", className: "stockWarning", classStyle: "" },

   { name: "productsNotifications",     className: "productsNotifications",  classStyle: "" },

   { name: "orderEdit",    className: "orderEdit", classStyle: "" },

   { name: "infoBox", className: "infoBox", classStyle: "" },

   { name: "infoBoxContents",     className: "infoBoxContents",  classStyle: "" },

   { name: "infoBoxNotice",    className: "infoBoxNotice", classStyle: "" },

   { name: "infoBoxNoticeContents", className: "productSpecialPrice", classStyle: "" },

];

I put a few demo class-styles from the osCommerce stylesheets.css

you can simply add lines with new names to include more classes or uncomment the line for less class, the classes appear on the WYSIWYG Editor in a dropdownbox - simply highlight the text you want to apply a class to and make your selection from the drop down, the style can be viewed in the WYSIWYG enviroment, in priview and is also submitted to the database for the product descriptions.

 

if you want to use class-styles in basic mode editor you need to enable the new dropdown box by opening editor_basic.js with a text editor and around line 43 uncomment fontstyles like so:

 

//    ['fontstyle'],
   ['fontstyle'],

 

and all seem to work fine.. the only thing I find is that the CSS have to be added after as when you copy and paste it only gives you standard text.. but hte sizes, colors formats etc all saty... even coping tables work fine..

This may work.. but you might just have to included the style sheet in the editor.. will see - looking foward to the mod.

 

Lee 8)

Share this post


Link to post
Share on other sites

Hey Lee,

While I installed this last week I didnt really have a chance to test it much. Tonight I opened mainpage.php (via the admin panel) to start familiarizing myself with it. Now before I did anything I opened my testsite in Mozilla 1.4 and using IE 6.0 opened the admin panel. In Mozilla 1.4 the default page displayed your included mainpage.php and its looked fine.

OK here is the problem.. I made no modifications to the code using IE but simply clicked the Save button. Refreshing the default mainpage of my testsite displayed the following:

 

Parse error: parse error, expecting `')'' in

/path/to/public_html/includes/languages/english/mainpage.php on line 22

 

Now I've attempted to input a number of other code tidbits but once they are saved any editing results in the same error. If I cut and paste (using the 'View HTML Source' button) the original code again it'll work until I save it again. Mind you my php isn't great but if it initially works it should continue to work :-) I'm kinda stumped. Any ideas on this?

 

I've noticed a few things while looking at this tonight. For instance look at this section of code from your included stock mainpage.php:

 

Later,<br>

Mattice  

";

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'left',

                              'text'  => $mainpage_title );

 new infoBoxHeading($info_box_contents, true, true);



Changes to the following after saving:



<P>I'd appreciate an e-mail if you use this, I'm curious...<BR>Later,<BR>Mattice 

"; $info_box_contents = array(); $info_box_contents[] = array('align' => 

'left', 'text' => $mainpage_title ); new infoBoxHeading($info_box_contents, 

true, true);

 

Both of these were cut from the 'View HTML Source'. First I noticed that after saving it mangles all the code very badly. Is this something wrong with my install or is this typical? I hope its not tyical as I enjoy being able to look at nice clean code altho not a big deal. Second is the fact that I noticed it converted 'align' => 'left' to 'align' => 'left'. Why? I could see why if I pasted this in the normal work window but not if I paste it into the HTML code window.

 

Any comments, suggestions, help ;-) would be appreciated. Again, great contribution.. now if I could only get it working properly hehe.

 

Thanks,

Rob

Share this post


Link to post
Share on other sites

Hi Rob,

 

When you use HTMLArea with "define main page", trying to mix PHP with HTML will just cause errors like yours, I personally opted to go without PHP on my mainpage and just use plain old HTML generated by the WYSIWYG HTML, (I deleted all the demo PHP code on mainpage and used HTML) its really up to you if you want PHP code on mainpage you should turn off WYIWYG on define mainpage, if your happy using straight HTML like me then there wont be a problem..

 

Just one other note for people using HTMLArea in descriptions ect..

Putting external links in descriptions can cause problems - like shopping cart contents will be lost, I highly advise to use target="_blank" in hyperlinks this will inturn open a new browser window rather then redirect a user off your site.

 

Hope this helps.

Lee :lol:

Share this post


Link to post
Share on other sites

I love this contribution! It is such a great addon for people who are making stores for other owners. It makes it easy for a store owner to describe their products clearly without any HTML experience.

 

A BIG thank you for this contribution!!

 

I've read this entire forum thread and I installed the contribution successfully.

 

I have one small question though. I'm running all the files in the ADMIN as https or SSL.

 

When I go to edit a new product...I get this pop-up alert:

 

This page contains both secure and non-secure items. Do you want to display the non-secure items?

 

Now, clearly I would like to get rid of this message as I'm installing this program for a business. I think it is important that all of their admin utility is secure.

 

Where could I change the root of this to get rid of this message?

 

I tried to change this in the file htmlarea/popups/file/config.inc.php

 

from:$BASE_URL = HTTP_SERVER;



to



$BASE_URL = HTTPS_SERVER;

 

Any ideas on why this doesn't work or where to make the proper adjustment?

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  

×