A place for users and developers of the Xataface to discuss and receive support.
by amwassil » Tue Apr 18, 2006 10:54 pm
Part of the project I'm involved with is more than likely going to involve copy/pasting ascii report printouts into the htmlarea "detail description" field. I have discovered that FCKEditor doesn't deal with this copy/paste item very well. I have tested TinyMCE and it deals with it perfectly. So I am now trying to get TinyMCE to be the editor du jour.
I installed TinyMCE in dataface/lib, then I modified the following two files:
1. dataface/config.inc.php thus:
// if ( !defined('DATAFACE_FCKEDITOR_BASEPATH') ){ // Webserver path to the FCKEditor installation for use with Dataface // define('DATAFACE_FCKEDITOR_BASEPATH', DATAFACE_URL.'/lib/FCKeditor/'); // $GLOBALS['HTML_QuickForm_htmlarea']['FCKeditor_BasePath'] = DATAFACE_FCKEDITOR_BASEPATH; //}
if ( !defined('DATAFACE_TINYMCE_BASEPATH') ){ // Webserver path to the TinyMCEditor installation for use with Dataface define('DATAFACE_TINYMCE_BASEPATH', DATAFACE_URL.'/lib/tinymce/'); $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] = DATAFACE_TINYMCE_BASEPATH; }
2. dataface/HTML/QuickForm/htmlarea.php thus:
require_once 'HTML/QuickForm/textarea.php'; require_once 'tinymce/jscripts/tiny_mce/tinymce.php';
$GLOBALS['HTML_QuickForm_htmlarea'] = array( 'tinymce_BasePath' => ( isset($GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath']) ? $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath'] : './lib/tinymce'));
... function toHtml() { if ($this->_flagFrozen) { return $this->getFrozenHtml(); } else { $editor = new tinymce($this->getName()); $editor->BasePath = $GLOBALS['HTML_QuickForm_htmlarea']['tinymce_BasePath']; $editor->Value = $this->_value; $editor->Width = '100%'; $editor->Height = '480'; ob_start(); $editor->Create(); $html = ob_get_contents(); ob_end_clean(); return $html; } } //end func toHtml
I'm getting the following error upon attempting to load Dataface:
Fatal error: Cannot instantiate non-existent class: tinymce in /home/iponlyno/public_html/dataface/HTML/QuickForm/htmlarea.php on line 49
line 49 is: $editor = new tinymce($this->getName());
Have I missed a file somewhere referencing $editor? Should I just capitalize every instance of "tinyMCE"? When I view the source of the page with the error, I can see all the TinyMCE initialization and some calendar.js stuff the Dataface loads. Then the error message. So everything looks good up to line 49 above. I would really appreciate any input you might have for me. Thanks.
Michael Wassil
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Apr 19, 2006 4:56 am
Hi Michael,
This is a change that I would be very much interested in for the distribution. FCKEeditor has some bugs with Firefox on Mac. I just haven't gotten around to adding this. i.e., i'll be interested in hearing your results.
Upon downloading TinyMCE Editor, it doesn't appear to come with any PHP files. This would be why you are getting the non-existent class error (unless you found some PHP files somewhere else). It looks like all integration is done at Javascript level. So far their examples only show how to change all text areas on a page into TinyMCEEditors, but I'm sure that when I dig a little more I'll find out how to specify only specific fields.
I'll look into this today and get back to you.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by amwassil » Wed Apr 19, 2006 9:45 am
I appreciate your efforts. Based on: require_once 'tinymce/jscripts/tiny_mce/tinymce.php'; I recognized the need for a .php file so I created one for the occasion. You can look at it here (the php is near the bottom): http://67.15.157.8/~iponlyno/tinymce.txtIt seems to be working because as the Dataface page attempts to load and generates the error at line 49 of htmlarea.php, when I view the source I can see that the tinymce init stuff has been loaded into the page, which is where it needs to be. Michael
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Apr 19, 2006 12:18 pm
Hi Michael,
I couldn't resist trying out TinyMCE editor, so I put together a little add-on that makes TinyMCE editor the default editor. Check out the Products section to download this addon. If it appears to be working ok, then maybe I'll include it in the main distribution in future releases of Dataface.
Unfortunately it contains the same bug (back button doesn't work when editor is showing) with Firefox on Mac that FCKEditor does (it's actually a firefox bug and not the other way around), so I can't really see an advantage one way or the other.
Let me know how it works.
Best regards
Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by amwassil » Wed Apr 19, 2006 3:22 pm
I removed my previous installation and installed your version, swapped the 3 files and modified my fields.ini. The editor now works! but it's not loading all the init stuff that I'm specifying. Maybe I didn't understand your instructions for the fields.ini file. For the basic editing stuff, however, it's functional. The big things that're missing, in addition to my specific stuff, are the FONT and FONT SIZE selectors. Without those, it's pretty limited. You can see a comparison of the init of a "stand-alone" TinyMCE installation that we were using for testing purposes for the past couple of weeks and what shows up in Dataface. The "stand-alone" editor works very nicely. I included my fields.ini entry so you can check what mistakes I've made there. Thanks. http://67.15.157.8/~iponlyno/tinymce_init.txtMichael
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Apr 19, 2006 3:32 pm
A couple of things:
1. The mode = textareas should be omitted when using Dataface because it already takes care of the mode. 2. It is possible that I missed some of the editor options. If you look at the htmlarea.php file, close to the top there is an array of names of options. These are the options that will be passed through. If I missed a few, you can just add their names to that array, then they should work.
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by amwassil » Wed Apr 19, 2006 11:40 pm
NOW I am a REALLY happy camper! I added the missing editor options to htmlarea.php, cleaned up my fields.ini file where I saw some duplications and I am very pleased to report that TinyMCE is working very nicely, much better than FCKEditor. One of the biggest things about the current project is being able to paste blocks of preformatted ascii text and TinyMCE handles that far and away better than FCKEditor. I've been in continuous communication with the head of the company I've been doing this for (everyone works from home) and he has been very favorably impressed with what he's seen in Dataface and your willingness to step up to help out so much on very short notice. The company has been looking a very long time for a database management tool to replace a flat database component of WPOffice that they have been using for many years. They will probably implement Dataface in a number of internal procedures as well as several other internet projects in the future. With the addition of TinyMCE as the editor, the Dataface component is now fully meeting the project requirements. I'm still working on the appearance of the front end, but the desired functionality is all there with the exception of a couple of loose ends. Today we finalized arrangements to host the current project at Stargate in Burnaby. They will probably be installing the software tomorrow or Friday. They have also expressed an interest in the software, which is one of the reasons they agreed to host it for us. So within a week or 10 days we will have a functioning website. It will take a while longer to populate the database, but with the user-friendly Dataface functionality the authors will be able to progress quickly. As soon as I can I will foward the URL to you and let you know when you can take a look. In case you haven't read my last post in the "what about the front end" thread, I'm located in North Vancouver. The company I'm working with, which is a software developer, is located in Vancouver. The head of the company, who is a very experienced programmer, has been very impressed with how quickly we've been able to put together a php/mySQL solution and has expressed a desire to meet you. I am also very appreciative of the help you have given me on this project. I'm still a php/mySQL tyro, but a week ago I was a blank slate. If you'd like to go for a brew or two at your favorite pub sometime, I'd be very pleased to treat. It would be a good opportunity for you to make some contacts as well. You can email me at: michael@telenexet.com
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Thu Apr 20, 2006 9:11 am
Hi Michael,
I'm glad to hear that everything is working for you. I appreciate your initiative in getting TinyMCE working. I'll be playing with it on my end a little bit, but one huge advantage that I can see already is that it has a much smaller distribution (FCKEditor is about 8 megs uncompressed vs about 2 megs for TinyMCE).
I just might take you up on that beer, and I'm always interested in talking to other guys from the industry to see what they are up to.
Best regards
Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by amwassil » Thu Apr 27, 2006 12:08 am
>>Posted by amwassil at Wednesday 18:18 >>Here's a site which has a directory of 85 wysiwyg editors, FYI: >> http://www.htmlarea.com/directory/Web_Software_Components/index.html>>Robert I DID NOT post a message at 18:18! Who's "Robert"? How did he post a message with my user name? What, if any, security is happening on this board? He could've grabbed my photo from any of my posts. But does this board allow multiple users with the same user name? This incident doesn't seem malicious, but I'm more than slightly upset that someone was able to post under my user name and even get my photo in there. Maybe he hacked my password. I just changed it. Maybe he hacked the database. Something stinks about this. Michael Wassil
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
by njw » Thu Apr 27, 2006 2:32 am
From my own experience, if you don't explicitly log in to the forum it seems to use the last person who logged in or in some instances, zopemgr.
Bit of a bug somewhere rather than anything suspicious or malicious.
Neil
-
njw
-
- Posts: 280
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Thu Apr 27, 2006 8:23 am
I concur with this analysis. It has happened on multiple occasions that people have posted things and they showed up under my name.
There are a number of things that I don't like about this board, but it is currently the best/only board available for plone right now. I am watching closely for updates to fix some of these issues.
I suppose one solution would be to force people to log in for them to post... In fact that is what I am going to do now.. From now on people will have to log in to post because of this anomalous behavior.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by Robert » Thu Apr 27, 2006 6:43 pm
Am I banned for life, or just the weekend? Neil's got it - somehow my posting got signed by amwassil! Many apologies My only intent was to show, to my surprise, how many wysiwyg editors there are on the market - 85 listed on one site. Not to question Michael's or Steve's preferences. Hopefully there's some differentiation among them, so some are particularly strong in certain applications. Not a password or database hacker... Robert I am welcome back?
-
Robert
-
- Posts: 2
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Thu Apr 27, 2006 8:43 pm
Hi Robert,
Clearly there were no bad intentions. It is just a buggy forum product. I removed the post only because it had Michael's name on it and I was unable to change that info. The site looked good though, if you can repost it that would be great!
Sorry for all the mishaps... i think that making login mandatory will fix this issue.
-Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by amwassil » Thu Apr 27, 2006 10:58 pm
Thanks Neil and Steve for clearing this up for me. Also, thanks Robert for highlighting a serious issue with the forum software.
Michael Wassil
-
amwassil
-
- Posts: 30
- Joined: Wed Dec 31, 1969 5:00 pm
Return to Xataface Users
Who is online
Users browsing this forum: No registered users and 29 guests
|