Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty and SPAW-editor
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
johannes
Smarty Regular


Joined: 10 May 2003
Posts: 85
Location: Malmö, Sweden

PostPosted: Sat May 24, 2003 6:29 pm    Post subject: Smarty and SPAW-editor Reply with quote

Hi list

Im thinking of using SPAW html-editor (see http://sourceforge.net/projects/spaw) and Smarty thogether.

Is it anybody on this forum that has done this before? Please let me know about problems and think-abouts, if there are any.... How did you solve this? and so on, tips and tricks.

...or is there a better html-editor too use?

/JohannesF
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Justin
Smarty Regular


Joined: 07 May 2003
Posts: 38
Location: Vilnius, Lithuania

PostPosted: Sun May 25, 2003 5:44 am    Post subject: Reply with quote

well, I'm using htmlArea ( http://www.interactivetools.com/products/htmlarea/ ) with my own image manager. and SPAW.. He's free for non-commercial use - see http://www.solmetra.com/en/disp.php/en_products/en_spaw/en_spaw_purchase Smile
Yes, SPAW is cool, but htmlArea community is bigger.
_________________
http://www.baubas.net
Back to top
View user's profile Send private message Visit poster's website
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Sun May 25, 2003 7:31 am    Post subject: Reply with quote

Well the new htmlArea works with Mozilla 1.3 browsers so its not IE only anymore
_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
Justin
Smarty Regular


Joined: 07 May 2003
Posts: 38
Location: Vilnius, Lithuania

PostPosted: Sun May 25, 2003 11:33 am    Post subject: Reply with quote

AZTEK wrote:
Well the new htmlArea works with Mozilla 1.3 browsers so its not IE only anymore

but htmlArea v3 is still in alpha mode. and it's not working with my firebird0.6 (mozilla 1.4b based).. but stable version of htmlArea v3 will be realy cool.
_________________
http://www.baubas.net
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jun 11, 2003 10:57 pm    Post subject: Reply with quote

I've been toying with the SPAW control (thanks for pointing it out johannes -- SPAW is pretty cool) and have implemented a Smarty custom plugin function to wrap it. It works -- in degrees -- but I am having a little bit of a problem with paths.

In particular, I am trying to keep all of the server-side Spaw code base out of my web root and then I want to put the client libraries and resources (js, css, img files) in directories of my choosing in the web root. Has anyone already done something like that?

In the meantime, I have the entire Spaw package located in a subdirectory off the webroot and it still isn't completely happy with that. The demos work okay, even with that setup, but I think only because they are in a subdir of the spaw directory. What doesn't work are the dialogs -- I'm not getting syntax errors anymore, but they aren't working as they are in the demo and I'm sure its because of the darn paths. I think SPAW wants to be at the document root.

I have to take another look at htmlArea--its been awhile and I got caught up by SPAW's flashy look Smile Still, SPAW sure beats using <textarea> !

Okay, it is so simplistic, I'm embarassed to post it, but perhaps it will save a lazy soul a few keystrokes; here is the current state of the my custom {editor} function plugin. You'll obviously have to modify it a bit to match your website and spaw installation, but apparently I'm not the one to look for advice on that Laughing
[php:1:4319925d68]<?php
// this part determines the physical root of your website
define('DR', MY_ROOT_DIR.'www/');
// include the control file
include_once DR.'spaw/config/'.'spaw_control.config.php';
include_once DR.'spaw/'.'spaw_control.class.php';

/**
* Smarty function plugin
* -------------------------------------------------------------
* Type: function
* Name: editor
* Version: 1.0
* Author: boots
* Purpose: create a spaw editor control
* -------------------------------------------------------------
* @param name required form name for control
* @param data optional data that control will start with
* @param lang optional country code for language, default: en
* @param toolbar optional toolbar style, default: SPAW default
* @param width optional control width (css units), default: 200
* @param height optional control height (css units), default: 400
* @param stylesheet optional stylesheet to use for styling SPAW, default: SPAW default
* @param theme optional theme to use for styling SPAW, default: SPAW default
* @param styles optional array of drop down style options, default set in function
*/
function smarty_function_editor( $params, &$this )
{
extract ( $params );
if ( empty( $name ) ) {
$this->trigger_error('editor: required parameter "name" missing');
} else {
$_styles['style']['default'] = 'Default';
$_styles['style']['crazystyle1'] = 'Crazy style no. 1';
$_styles['style']['crazystyle2'] = 'Crazy style no. 2';
$_styles['style']['crazystyle3'] = 'Crazy style no. 3';
if (!isset($data) || empty($data)) $data = '';
if (!isset($lang) || empty($lang)) $lang = 'en';
if (!isset($toolbar) || empty($toolbar)) $toolbar = '';
if (!isset($width) || empty($width)) $width = 200;
if (!isset($height) || empty($height)) $height = 90;
if (!isset($stylesheet) || empty($stylesheet)) $stylesheet = '';
if (!isset($theme) || empty($theme)) $theme = '';
if (!isset($styles) || empty($styles) || !is_array($styles)) $styles = $_styles;
$sw = new SPAW_Wysiwyg( $name, stripslashes($data),
$lang, $toolbar, $theme,
$width, $height, $stylesheet, $styles );
return $sw->getHtml();
}
}
?>[/php:1:4319925d68]

Good Luck!
Back to top
View user's profile Send private message
Hpatoio
Smarty Rookie


Joined: 29 Apr 2003
Posts: 25
Location: Italy

PostPosted: Tue Jun 17, 2003 2:40 pm    Post subject: I'm trying too ... :| Reply with quote

boots wrote:

In particular, I am trying to keep all of the server-side Spaw code base out of my web root and then I want to put the client libraries and resources (js, css, img files) in directories of my choosing in the web root. Has anyone already done something like that?


Hello, I'm also getting crazy with Spaw setup.

The demo works ok but, what I want is to have SPAW in one directory and use the same installation for all the sites ...

If someone has any idea or has done it, please let me know ...

Bye Simone
Back to top
View user's profile Send private message Visit poster's website
Hpatoio
Smarty Rookie


Joined: 29 Apr 2003
Posts: 25
Location: Italy

PostPosted: Thu Jun 19, 2003 9:03 am    Post subject: Finally Reply with quote

boots wrote:
I've been toying with the SPAW control (thanks for pointing it out johannes -- SPAW is pretty cool) and have implemented a Smarty custom plugin function to wrap it. It works -- in degrees -- but I am having a little bit of a problem with paths.


Hello, finally I've foud a way to have one installation of SPAW for may domains.

Anyway I can't post it here, because I have changed almost all the SPAW's files Confused ... as soon as I can I'll let you know how I did it !

Have a lucky day

Simone
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Jun 19, 2003 9:49 am    Post subject: Reply with quote

@Hpatoio: That sounds great! I started to dig into the path problems and saw that I would have to be messing with the source files, so I put it aside again to ponder. Would you be willing to post a patch or diff so that I can see where the affected areas are?

It would be nice to have the ability to simply drop-in new versions of spaw, but it sounds like that is less likely to happen Sad.
Back to top
View user's profile Send private message
Hpatoio
Smarty Rookie


Joined: 29 Apr 2003
Posts: 25
Location: Italy

PostPosted: Thu Jun 26, 2003 1:43 pm    Post subject: Finally ... Reply with quote

Hej ... ok, sorry if I've been away 4 a while ... Sad
I wanted to test my works before to spread it ... and now I think to have a stable and multi-domain version of SPAW Smile

I'm going to write to the SPAW developers to see if they want to integrate my changes in the official release ...

But anyway, if you want I can send you a ZIP file with all the files !
It's your job to understand how it works ...
documentation is not provided !!! Shocked

So if you want these files let me know how to give them to U !

Ciao ciao

Simone
Back to top
View user's profile Send private message Visit poster's website
blue
Smarty Rookie


Joined: 07 Aug 2003
Posts: 7

PostPosted: Thu Oct 16, 2003 10:18 am    Post subject: Reply with quote

do you still have the zip package???
Back to top
View user's profile Send private message
Hpatoio
Smarty Rookie


Joined: 29 Apr 2003
Posts: 25
Location: Italy

PostPosted: Thu Oct 16, 2003 10:31 am    Post subject: Reply with quote

blue wrote:
do you still have the zip package???


I'll look for it this evening ... Rolling Eyes

Did you do something like that too ?? Or ...

Ciao ...
Back to top
View user's profile Send private message Visit poster's website
blue
Smarty Rookie


Joined: 07 Aug 2003
Posts: 7

PostPosted: Thu Oct 16, 2003 10:49 am    Post subject: Reply with quote

well i'm trying too..... i was just wondering how you did it.
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Oct 16, 2003 5:50 pm    Post subject: Reply with quote

I tried both a few months ago and I heartily suggest htmlArea over SPAW. It is easier to integrate and appears to have a better licence and larger dev community. I've been very happy with htmlArea but pulled a lot of hairs out with SPAW, even after using Hpatio's customizations (thanks Hpatio). htmlArea v3 (currently beta) is also a big improvement over the v2.
Back to top
View user's profile Send private message
blue
Smarty Rookie


Joined: 07 Aug 2003
Posts: 7

PostPosted: Fri Oct 17, 2003 7:33 am    Post subject: Reply with quote

did you release it as a plugin??
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Fri Oct 17, 2003 1:46 pm    Post subject: Reply with quote

@blue: if you mean htmlArea -- check it out -- there is no need to release it as a plugin Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP