Jump to content
Sign in to follow this  
MaxiDVD

[SUPPORT] HTML Editor and UltraPics by MaxiDVD

Recommended Posts

I have this simple script which means I can update all the info box pages through admin.

 

The code for the admin page is quite simple

<?php


require('includes/application_top.php');?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top" height="27">
   <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
   <?php require(DIR_WS_INCLUDES . 'column_left.php');?>
   </table></td>
    <td class="pageHeading" valign="top"><?php
      echo "Information for Conditions of Use";
?> <?php


 if ($REQUEST_METHOD=="POST")
 {
   mysql_query('REPLACE INTO info_conditions (Id, Text) VALUES (1, "'.mysql_escape_string($aboutus).'")')
         or die(mysql_error());
 }

 $sql=mysql_query('SELECT * FROM info_conditions')
   or die(mysql_error());
 $row=mysql_fetch_array($sql);

?>

<div class="Title"></div>
<table width="98%" align="center" border="0" cellpadding="0" cellspacing="0">
<form name="aboutusform" method="Post" action="">
<tr>
 <td width="400px" valign="top"><br>
 <textarea name="aboutus" cols="100" rows="22"><?php echo stripslashes($row['Text']); ?></textarea></td>
</tr>
<tr>
 <td colspan="2"> </td>
</tr>
<tr>
 <td align="right"><input type="submit" name="Save" value="Save" style="width: 70px"</td>
 <td> </td>
</tr>
<tr>
 <td colspan="2"> </td>
</tr>
</form>
</table>
<br>


<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<p>?</p>
<p>?</p><p><br>
</p></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I have tried a few ways But I cannot get the Wysiwyg editor to work. How do I incorporate it into this page?

 

thnx


Feel free to ask me for help

beep... beep....My Pager

Share this post


Link to post
Share on other sites

can anyone tell me where to get good NETPBM? Let me know and i can setup ftp for you to upload NETPBM.

I can host if anyone need it.

Share this post


Link to post
Share on other sites

tommy916,

 

Sorry to drag the chain, but this has been updated now:

Access Denied at http://www.nieloimage.com/download/

 

Forbidden

You don't have permission to access to this document on this server.

--------------------------------------------------------------------------------

Apache Server at nieloimage.com

 

hotnuts21,

<?php

 

require('includes/application_top.php');?>

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

 

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

//MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 <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>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

 

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

  <td width="<?php echo BOX_WIDTH; ?>" valign="top" height="27">

  <table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

  <?php require(DIR_WS_INCLUDES . 'column_left.php');?>

  </table></td>

    <td class="pageHeading" valign="top"><?php

      echo "Information for Conditions of Use";

?> <?php

 

 

if ($REQUEST_METHOD=="POST")

{

  mysql_query('REPLACE INTO info_conditions (Id, Text) VALUES (1, "'.mysql_escape_string($aboutus).'")')

        or die(mysql_error());

}

 

$sql=mysql_query('SELECT * FROM info_conditions')

  or die(mysql_error());

$row=mysql_fetch_array($sql);

 

?>

 

<div class="Title"></div>

<table width="98%" align="center" border="0" cellpadding="0" cellspacing="0">

<form name="aboutusform" method="Post" action="">

<tr>

<td width="400px" valign="top"><br>

<textarea name="aboutus" cols="100" rows="22"><?php echo stripslashes($row['Text']); ?></textarea></td>

</tr>

<tr>

<td colspan="2"> </td>

</tr>

<tr>

<td align="right"><input type="submit" name="Save" value="Save" style="width: 70px"</td>

<td> </td>

</tr>

<tr>

<td colspan="2"> </td>

</tr>

</form>

<?php if (HTML_AREA_WYSIWYG_INFORMATION_PAGES == 'Enable') { ?>

      <script language="JavaScript1.2" defer>

          // MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 Products Description HTML - Body

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

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

            config.height = "<?php echo DEFINE_MAINPAGE_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

          editor_generate('aboutus',config);

      <?php } ?>

</table>

<br>

 

 

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

 

<p> </p>

<p> </p><p><br>

</p></body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Try that on your form.

 

Lee

Share this post


Link to post
Share on other sites

Thanks Lee, unfortunately it doesnt seem to want to work.

 

I have moved away from the information pages unlimited mod which I mentioned on earlier pages. The main reason is that the information unlimited pages generates the pages through the database and so without a fair bit of tweaking it doesnt work with SEF URLS.

 

However I am now using the information box by calman, although this stores all the info in the database there are actuall files which you can name as you wish, and they pull the right info from the database.

 

however I would really like to get it working with the wysiwyg contrib.


Feel free to ask me for help

beep... beep....My Pager

Share this post


Link to post
Share on other sites

I've replace the files of admin/categories.php and htmlarea folder. when i go to Add new product. it doesn't have 6 new images optional on admin side.

Share this post


Link to post
Share on other sites

on admin categories page for "More Addition Images", why are all input are textarea? Did you remove the "browse" button? I want to use "browse" button to upload image.

Share this post


Link to post
Share on other sites

If you goto the admin/configuration/images there are two options

 

Use PHP Ultra_Main-Images Manger Addon?

Use PHP Additional-Images Manger Addon?

 

Set these both to disable and the browse buttons will magically re-appear and the input area will dissapear.

 

That should fix it.

 

I prefer using the text area input though, just click that little framed picture above the input box and you can upload, resize etc as you want :)


Feel free to ask me for help

beep... beep....My Pager

Share this post


Link to post
Share on other sites

Why do you have this HTML_AREA_WYSIWYG_DISABLE_ADDI? this doesn't use the WYSISYG image manager. I just changed it to HTML_AREA_WYSIWYG_DISABLE_JPSY

 

<?php if ((HTML_AREA_WYSIWYG_DISABLE_ADDI == 'Enable') && (ULTIMATE_ADDITIONAL_IMAGES == 'Enable')) { ?>
           <script language="JavaScript1.2" defer>
            var additonal_image = new Object();
            additonal_image.height = "25px";
            additonal_image.width = "230px";
            additonal_image.bodyStyle = 'background-color: white; font-family: Arial; color: black; font-size: 12px;';
            additonal_image.toolbar = [ ['InsertImageURL'] ];
            additonal_image.OscImageRoot = '<?= trim(HTTP_SERVER . DIR_WS_CATALOG_IMAGES) ?>';
            editor_generate('products_image_sm_1',additonal_image);
            editor_generate('products_image_xl_1',additonal_image);
            editor_generate('products_image_sm_2',additonal_image);
            editor_generate('products_image_xl_2',additonal_image);
            editor_generate('products_image_sm_3',additonal_image);
            editor_generate('products_image_xl_3',additonal_image);
            editor_generate('products_image_sm_4',additonal_image);
            editor_generate('products_image_xl_4',additonal_image);
            editor_generate('products_image_sm_5',additonal_image);
            editor_generate('products_image_xl_5',additonal_image);
            editor_generate('products_image_sm_6',additonal_image);
            editor_generate('products_image_xl_6',additonal_image);
           </script>

Share this post


Link to post
Share on other sites

MaxiDVD

 

I'm trying to get this contrib working with Master products but no joy so far.

 

It was working OK before I added the Master products code into categories.php but after adding Master products the HTML area and buttons for image uploader don't display when creating a new product or changing an existing one

 

When I go back to the old version of categories.php (with no master products) the HTML area and image uploaders work fine, so it's something to do with the code changes in this file.

 

I noticed with master products installed, when I change a product and view the source the MaxiDVD code isn't displayed after the final </form> tag.

 

I don't want to post my whole categories.php files on here so if you have any idea where the problem might be I can post that section.

 

 

 

And while I'm asking, is there an easy way to add the HTML area code in so I can edit my category descriptions (contribution 1373) with the HTML editor.

 

Thanks for your help

Tim

Share this post


Link to post
Share on other sites

Ahhh, help. I dont know whats going on, all my popups are comming up with a hight and width of "0"

my popup_image.php is...

<?php
/*
 $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $navigation->remove_current_page();

 $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
 $products = tep_db_fetch_array($products_query);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo $products['products_name']; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script language="javascript"><!--
var i=0;
function resize() {
 if (navigator.appName == 'Netscape') i=40;
 if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
 self.focus();
}
//--></script>
</head>
<body onload="resize();" onclick="javascript:top.window.close();" onblur="self.close()">
<?php
          if (($HTTP_GET_VARS['image'] ==0) && ($products['products_image_lrg'] != '')) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==1) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==2) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==3) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==4) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==5) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==6) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } else
    echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    ?>
</body>
</html>
<?php require('includes/application_bottom.php'); ?>

 

The only thing I can think of is that Im using Keep Image Proportions 1.3 (02/06/2004) but dont see where it would be conflicting.

Heres where Im testing the site...

http://globalmediashosting.net/tmp/catalog/

if anyone can help.

Share this post


Link to post
Share on other sites

I wanted to add that...

 

If I remove the

<?php
          if (($HTTP_GET_VARS['image'] ==0) && ($products['products_image_lrg'] != '')) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==1) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==2) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==3) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==4) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==5) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } elseif ($HTTP_GET_VARS['image'] ==6) {
    echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    } else
    echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name'], LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT);
    ?>

and just use the original

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

it works fine again.

 

Im not sure when this quit working.

Share this post


Link to post
Share on other sites

Please disregard my two previous posts, as this board will not allow me to edit my own comments.

 

I think I put too much crack in my coffee this morning while adding multiple contributions. I did an oops and uploaded the 1.1 version with out the Jpsy thingie on my system. I deleted, re-upped the 1.0 version and there is once again piece and harmony in my world of osC.

 

Sorry for any confusion.

Share this post


Link to post
Share on other sites

Don't now which ultrapics thread to use but..

 

Can I use an extra small image that only shows in the box "new products" (and of course two more for product info and popup)?

Share this post


Link to post
Share on other sites

Sorry to be bothersome. There does seem to be a conflict with the Keep Image Proportions 1.3 (02/06/2004)

 

Once I re-applied that contrib. the same problem happens, all pop-ups end up 0x0 pixel images.

 

Has anyone else used these two contributions together?

 

I believe the problem lies in "catalog/includes/functions/html_output.php"

 

if (tep_not_null($width) && tep_not_null($height)) {
     $image .= ' width="' . tep_output_string($width) . '" height="' .
     tep_output_string($height) . '"';
   }

is replaced by

// BEGIN Code Keep Image Proportions
   if (tep_not_null($width) && tep_not_null($height)) {
     if (IMAGE_CONSTRAIN_PROPORTIONS == 'true') {
       $image_size = @getimagesize($src);
       if ($image_size[0] <> 0) {
         $ratio = $width / $image_size[0];
         if ($image_size[1]*$ratio > $height) {
           $ratio = $height / $image_size[1];
           $width = $image_size[0] * $ratio;
         }
         else {
           $height = $image_size[1] * $ratio;
         }
       }
       $image .= ' width="' . tep_output_string($width) . '" height="' .
tep_output_string($height) . '"';
     }
   }
   else {
     $image .= ' width="' . tep_output_string($width) . '" height="' .
tep_output_string($height) . '"';
   }
   // END Code Keep Image Proportions

 

both mods seperate work fine, but when combined...

 

Can anyone throw any light my way?

Share this post


Link to post
Share on other sites

:huh: OK, I got the contrib loaded on a clean install of OSC MS 2.2. The html bit works great, the pic upload just gives me "file whatever.jpg could not be resized"(lister.php) and does not upload the image at all. If I change the resize settings to exactly the same as the photo I am uploading (which defeats my purpose for adding this contrib) then it uploads no problem. I think there is a problem with the netpbm, but I cant seem to locate it. I made sure I had the right version. Any help would be greatly appreciated.

 

 

PS, Great Contrib, cant wait to get it up and running. :huh:

Share this post


Link to post
Share on other sites

My bad, I did not chmod the netpbm files to 755, so that the scripts can execute, seems to be working now. Except for gif's. I get this.

 

netpbj.jpg

 

Any ideas would be appreciated. Thank you, great contrib!!!

Share this post


Link to post
Share on other sites

Has anyone got HTML area and ultrapics working with Master Products. I've been trying for a while but can't get them to go together.

 

After adding Master products the HTML area and buttons for image uploader don't display when creating a new product or changing an existing one

 

I noticed with master products installed, when I change a product and view the source the MaxiDVD code isn't displayed after the final </form> tag.

 

Anyone know why Master Products stops this MaxiDVD code from working?

 

Thanks

Tim

Share this post


Link to post
Share on other sites

Apparently I'm confised about how this works. Does Ultrapics support uploading iamges? It looks to me like I'm just going to be pointing the script to a url where my images already reside.

Edited by veruus

Share this post


Link to post
Share on other sites

I recently got this contrib working on my site and it is beautiful! Yes it does support the uploading and resizing of images, even gifs. This along with all the other functionality makes this one of if not the best contrib that I know of. Make sure you set all the permissions correctly. Make sure you have the right netpbm files (click here to download) for your server and that the permissions are set to allow the scripts to execute. Great Job and many thanks to the author.

Share this post


Link to post
Share on other sites

I hope I'm not asking to be spoon fed here but I'm still a bit lost. Is there an option for me to upload through the interface or do my images need to be pre-staged? NetPBM is squared away. What permissions should i have set for my scripts? Everything else is working fine. Do I need to modify the script in any way? Here's a screen shot of what I have. It's scaled some and a tad fuzzy but you should get the general idea.

 

s-shot.jpg

 

*sigh*

 

I feel like a n00b all over again.

Share this post


Link to post
Share on other sites

I set mine to 777 but I think 755 would do. I dont see the little green upload buttons on yours. You should not have to edit the netpbm files.

 

ultra.gif

 

Are you sure all files made it onto your server?

 

images.gif

Share this post


Link to post
Share on other sites

ARGH!! Firefox doesn't work with this contrib apparently. That was my problem. :rolleyes:

 

Thanks for the assistance.

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  

×