Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

WYSIWYG HTMLArea v1.7


1quicksi

Recommended Posts

Well there are a few problems although it seems to be working.

 

First is the step that says:

STEP 1.1g --> FIND: /admin/categories.php
====================================================
 Look/search for this around line 1051:
====================================================


       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";
   }
?>


 ===================================================
 And directly UNDERNEATH IT add this:
 ===================================================



       } else { // create category/product info
         $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

         $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
       }
       break;
   }

   if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
     echo '            <td width="25%" valign="top">' . "\n";

     $box = new box;
     echo $box->infoBox($heading, $contents);

     echo '            </td>' . "\n";

     // Add neccessary JS for WYSIWYG editor of category image
     if($action=='edit_category'){
       if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
         echo '
                 <script language="JavaScript1.2" defer>
                 var config = new Object();  // create new config object
                 config.width  = "250px";
                 config.height = "35px";
                 config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
                 config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
                 config.toolbar = [ ["InsertImageURL"] ];
                 config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
                 editor_generate("categories_image",config);
                </script>
              ';
       }
     }

   }

 

For some reason this added code appears as plain text just above the product/catagory listing. Any ideas what I might have doe wrong? I searched the forums but the link in the install for the support forum is invalid.

Link to comment
Share on other sites

Well there are a few problems although it seems to be working.

 

First is the step that says:

STEP 1.1g --> FIND: /admin/categories.php
====================================================
?Look/search for this around line 1051:
====================================================


? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
? ?}
?>


?===================================================
?And directly UNDERNEATH IT add this:
?===================================================



? ? ? ?} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";

? ? ?// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}

? ?}

 

For some reason this added code appears as plain text just above the product/catagory listing.? Any ideas what I might have doe wrong?? I searched the forums but the link in the install for the support forum is invalid.

Same here but I tried this instead and I think this is what was meant

 

} else { // create category/product info
? ? ? ? ?$heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

? ? ? ? ?$contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
? ? ? ?}
? ? ? ?break;
? ?}

? ?if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
? ? ?echo ' ? ? ? ? ? ?<td width="25%" valign="top">' . "\n";

? ? ?$box = new box;
? ? ?echo $box->infoBox($heading, $contents);

? ? ?echo ' ? ? ? ? ? ?</td>' . "\n";
// Add neccessary JS for WYSIWYG editor of category image
? ? ?if($action=='edit_category'){
? ? ? ?if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){
? ? ? ? ?echo '
? ? ? ? ? ? ? ? ?<script language="JavaScript1.2" defer>
? ? ? ? ? ? ? ? ?var config = new Object(); ?// create new config object
? ? ? ? ? ? ? ? ?config.width ?= "250px";
? ? ? ? ? ? ? ? ?config.height = "35px";
? ? ? ? ? ? ? ? ?config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
? ? ? ? ? ? ? ? ?config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
? ? ? ? ? ? ? ? ?config.toolbar = [ ["InsertImageURL"] ];
? ? ? ? ? ? ? ? ?config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
? ? ? ? ? ? ? ? ?editor_generate("categories_image",config);
? ? ? ? ? ? ? ? </script>
? ? ? ? ? ? ? ';
? ? ? ?}
? ? ?}
? ?}

?>

 

The one thing that concernse me is and this is one of the url's in the install instructions

oscWYSIWYGinsertimage.gif

 

and this is what I have always seen

 

SNAG-0065.jpg

 

I've tried just about everything to correct this but have not succeeded

Edited by beardeddone

Best Regards

Link to comment
Share on other sites

I cut and pasted your code and the same thing happened. I tried to play around with the begining and ending php arguments and now I get a parse error oin the very last line althouhg I changed everything back and removed all the white spaces. I am confussed... Will have to start from scratch on this file I guess...

Link to comment
Share on other sites

I cut and pasted your code and the same thing happened. I tried to play around with the begining and ending php arguments and now I get a parse error oin the very last line althouhg I changed everything back and removed all the white spaces. I am confussed... Will have to start from scratch on this file I guess...

Did you do a refresh, I'm not getting that error now since I changed the code to what I have now, that's good I guess.

Best Regards

Link to comment
Share on other sites

I completly reinstalled the categories.php section except using your code as the last step and still the same as that portion of code displays on the screen in plain text. Here is what I have...

 

Thanx for your help!

 

      echo '            </td>' . "\n"; 
   }            
?> 
} else { // create category/product info 
        $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
       
        $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);
      } 
      break; 
  } 
                 
  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { 
    echo '            <td width="25%" valign="top">' . "\n";   
                 
    $box = new box; 
    echo $box->infoBox($heading, $contents); 
                
    echo '            </td>' . "\n";
// Add neccessary JS for WYSIWYG editor of category image
    if($action=='edit_category'){
      if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){ 
        echo '
                <script language="JavaScript1.2" defer>
                var config = new Object();  // create new config object
                config.width  = "250px";
                config.height = "35px"; 
                config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";
                config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';
                config.toolbar = [ ["InsertImageURL"] ];
                config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";
                editor_generate("categories_image",config);
               </script> 
             '; 
      } 
    } 
  } 
                 
?> 
         </tr> 
       </table></td> 
     </tr> 
   </table>

Link to comment
Share on other sites

Revisitng with a fresh start but still stumped as to why this one step is not displayed properly... Other then that everytyhing esle seems to be working except for the define main page. Seems as though the filenames.php points to the wrong file but when I change it, there is no difference. Then I have questions about a step that wants to make changes to catalog/index.php? Why? I would think this contribution has nothing to do with the public side of OSC.

 

Well seems like this contribution really needs help. Is the contribution of the same name (or simular) but v3 any better?

 

TIA

Link to comment
Share on other sites

  • 3 weeks later...

Hello Forum,

 

first of all I want to introduce myself. I am an OSC rookie and I have learned a lot from this forum. So thanks to all who contributed to this software and to the forum.

 

I ran over the same problem and found the solution. The complete section starting from

 

    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {

 

(see STEP 1.1g in MaxiDVD's "Step by Step Installation")

 

must read:

 

    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {

      echo '            <td width="25%" valign="top">' . "\n";

 

      $box = new box;

      echo $box->infoBox($heading, $contents);

 

      echo '            </td>' . "\n";

    }

          // Add neccessary JS for WYSIWYG editor of category image

      if($action=='edit_category'){

        if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){

          echo '

                  <script language="JavaScript1.2" defer>

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

                  config.width  = "250px";

                  config.height = "35px";

                  config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";

                  config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';

                  config.toolbar = [ ["InsertImageURL"] ];

                  config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";

                  editor_generate("categories_image",config);

                </script>

              ';

        }

      }

?>

 

So, STEP 1.1g should read:

 

  STEP 1.1g --> FIND: /admin/categories.php

  ================================================================================

====

  Look/search for this around line 1051:

  ================================================================================

====

 

 

        } else { // create category/product info

          $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');

 

          $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS);

        }

        break;

    }

 

    if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {

        echo '            <td width="25%" valign="top">' . "\n";

 

      $box = new box;

      echo $box->infoBox($heading, $contents);

 

      echo '            </td>' . "\n";

    }

   

 

================================================================================

====

  And directly UNDERNEATH IT add this:

  ================================================================================

====

 

 

 

      // Add neccessary JS for WYSIWYG editor of category image

      if($action=='edit_category'){

        if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){

          echo '

                  <script language="JavaScript1.2" defer>

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

                  config.width  = "250px";

                  config.height = "35px";

                  config.bodyStyle = "background-color: white; font-family: Arial; color: black; font-size: 12px;";

                  config.debug = ' . HTML_AREA_WYSIWYG_DEBUG . ';

                  config.toolbar = [ ["InsertImageURL"] ];

                  config.OscImageRoot = "' . trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) . '";

                  editor_generate("categories_image",config);

                </script>

              ';

        }

      }

 

Once, this is done HTML Area is a really nice and useful piece of software. Lee, thank you for this contrib.

 

I hope this helps

 

All the best

 

Ernst.

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I had this problem and this is now sorted, however i have a problem which i think relates to SEF link transformer and MS2 WYSIWYG HTMLArea 1.7.

 

I have had to rename all the .html files in the HTMLArea contrib to .php otherwise i get the popup iframe with a 404 error (because the SEF is changing the links to a .php extension).

 

Everything now works except for the image selection, when i click on an image i get a javascript error:

 

jserr.jpg

 

I click 'yes' to continue running scripts and the image appears in the preview, but the selected image url never changes from http://

 

I can upload images and (i think) all functions except for specifying the image to use work.

 

The only other thing i notice is that i get a message about 'do you want to display the nonsecure items when the page loads and when i click the 'Insert Image' button.

 

I would be grateful if anyone has tried these two contribs together, please let me knwo how you got on, also if someone can tell me how to just turn the whole image part of this contrib off, that would be good enough for now?

 

Please help!

 

Thanks in advance

 

Chris

Link to comment
Share on other sites

  • 2 months later...

I tried everyones idea on how 1.1g should be added, but i still get "File not found" in my Insert Image -Web Page Dialog window when I try to add an image.

So I'm not sure if there is something missing in my catagores.php

Edited by funkyfermin
Link to comment
Share on other sites

  • 7 months later...
  • 4 weeks later...

I get a strange error when I try yo open up the image window...something which says Array directory not found. I created an Array directors inside images but then any image i insert has a wrong URL.

 

Please help!

-Abbas

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...