Jump to content
Sign in to follow this  
osjunkie

WYSIWYG SPAW EDITOR Support Thread

Recommended Posts

Hi All,

 

Does anybody know how to allow other HTML tags to be shown in the HTML view mode of WYSIWYG SPAW?

 

I need to add the tags for <TITLE> and <BODY>, mostly body because I would like to add a background color to my newsletters.

 

Hope anybody can help me.

 

Thanks in advance.

 

Kindly,

 

binan_dk

Share this post


Link to post
Share on other sites

anyone know how to get this working with Articles Manager?


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi guys - been using SPAW with my OSC for about a year now it rocks... however my main prob is with the customer order comments...

 

Right now they are being written using SPAW but when the customer logs into the site the HTML is not shown...

 

Im sure its simple but I guess what I need to do is either switch off SPAW for the ORder updates or switch on HTML for the customer site coments.... does anyone know how to do either?

 

Cheers in advance!!

 

RIch

Share this post


Link to post
Share on other sites

I must say Spaw Rocks!

 

?Emails sent after making above changes still show up with exposed html formating

 

?Love the css styles. I added my own and dangit the editor does not reflect them but they show up on the products page. It all started when I created my own styles; I was frustrated that the Preview didn't show my style changes so I added a link to categories.php to reference wysisyg.css in the spaw directory. Somewhere on the way I mucked things up.

 

I'll try to sort that but most importantly this editor is a hoot! I'm expecially impressed with the image upload, insert and properties capabilities.

 

Flash

Share this post


Link to post
Share on other sites

Hi

my spaw work very well but when i add a product catagory it return this error..

 

Fatal error: Call to undefined function: tep_output_generated_category_path_fs() in /home/timber/public_html/loja/admin/categories.php on line 344

 

Any help is apreciate

Share this post


Link to post
Share on other sites

Hey, this spaw editor seems like it is a good choice over the html area contrib. So has anyone that already has HTML area installed took it down and replaced with spaw? If it was just a matter of replacing for product descriptions, it would be a simple enough undo. But what I currently use the HTML area for is, product descriptions, article manager, email and newsletter and the info pages contrib. anyone know of a global change that would echo the spaw editor instead of the HTML area?


Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Share this post


Link to post
Share on other sites

hi guys im very tired about this error:

Fatal error: Cannot instantiate non-existent class: spaw_wysiwyg in /home/timber/public_html/loja/admin/includes/functions/html_output.php on line 262

 

Now there is my html_output.php

 

My store is on http://www.souzashop.com/loja

 

<?php

/*

$Id: html_output.php,v 1.29 2003/06/25 20:32:44 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

include ('../../loja/includes/edit-wysiwyg.php');

 

////

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($page == '') {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_ADMIN;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == 'true') {

$link = HTTPS_SERVER . DIR_WS_ADMIN;

} else {

$link = HTTP_SERVER . DIR_WS_ADMIN;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link = $link . $page . '?' . SID;

} else {

$link = $link . $page . '?' . $parameters . '&' . SID;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($connection == 'NONSSL') {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL_CATALOG == 'true') {

$link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;

} else {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link .= $page;

} else {

$link .= $page . '?' . $parameters;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $params = '') {

$image = '<img src="' . $src . '" border="0" alt="' . $alt . '"';

if ($alt) {

$image .= ' title=" ' . $alt . ' "';

}

if ($width) {

$image .= ' width="' . $width . '"';

}

if ($height) {

$image .= ' height="' . $height . '"';

}

if ($params) {

$image .= ' ' . $params;

}

$image .= '>';

 

return $image;

}

 

////

// The HTML form submit button wrapper function

// Outputs a button in the selected language

function tep_image_submit($image, $alt = '', $parameters = '') {

global $language;

 

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

 

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

 

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

 

$image_submit .= '>';

 

return $image_submit;

}

 

////

// Draw a 1 pixel black line

function tep_black_line() {

return tep_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '1');

}

 

////

// Output a separator either through whitespace, or with an image

function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {

return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);

}

 

////

// Output a function button in the selected language

function tep_image_button($image, $alt = '', $params = '') {

global $language;

 

return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);

}

 

////

// javascript to dynamically update the states/provinces list when the country is changed

// TABLES: zones

function tep_js_zone_list($country, $form, $field) {

$countries_query = tep_db_query("select distinct zone_country_id from " . TABLE_ZONES . " order by zone_country_id");

$num_country = 1;

$output_string = '';

while ($countries = tep_db_fetch_array($countries_query)) {

if ($num_country == 1) {

$output_string .= ' if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";

} else {

$output_string .= ' } else if (' . $country . ' == "' . $countries['zone_country_id'] . '") {' . "\n";

}

 

$states_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '" . $countries['zone_country_id'] . "' order by zone_name");

 

$num_state = 1;

while ($states = tep_db_fetch_array($states_query)) {

if ($num_state == '1') $output_string .= ' ' . $form . '.' . $field . '.options[0] = new Option("' . PLEASE_SELECT . '", "");' . "\n";

$output_string .= ' ' . $form . '.' . $field . '.options[' . $num_state . '] = new Option("' . $states['zone_name'] . '", "' . $states['zone_id'] . '");' . "\n";

$num_state++;

}

$num_country++;

}

$output_string .= ' } else {' . "\n" .

' ' . $form . '.' . $field . '.options[0] = new Option("' . TYPE_BELOW . '", "");' . "\n" .

' }' . "\n";

 

return $output_string;

}

 

////

// Output a form

function tep_draw_form($name, $action, $parameters = '', $method = 'post', $params = '') {

$form = '<form name="' . tep_output_string($name) . '" action="';

if (tep_not_null($parameters)) {

$form .= tep_href_link($action, $parameters);

} else {

$form .= tep_href_link($action);

}

$form .= '" method="' . tep_output_string($method) . '"';

if (tep_not_null($params)) {

$form .= ' ' . $params;

}

$form .= '>';

 

return $form;

}

 

////

// Output a form input field

function tep_draw_input_field($name, $value = '', $parameters = '', $required = false, $type = 'text', $reinsert_value = true) {

$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

 

if (isset($GLOBALS[$name]) && ($reinsert_value == true) && is_string($GLOBALS[$name])) {

$field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';

} elseif (tep_not_null($value)) {

$field .= ' value="' . tep_output_string($value) . '"';

}

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

////

// Output a form password field

function tep_draw_password_field($name, $value = '', $required = false) {

$field = tep_draw_input_field($name, $value, 'maxlength="40"', $required, 'password', false);

 

return $field;

}

 

////

// Output a form filefield

function tep_draw_file_field($name, $required = false) {

$field = tep_draw_input_field($name, '', '', $required, 'file');

 

return $field;

}

 

////

// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()

function tep_draw_selection_field($name, $type, $value = '', $checked = false, $compare = '') {

$selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

 

if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';

 

if ( ($checked == true) || (isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ($GLOBALS[$name] == 'on')) || (isset($value) && isset($GLOBALS[$name]) && (stripslashes($GLOBALS[$name]) == $value)) || (tep_not_null($value) && tep_not_null($compare) && ($value == $compare)) ) {

$selection .= ' CHECKED';

}

 

$selection .= '>';

 

return $selection;

}

 

////

// Output a form checkbox field

function tep_draw_checkbox_field($name, $value = '', $checked = false, $compare = '') {

return tep_draw_selection_field($name, 'checkbox', $value, $checked, $compare);

}

 

////

// Output a form radio field

function tep_draw_radio_field($name, $value = '', $checked = false, $compare = '') {

return tep_draw_selection_field($name, 'radio', $value, $checked, $compare);

}

 

////

// Output a form textarea field

/*

//function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {

$field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {

$field .= stripslashes($GLOBALS[$name]);

} elseif (tep_not_null($text)) {

$field .= $text;

}

 

$field .= '</textarea>';

 

return $field;

}

*/

////

// Output a form textarea field

function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$sw = new SPAW_Wysiwyg(tep_output_string($name), stripslashes($text), '', '', '', '', '');

$sw->show();

return $field;

}

 

////

// Output a form hidden field

function tep_draw_hidden_field($name, $value = '', $parameters = '') {

$field = '<input type="hidden" name="' . tep_output_string($name) . '"';

 

if (tep_not_null($value)) {

$field .= ' value="' . tep_output_string($value) . '"';

} elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {

$field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';

}

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

return $field;

}

 

////

// Output a form pull down menu

function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {

$field = '<select name="' . tep_output_string($name) . '"';

 

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

 

$field .= '>';

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

?>

 

 

 

Any help is apreciate

Share this post


Link to post
Share on other sites

i have installed lots of contribs but this has to be the most difficult to understand.. i get the following errors:

 

 

Warning: main(): open_basedir restriction in effect. File(../../../includes/edit-wysiwyg.php) is not within the allowed path(s): (/home/diveb:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/diveb/public_html/admin/includes/functions/html_output.php on line 13

Warning: main(../../../includes/edit-wysiwyg.php): failed to open stream: Operation not permitted in /home/diveb/public_html/admin/includes/functions/html_output.php on line 13

Warning: main(): open_basedir restriction in effect. File(../../../includes/edit-wysiwyg.php) is not within the allowed path(s): (/home/diveb:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/diveb/public_html/admin/includes/functions/html_output.php on line 13

Warning: main(../../../includes/edit-wysiwyg.php): failed to open stream: Operation not permitted in /home/diveb/public_html/admin/includes/functions/html_output.php on line 13

Warning: main(): Failed opening '../../../includes/edit-wysiwyg.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/diveb/public_html/admin/includes/functions/html_output.php on line 13

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/diveb/public_html/admin/includes/functions/html_output.php:13) in /home/diveb/public_html/admin/includes/functions/sessions.php on line 67

 

anyone give me a good reason?


Hey its free!

Share this post


Link to post
Share on other sites

You just don't have your paths right:

 

Look at this example for catalog/includes/edit-wysiwyg.php

 

 

<?php

 

// this part determines the physical root of your website

// it's up to you how to do this

if (!ereg('/$', $_SERVER['DOCUMENT_ROOT']))

$_root = $_SERVER['DOCUMENT_ROOT'] . '/';

else

$_root = $_SERVER['DOCUMENT_ROOT'];

 

define('DR', $_root);

unset($_root);

 

// set $spaw_root variable to the physical path were control resides

// don't forget to modify other settings in config/spaw_control.config.php

// namely $spaw_dir and $spaw_base_url most likely require your modification

$spaw_root = DR . 'catalog/spaw/';

 

// include the control file

include $spaw_root . 'spaw_control.class.php';

 

// here we add some styles to styles dropdown

$spaw_dropdown_data['style']['default'] = 'No styles';

$spaw_dropdown_data['style']['style1'] = 'Style no. 1';

$spaw_dropdown_data['style']['style2'] = 'Style no. 2';

$copy = 'Spaw Editor V1.1';

?>

 

 

AND MAKE SURE YOU HAVE THIS at the very top of admin/includes/functions/html_output.php

 

/*

$Id: html_output.php, v1.29 2003/06/25 20:32:44 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

include ('../../catalog/includes/edit-wysiwyg.php');

Share this post


Link to post
Share on other sites

Hi!

 

How can I disbale SPAW from adding a <br> when nothing is filled in?

 

(I would want to add an "if statement" for a specfic field on the product information page to not show it at all if "NULL". However, SPAW adds a <br> when updating products in categories.php, even if the specific field is untouched).

Share this post


Link to post
Share on other sites

Hi All

I am having a bit of an issue with version 1.1 I have been using it for a long time but never did much with the image upload. It seems to work good upto adding the image in the text field. There it works ok as long as the text field is for a site function such as add product. but for the news letter where I need it most it has an issue. it adds the image with a relative path ie. <img src"images/my.jpg"> wich is fine for the product page but when I send it in the news letter I need to refference the site. Is there an easy way to set this so I do not have to manually add the http://mysite.com every time I add an image in the news letter

 

thanx

dave

Share this post


Link to post
Share on other sites

Can ANYONE please tell us if we can send e-mails from "catalog/admin/mail.php" in HTML format to customers? No one did solved this ??

Share this post


Link to post
Share on other sites

hi, i'm looking for a solution

 

when editing the content with spaw the text will include the html output?

 

anyway to fix this?

 

thanks


Lenamtl

Share this post


Link to post
Share on other sites

Hi all,

 

My spaw editor works very fine but there is ono problem.

 

When you edit a product, the spaw editor ADD TAGS automaticly to my code ???? Everytime if i want to edit a product, i must first delete the tags that spaw have put in. I have try the spaw editor in more that one store and in all stores it do the same.

Share this post


Link to post
Share on other sites

Hi!

 

when i try to update products using spaw2 i get the following error:

 

----------

Warning: tep_draw_textarea_field() [function.tep-draw-textarea-field]: Unable to access /home/pingy666/www.hemmakvarnen.se/catalog/admin/spaw2/spaw.inc.php in /mnt/home/_p/pingy666/www.hemmakvarnen.se/catalog/admin/includes/functions/html_output.php on line 239

 

Warning: tep_draw_textarea_field(/home/pingy666/www.hemmakvarnen.se/catalog/admin/spaw2/spaw.inc.php) [function.tep-draw-textarea-field]: failed to open stream: No such file or directory in /mnt/home/_p/pingy666/www.hemmakvarnen.se/catalog/admin/includes/functions/html_output.php on line 239

 

Warning: tep_draw_textarea_field() [function.include]: Failed opening '/home/pingy666/www.hemmakvarnen.se/catalog/admin/spaw2/spaw.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /mnt/home/_p/pingy666/www.hemmakvarnen.se/catalog/admin/includes/functions/html_output.php on line 239

----------

 

and the changes doesnt update at all..both IE and firefox.

 

BTW i have my spaw2 directory direct under under/catalog/ and not under /catalog/admin/ as in the error messege. any suggestions?

 

thnx in advance

Pingy

Share this post


Link to post
Share on other sites

I am using Spaw 2 but anchor links doesn't seem to work correct. When using them on a page I am being redirected to the index page instead of the anchor name.. Anyone know of a fix for this?

Share this post


Link to post
Share on other sites

I have installed this contrib and am using the v2.0.5 of SPAW. I can go to the demo page and it shows up fine... but inside osCommerce it is not working. I get an x for a broken link instead of all images. This happens everywhere the function is called. I also went to SPAW's forums and found a different set of install instructions there. I tried those and got the same result.

 

looking at the source code inside osC it is pulling the SPAW from

//home/wordofli/public_html/AngelFood/catalog/spaw2/

 

But the demo page is using

/AngelFood/catalog/spaw2/

 

I am guessing this is where the problem is coming from. But I have not been able to figure out how to change this and it not fail to call the function.

 

If anyone can provide any suggestions I would greatly appreciate it.

 

Thanks

Rob

Share this post


Link to post
Share on other sites

Okay well I have given up on the SPAW editor for this client.

 

I have used it in the past and so long as you use the "lite" theme it has been pretty good.

 

I have just tried the FCK Editor and it seems to be working fine.

 

Rob

Share this post


Link to post
Share on other sites

I installed spaw2 in OSC v2.2 RC1.

It loads rather slowly one or (two buttons at a time) , but once loaded it appears to work (i'm careful not to do too much , lest I get unexpected results)

 

The problem is that the design area displays the contents of english.php verbatim!

I was expecting just the "browser view" with no code. that should only show in the HTML screen-right?

 

Any tweek for this?

Share this post


Link to post
Share on other sites
I installed spaw2 in OSC v2.2 RC1.

It loads rather slowly one or (two buttons at a time) , but once loaded it appears to work (i'm careful not to do too much , lest I get unexpected results)

 

The problem is that the design area displays the contents of english.php verbatim!

I was expecting just the "browser view" with no code. that should only show in the HTML screen-right?

 

Any tweek for this?

 

When i used this in the past I found that I needed to also download the spaw2lite theme. This theme is css driven and loads many times quicker.

 

Also, I noticed that it broke the ability to use the define language and file manager pages.

Of course i would not recommend using the file manager as it messed up several of my pages. Some kind of bug in it if I understood these forums correctly.

 

Just my experience with it.

Share this post


Link to post
Share on other sites
I installed spaw2 in OSC v2.2 RC1.

It loads rather slowly one or (two buttons at a time) , but once loaded it appears to work (i'm careful not to do too much , lest I get unexpected results)

 

The problem is that the design area displays the contents of english.php verbatim!

I was expecting just the "browser view" with no code. that should only show in the HTML screen-right?

 

Any tweek for this?

 

 

I just installed Spaw2 and am having the same issue... I see the contents of the php file but was expecting a browser view. Did JRM ever get this fixed ot can someone else help?

Share this post


Link to post
Share on other sites

In includes/functions/html_output.php, change this:

	  $spaw = new SpawEditor(tep_output_string($name), $content);

to this:

	  $spaw = new SpawEditor(tep_output_string($name), stripslashes($text));

 

worked for me.

 

-jared

Share this post


Link to post
Share on other sites

I have come accross a serious bug with Spaw, once installed most activity in the admin side is mirrored back to your own server!! I noticed slow downs in the admin side & think this was cause, also its v-slow to load on each instance. I tried on second site & got same effect. I`m now using a different editor (FCK)

 

I would not reccomend using till someone finds the cause.

 

 

 

 

:blink:


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

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  

×