Jump to content
Sign in to follow this  
MaxiDVD

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

Recommended Posts

I am exhausted cos I have spent more than 3 hrs trying to install WYSIWYG HTML.

 

I unzipped WYSIWYG HTML folder to /admin/editor/..., and also I did this:

<script>VISUAL=1;FULLCTRL=1;USETABLE=1;</script>

<script src='./editor/quickbuild.js'></script>

</html>

 

within in the file: /admin/categories.php

line: 1024

 

but it didnt work.

 

suddently, i realized I could not find quickbuild.js as a file in anywhere.

 

Anyone can help me pls!!! i am really exhausted about that!

Share this post


Link to post
Share on other sites
I am exhausted cos I have spent more than 3 hrs trying to install WYSIWYG HTML.

 

I unzipped WYSIWYG HTML folder to /admin/editor/..., and also I did this:

<script>VISUAL=1;FULLCTRL=1;USETABLE=1;</script>

<script src='./editor/quickbuild.js'></script>

</html>

 

within in the file: /admin/categories.php

line: 1024

 

but it didnt work.

 

suddently, i realized I could not find quickbuild.js as a file in anywhere.

 

Anyone can help me pls!!! i am really exhausted about that!

 

 

still waiting... :(

Share this post


Link to post
Share on other sites

Hi all,

 

I am running WYSIWYG Editor 1.6 as i have not been able to upgrade to 1.7 due to an SQL problem. I am having problems with the insert image option as i am using a sharred SSL. When click on inesert image i get a window saying this page contains secure and nonsecure items. If i click ok it will load however i can not access the image directory.

 

I have set the images folder in catalog to chmod 777 but i still can not access it. Has anyone got any ideas of what it could be and what i need to change?

 

I have a feeling it is to do with the SSL but im not a 100% sure as i`ve only just started learning php about 2 weeks ago

 

Thanks..


Steve

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

 

Wizz, You are a STAR! Spent ages trying to work out how to fix this. Thank you so much! :o)


Steve

Share this post


Link to post
Share on other sites

When I added this contribution and the installation went fairly smooth. However when i click the preview button on a product descroption after changing the attributes on some text such as making the word TESTING bold it outputs __STRONG_TESTING__/STRONG_ instead of the proper bold text. Where should i start looking for the problem?

Edited by Squintz

Modules installed:

http://forums.oscommerce.com/index.php?showtopic=57259 - Options attributes

- wysiwyg editor

- cats on main page

- policies and terms

Share this post


Link to post
Share on other sites

I installed the contrib on fresh OSC MS2.2. All works Ok except for one thing:

The contrib allows for the input of text in the second text box within the admin console, but it doesn't present itself on the front-end from a customer/shoppers perspective....

 

You have any idea about this?

 

Thanks

Share this post


Link to post
Share on other sites

Hey Peoples,

 

Im having problems when inseting javascript into the source code view, i gather this is because the toolbar is javascript aswell, and it doesnt mix ... But if someone could help me out.

 

This is the javascript im trying to insert:

 

<FONT color=#ffffff size=3> </FONT></P>
<HR color=orange noShade SIZE=2>
<h3>
<script language="JavaScript1.2">
/*
Neon Lights Text
By JavaScript Kit (http://javascriptkit.com)
For this script, TOS, and 100s more DHTML scripts,
Visit http://www.dynamicdrive.com
*/
var message="Just In"
var neonbasecolor="orange"
var neontextcolor="green"
var flashspeed=100  //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)

function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
return crossobj
}

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
//eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor

if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()

</script>
</h2>
<fieldset>
<legend><h3>Product</legend></h3>
<font size="4" face="verdana" color="#c51878"><b>
Product Description</font>
</fieldset> </b><br>
<P>

<TABLE class=ProductPageText cellSpacing=2 cellPadding=2 width="100%" bgColor=#FFCC66 border=0>


<TR>

<TD vAlign=top align=middle colSpan=4><STRONG>Item Number</STRONG></TD></TR>

<TR bgColor=white>

<TD vAlign=top align=middle colSpan=4><STRONG>Set Contains pieces</STRONG></TD></TR></TABLE></P><br><br>

<b> Product Title </b> <br>
Description <br><br>

<li>Includes
<li>Includes

<img src="image.jpg" /><img src="image.jpg" />

<br>
<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>

<script language="JavaScript">
<!--

/*
Dancing Stars cursor (Submitted by Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div style="position:relative;width:3px;height:3px;background:#FFFF00;font-size:2px;visibility:visible"></div>')
document.write('</div>')
}

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;

if (document.all)
{
 function MoveHandler(){
 Xpos = document.body.scrollLeft+event.x;
 Ypos = document.body.scrollTop+event.y;
 }
 document.onmousemove = MoveHandler; 
}

else if (document.layers)
{
 function xMoveHandler(evnt){
 Xpos = evnt.pageX;
 Ypos = evnt.pageY;
 }
 window.onMouseMove = xMoveHandler;
}



function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4;
xBase = window.innerWidth/4;
}

if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0; i < totaldivs; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
 tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
 tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}

else if (document.layers)
{
for ( j = 0; j < 7; j++ ) 
{
var templayer="a"+j
 document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
 document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>

 

Its giving me the following errors:

 

'style' is null or not an object

and

'document.all.starsDiv.all.length' is null or not an object

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Has anybody installed this contribution.... and then swapped out HTMLArea for some other editor, such as FCKEditor?

 

I was wondering if it's just a matter of locating the Javascript references to HTMLArea and then pointing them to the new/replacement editor?

 

 

Thanks!

 

-= Dave =-

Share this post


Link to post
Share on other sites

On the off-chance that somebody may have encountered this before:

 

I'm having trouble getting HTMLAREA to "appear" on the new product / edit product page in the Admin section.

 

I get a Javascript error "Object doesn't support this property or method". It referred to a line number that just didn't make sense if one just looked at the categories.php page.

 

However, I determined that line number was pointing to the actual HTMLAREA javascript file, editor_basic.js. I figured this out by forcing the categories.php file to load the advanced editor instead.... in both files (editor_basic.js and editor_advanced.js), the same line (but different line number, of course) is referenced:

 

// insert wysiwyg

document.all[objname].insertAdjacentHTML('afterEnd', editor)

 

If I put an "alert(objname);" statement directly ahead of that above that line, and then go refresh the page, I get alerts that prove to me that we're going through all of the ultimate images image fields.... (I have the Ultrapics module installed)... and then the last variable I get is "products_description[1]".

 

If I comment out the php line that generates the products_description field, I no longer get the javascript error.

 

So, it seems the problem involves running that above "insertAdjacentHTML" command for my products description field only!

 

Anybody have any ideas or suggestions for investigation as to why this isn't working??

 

 

Thanks!

 

-= Dave =-

Share this post


Link to post
Share on other sites
Hi,

 

I got an error when trying to import database... any ideas?!?!?

 

 

It seems to me you need a second closed-parentheses after the Wingdings, in order to close that array. It looks like you have a comma there instead. I don't think that comma should be there.

 

-= Dave =-

Share this post


Link to post
Share on other sites
On the off-chance that somebody may have encountered this before:

 

I'm having trouble getting HTMLAREA to "appear" on the new product / edit product page in the Admin section.

 

I get a Javascript error "Object doesn't support this property or method". It referred to a line number that just didn't make sense if one just looked at the categories.php page.

 

However, I determined that line number was pointing to the actual HTMLAREA javascript file, editor_basic.js. I figured this out by forcing the categories.php file to load the advanced editor instead.... in both files (editor_basic.js and editor_advanced.js), the same line (but different line number, of course) is referenced:

 

// insert wysiwyg

document.all[objname].insertAdjacentHTML('afterEnd', editor)

 

If I put an "alert(objname);" statement directly ahead of that above that line, and then go refresh the page, I get alerts that prove to me that we're going through all of the ultimate images image fields.... (I have the Ultrapics module installed)... and then the last variable I get is "products_description[1]".

 

If I comment out the php line that generates the products_description field, I no longer get the javascript error.

 

So, it seems the problem involves running that above "insertAdjacentHTML" command for my products description field only!

 

Anybody have any ideas or suggestions for investigation as to why this isn't working??

Thanks!

 

-= Dave =-

 

 

 

I figured out the problem... after about four hours of hair-pulling.

 

It turns out, I somehow managed to have TWO product description fields in my code. In fact, they were basically the same copy of the section of code from this contribution for drawing the product description field.... it's just that I had it at TWO locations for some reason: 1 -- immediately below the manufacturer drop-down, near the top of the page.... and .... 2 -- further on down, just above the quantity field.

 

I commented out that second segment of code... and now the editor appears !!!

 

 

Thanks!

 

-= Dave =-

Share this post


Link to post
Share on other sites

Hi after installing the contrib, I get the following display of code on the top of the page when I enter into the categoies in Admin

 

} else { // create category/product info $heading[] = array('text' => '' . EMPTY_CATEGORY . ''); $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' ' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' ' . "\n"; // Add neccessary JS for WYSIWYG editor of category image if($action=='edit_category'){ if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){ echo ' '; } } }

 

 

Can anyone assist???


Espen Falkenhaug

Share this post


Link to post
Share on other sites
Hi after installing the contrib, I get the following display of code on the top of the page when I enter into the categoies in Admin

 

} else { // create category/product info $heading[] = array('text' => '' . EMPTY_CATEGORY . ''); $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' ' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' ' . "\n"; // Add neccessary JS for WYSIWYG editor of category image if($action=='edit_category'){ if (HTML_AREA_WYSIWYG_DISABLE != 'Disable'){ echo ' '; } } }

Can anyone assist???

That's because in the instructions in Step 1.1g it is mentioned to add some code below existing code where in fact it should be replace.

Share this post


Link to post
Share on other sites

Hi all am getting a warning message when I want to insert an image with html_wysiwygEditor_v1.6.6

Have it installed on a oscommerce 2.2 MS1 based store. Error appears in windows of insert image interface as follows:

Warning: Unknown (auth.php): failed to open stream: No such file or directory in unknown on line 0

Warning:(null)(): failed opening 'auth.php' for inclusion(inlude _path='.:/usr/local/lib/php/') in unknown on line 0

 

Image below:.

Errorimage.gif

 

 

Any help will be greatly appreciated. Am still new to the PHP story. :blink:

Share this post


Link to post
Share on other sites

Hi All,

To add a product, I am going to Admin

When I click on

When I am trying to add a product, there is a section for short images

When I click on SM1, then a popup comes

the moment I click on Browse I get this error ( see screenshot)

http://www.freedroplists.com/osc_error.JPG

Can someone tell me how to get rid of this?

 

Thanks

Share this post


Link to post
Share on other sites

Error when trying to use Images.

 

I have installed and working so far apart for the ability to actually use images. I upload without a problem and the directory is set to 777. Whenever I select an image to add from the list on the server in image root I get an error:-

 

Line 35

Char 4

Access is denied

Code 0

URL http://www.koi-waterlife-centre.com/eShop/...le=activate.gif

 

Do you want to continue running scripts on this page.

 

I select Yes, but cannot really do anything or add the picture.

 

Any clues please, now desperate.

 

Damian

Share this post


Link to post
Share on other sites

Sorry I originally posted this in the wrong place.

 

 

I installed this module and the html fields seem to work in newsletter, email but not in product desription.

 

The only thing I can think of is that in the admin/categories.php where it says in the instructions:

 

 

STEP 1.2 --> FIND: /admin/categories.php

 

Look for this around line 504:

 

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $HTTP_GET_VARS['pID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</form></tr>

 

And directly underneath it add this:

 

 

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

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>

 

the problem is that my admin/categories.php looked like this:

 

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</tr> </table></form>

 

so I added the code under what i have posted above.

 

 

where did I go wrong?

 

 

I am so new at this and have been not having very much luck.

 

any help will be much appreciated.

 

Brad Smith

Share this post


Link to post
Share on other sites

I have installed this contribution, when I go to define Main Page I get:

 

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/src/public_html/catalog/admin/includes/functions/database.php:13) in /home/src/public_html/catalog/admin/includes/functions/database.php on line 13

 

Any ideas?

 

 

In an effort to resolve the above, I deleted the row in the configuration group table and re-imported the sql - I then got two of every property in the wysiwyg editor in the Config are - I have deleted it again, but have no idea where to go from here.

 

I have been trying to get this working for days - please can you help me?

 

Thanks

Share this post


Link to post
Share on other sites
I have installed this contribution, when I go to define Main Page I get:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/src/public_html/catalog/admin/includes/functions/database.php:13) in /home/src/public_html/catalog/admin/includes/functions/database.php on line 13

 

Any ideas?

In an effort to resolve the above, I deleted the row in the configuration group table and re-imported the sql - I then got two of every property in the wysiwyg editor in the Config are - I have deleted it again, but have no idea where to go from here.

 

I have been trying to get this working for days - please can you help me?

 

Thanks

I've sorted out the last bit but still get:

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/src/public_html/catalog/admin/includes/functions/database.php:13) in /home/src/public_html/catalog/admin/includes/functions/database.php on line 13

 

Can anyone help me please, please, please

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  

×