Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: [MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)  (Read 23949 times)

mattonik

  • Full Member
  • ***
  • Karma: 7
  • Posts: 123
    • http://www.mattonik.sk
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #30 on: March 11, 2007, 07:05:58 PM »

@keyrocks: thanks for info. i just wanted to try it because i find tinymc and fck slow and big and wanted to try something new
Logged

reanimator

  • Newbie
  • *
  • Karma: 0
  • Posts: 31
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #32 on: March 12, 2007, 02:09:52 AM »

A few sNews members have made use of HTMLArea in the past... with sNews 1.4 I think. I have no experience with it. Wyzz looks rather interesting as well. I had a look at the installation instructions... just briefly... and it appears to be fairly easy to install with sNews. Why not give it a try? :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Armen

  • Sr. Member
  • ****
  • Karma: 41
  • Posts: 338
    • http://www.funnydays.ru
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #33 on: March 12, 2007, 07:01:53 AM »

I've set up TinyMCE (great one, btw, trylly cross-browser one) and placed link to it inside sNews Admin. So I can use it (rarely) or write articles as usual (more often, because I've JS-automated some functions) without any speed penalities.

And TinyMCE is quite heavy to load it every time someone starts NEW_ARTICLE. I don't think it's rational.
Logged
Now ogres, oh, they're much worse. They'll make a suit from your freshly peeled skin. They'll shave your liver, squeeze the jelly from your eyes... Actually, it's quite good on toast.

Lars Persson

  • Newbie
  • *
  • Karma: 0
  • Posts: 13
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #34 on: March 12, 2007, 02:56:07 PM »

I downloaded Wyss editor after browsing their site for a little while. read the instructions and then opened snews.php in notepad++  

Sorry keyrocks, but its not a walk in the park for me, to install it in sNews  :)  I havent got a clue on where to begin. searched for instances of "textarea" and found a few...

If someone here have tried, or is using wyss editor please advice how to install it.

Lars
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #35 on: March 12, 2007, 05:34:34 PM »

OK. I downloaded Wyzz again and installed it on one of my localhost test sites. I was not impressed with the results - it is not compatible with sNews - but installation is pretty simple... at least for testing purposes. Remember, if you try this... you do so on your own and I have no interest in figuring why it isn't compatible with sNews.

1. Download the ZIP from the link at the bottom of this page to somewhere convenient on your hard drive... likely into a new folder called Wyzz-Editor.

2. Un-zip the ZIP file into the same location.

3. Copy the two image folders - wyzzicons and wyzzstyles - and the wyzz.js file into the root of your site (the folder all your sNews files is in).

4. Insert the following string just above the closing </head> tag in your index.php file... this string connects with the wyzz.js file so that it will be available to work when called upon:
Code: [Select]
<script language="JavaScript" type="text/javascript" src="wyzz.js"></script>5. Now... you need to replace the standard textarea that displays in your Articles Admin Panel... with the script that displays the Wyzz Editor textarea. It's located within the center function in snews.php. So... in snews.php, search for this string:
Code: [Select]
case 'textarea': $output = '<p>'.$lbl.':
<textarea name="'.$name.'" rows="'.$rows.'"cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea></p>'; break;
Comment it out (for testing purposes) by adding a pair of forward slashes to the front of it - //. Then... above it... copy in the following (to take its place for testing purposes):
Code: [Select]
case 'textarea':
$output = '<textarea name="textfield" id="textfield" rows="10" cols="40"></textarea>
<script language="javascript1.2">
make_wyzz(\'textfield\'); </script>';
break;
The next time you log into your Admin Panel and choose to create a New Article, the Wyzz Editor will replace the sNews textarea.

PROBLEMS NOTED DURING INITIAL TESTING
1. Slow Loading - The Admin panel takes a long time to appear - I consider 5 to 7 seconds on my localhost server a very long time... (but my machine is only running an 866Mhz cpu).
2. Choosing a Font redirects to Home Page - Several of the functions appear to work fine as you add text into the textarea, such as bolding, underlining, strike-through, inserting a link, inserting an image, changing text alignment, etc. But... If you click the "FONT" icon and choose a different font from the drop-down, you are re-directed back to the sNews Home Page. This is no good... and I don't know why it happens.
3. Formatting is not compatible with the sNews System - When you click to submit or save your article... after composing it... all that displays is the article title - absolutely no content at all. I would suspect that the formatting tags used by Wyzz are being stripped out by the sNews Security function(s) as no article text is being saved in the articles table in the database. This is no good either.

FINAL SYNOPSIS: (edited) My last note here suggested Wyzz was not compatible with sNews. I take that back. To be honest... I didn't spend any time looking for solutions to the problems I encountered (mainly cause I am not interested in using it). Bram's changes noted below appears to clear them up. :)
« Last Edit: May 05, 2008, 10:52:37 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #36 on: March 12, 2007, 06:45:16 PM »

Quote from: Keyrocks
3. Formatting is not compatible with the sNews System - When you click to submit or save your article... after composing it... all that displays is the article title - absolutely no content at all. I would suspect that the formatting tags used by Wyzz are being stripped out by the sNews Security function(s) as no article text is being saved in the articles table in the database. This is no good either.
Keys, in your code you're get an error. And this editor, yes, it's compatible with sNews.
Try to using this line instead of yours:
Quote
case 'textarea': $output = '<textarea name="'.$name.'" id="'.$name.'" rows="'.$rows.'" cols="'.$cols.'"'.$attribs.'>'.$value.'</textarea>
<script language="javascript1.2">make_wyzz("'.$name.'"); </script>'; break;
About the redirection when you're chosen another font type... I don't know why... I need to check that... And for the slow loading... tested into my local server, the load time is about 2 seconds... not bad for my opinion.
And, thanks to test it onto your server Keys!  ;)

[Edited] To fix the change font type, color picker and all the others things that not working and get page redirection, you need to modify inside the wyzz.js script file all calls (only 4 lines) to <a href="#" to :
Quote
<a href="' + location.href + '#"
« Last Edit: May 05, 2008, 10:52:59 PM by Keyrocks »
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

bramsyuur

  • Hero Member
  • *****
  • Karma: 23
  • Posts: 873
    • http://snews.vietbee.net
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #37 on: March 12, 2007, 09:11:25 PM »

I've edited my last post with an a correction fix.
Keys, maybe you can create (only if you want and have time) a new mod addition under mods section with your article post and these fixes... maybe some people can try to use this tiny editor with sNews. I think that is really fast and easy to be implemented for using it.
Logged
La comunidad sNews en tu idioma!
Comunidad sNews en Espaņol

solo

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #38 on: March 12, 2007, 11:41:10 PM »

For Firefox users only : "Xinha Here! is a Firefox extension wrapper for the Xinha HTML editor. It enables WYSIWYG editing in any textarea and text box on any website. "
http://www.hypercubed.com/projects/firefox/
Logged

reanimator

  • Newbie
  • *
  • Karma: 0
  • Posts: 31
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #39 on: March 12, 2007, 11:56:01 PM »

Thanks bramsyuur!
works very well.

I have also commented out the following as they don't work anymore:              

       
Quote
//html_input('button', 'strong', '', 'B', '', 'button', 'onclick="tag(\'strong\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'em', '', 'I', '', 'button', 'onclick="tag(\'em\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'strike', '', 'Strike', '', 'button', 'onclick="tag(\'strike\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'p', '', 'P', '', 'button', 'onclick="tag(\'p\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'br', '', 'BR', '', 'button', 'onclick="tag(\'br\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'break', '', 'Break', '', 'button', 'onclick="tag(\'break\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'img', '', 'Image', '', 'button', 'onclick="tag(\'img\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'link', '', 'Link', '', 'button', 'onclick="tag(\'link\')"', '', '', '', '', '', '', '', '');
   //html_input('button', 'include', '', 'Include', '', 'button', 'onclick="tag(\'include\')"', '', '', '', '', '', '', '', '');
I only miss the [break] button but it aint a big deal.
thanks again!
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #40 on: March 13, 2007, 02:37:23 AM »

Quote from: bramsyuur
I've edited my last post with an a correction fix.
Keys, maybe you can create (only if you want and have time) a new mod addition under mods section with your article post and these fixes... maybe some people can try to use this tiny editor with sNews. I think that is really fast and easy to be implemented for using it.
Will do Bram. Thanks for spending some time on the small bugs I encountered. I had no time to look into them today - had to head out to a couple of meetings. Runs like a charm now, tho it still takes 5 seconds to load on my machine (an old 866Mhz cpu).
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Nicu Alecu

  • Full Member
  • ***
  • Karma: 12
  • Posts: 224
    • BLUEBYTE.ro // IT consultant
Re: [MOD] Toogle button: Simple Editor / TinyMCE Editor (sNews 1.5)
« Reply #41 on: May 05, 2008, 11:05:51 AM »

wow, great mods, byt can i ask, if there is somebody who knows how to implement this one: http://www.spaweditor.com/en/disp.php/en_products/en_spaw/en_spaw_intro
any help is welcome. thanks:)
I know it's been well over one year since mattonik asked about a successful implementation of SpawEditor, but during this time it looks like it has evolved into a really nice editor.
What I like about it is the near perfect file/upload manager and a nice interface. I know about the slowness of loading when adding a new article, all wysiwyg editors are bound to be slow under the circumstances, but it seems TinyMCE (which is my favorite so far when it comes to offering one wysiwyg flavor or another to enduser clients) has no file manager (well, it does, in a commercial version) and 3rd party plugins don't work well enough (or maybe I can't make them work :().
So, my question is: can anyone help with some step-by-step guide for the new Spaw version for a total noob on this matter?
Logged
Pages: 1 2 [3]