Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Pages: 1 [2] 3

Author Topic: [MOD] TinyMCE Editor  (Read 19023 times)

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
[MOD] TinyMCE Editor
« Reply #15 on: August 18, 2007, 11:27:08 AM »

Basically You can use conditions similar to those at the beginning of center() function ;)
Logged

mosh

  • Hero Member
  • *****
  • Karma: 77
  • Posts: 510
  • Awesome day :)
    • cms-zen
[MOD] TinyMCE Editor
« Reply #16 on: August 18, 2007, 01:57:29 PM »

thank you codetwist  :)

i set up small mod for loading tiny
when admin logged in
and click on add new or edit
articles,extra,page

it work like this:
in index.php in the head section add new function
Code: [Select]
<? function tiny_load() { ?>
<!-- place here your tinyMCE code  -->
 <? } ?>
in snews.php go to start of center() function on the third switch find:
delete those 4 lines
Code: [Select]
case 'admin_article': form_articles(''); return; break;
case 'article_new': form_articles('article_new'); return; break;
case 'extra_new': form_articles('extra_new'); return; break;
case 'page_new': form_articles('page_new');  return; break;
replace with this:
Code: [Select]
case 'admin_article': form_articles(''); tiny_load(); return; break; //tiny
case 'article_new': form_articles('article_new'); tiny_load(); return; break; //tiny
case 'extra_new': form_articles('extra_new'); tiny_load(); return; break; //tiny
case 'page_new': form_articles('page_new'); tiny_load(); return; break; //tiny
no more slowdown and wasted bandwidth when not using the editor  :D .


update: grrrr lol it dont work with IE, only FF, need to find why.
thanks for any help :)

aweome day to all
« Last Edit: August 25, 2007, 03:32:40 AM by Phil Martin (Philmoz) »
Logged

Alien

  • Newbie
  • *
  • Karma: 0
  • Posts: 26
Re: [MOD] TinyMCE Editor
« Reply #17 on: August 21, 2007, 04:00:34 PM »

Thanks for the mod/addon, great stuff. :)

I've added the following to my index.php page header as outlined in this thread:

Code: [Select]
<? if(strstr ($_GET[action],"admin")) { ?>
   <script language="javascript" type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
   <script language="javascript" type="text/javascript">tinyMCE.init({ mode : "textareas" });</script>
<? } ?>

- But it only shows the RTE up when editing an article; not creating a new article (article new). Is there anyway to have it for both (creating and editing)?

Thanks.  8)
Logged

mill

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: [MOD] TinyMCE Editor
« Reply #18 on: August 24, 2007, 03:30:49 AM »

Hi! I have a problem with this addon. If i have instaled it, i ca't use the pagination [break]. Can somebody helpme??
Logged

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
Re: [MOD] TinyMCE Editor
« Reply #19 on: August 24, 2007, 04:00:19 AM »

Just type [break] wherever you want it.
Logged

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
Re: [MOD] TinyMCE Editor
« Reply #20 on: August 24, 2007, 02:06:47 PM »

Hi there...

I have now some problems with this: to download a page it takes a lot of time... I dont know why before I had not this problem...
Other thing, some codes in this topic (and in others in this forum) does not appear... or it is just my browser? (FF)...
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: [MOD] TinyMCE Editor
« Reply #21 on: August 24, 2007, 03:34:36 PM »

Hi there...
1)  I have now some problems with this: to download a page it takes a lot of time... I dont know why before I had not this problem...
2)  Other thing, some codes in this topic (and in others in this forum) does not appear... or it is just my browser? (FF)...

1)  I have experienced longer loading times for pages when TinyMCE is loading in the page, and it is to be expected since more stuff is loading to create the TinyMCE interface and activate their functions. This was the main reason I took the route of modifying existing... and adding new... functions to the existing sNews Editor scripts and... while they load faster than TinyMCE... my mods take more a little more time to load than the default Editor functions because there are more of them and they use icon images instead of browser-generated buttons.

2)  Yes... you are right. We have been experiencing some problems with code not displaying properly in some of the posts on our new Forums. This is one of the un-expected glitches that usually surface when taking the database from one Forum system and converting it to run with another Forum system. Hopefully, over time, each active member will go into their own posts and correct the situation. Philmoz has suggested (elsewhere) that opening an existing post with the MODIFY function, then saving it again without making any changes, usually results in the code displaying properly again.

Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

mill

  • Newbie
  • *
  • Karma: 0
  • Posts: 11
Re: [MOD] TinyMCE Editor
« Reply #22 on: August 24, 2007, 05:55:54 PM »

Just type [break] wherever you want it.

thanks, it a simple method but works  :)
Logged

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
Re: [MOD] TinyMCE Editor
« Reply #23 on: August 25, 2007, 02:09:57 AM »

Hi there,

yeah, sure St Keyrocks, but the thing is that I prefer to use tinyMCE...

I remember somebody posted something like "download tinyMCE JS from an outside folder" and I dont find it in the forum...
I'm working with this post: http://snewscms.com/forum/index.php?topic=4548.0 (tinyMCE editor in admin), but the thing is that this is about a bouton to call the tinyMCE and I need the tinyMCE directly in the admin...

 :)
Logged

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
Re: [MOD] TinyMCE Editor
« Reply #24 on: September 03, 2007, 02:14:51 PM »

I dont find this post on, the forum, it is a very good alternative...
If dont I tryed the TinyMCE compressor, and it works fine, just go to: http://tinymce.moxiecode.com/download.php
and download compressor, then to install it is very simple, just follow: http://wiki.moxiecode.com/index.php/TinyMCE:Compressor/PHP

Anyway, if some body know this post about download tinyMCE from an outside script, I will appreciate it ;)

Thanks...
Logged

urbitasmedia

  • Newbie
  • *
  • Karma: 0
  • Posts: 32
    • http://www.urbitasmedia.com
Re: [MOD] TinyMCE Editor
« Reply #25 on: September 06, 2007, 03:20:59 AM »

One more option and the one I use is this...

Code: [Select]
<? if ($_SESSION[db('website').'Logged_In'] == token()) { ?>
   <script language="javascript" type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
   <script language="javascript" type="text/javascript">tinyMCE.init({ theme : "advanced", mode : "textareas", plugins : "insertdatetime", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_buttons1_add : "insertdate", plugin_insertdate_dateFormat : "%m %d, %Y" });</script>
<? } ?>

If you logged in then you get TinyMCE otherwise you get the standard text box.
Logged

edsil

  • Jr. Member
  • **
  • Karma: 5
  • Posts: 97
Re: [MOD] TinyMCE Editor
« Reply #26 on: September 06, 2007, 06:05:50 AM »

Hi urbitas,

Thanks for your comment, but where exactly I must paste this code?... I would like to try it...
Do I need to erase any other code?

Thanks :)
Logged

Joost

  • Guest
Re: [MOD] TinyMCE Editor
« Reply #27 on: September 06, 2007, 06:46:37 AM »

Looks like it is going into the header of index.php.
Logged

ens

  • Sr. Member
  • ****
  • Karma: 12
  • Posts: 279
    • http://www.meatysite.info
Re: [MOD] TinyMCE Editor
« Reply #28 on: September 25, 2007, 01:30:55 PM »

The first block of code in my first post, you paste into the HEAD of your index.php file.

The second part (with all of the html_input's) must be removed from your snews.php file.

The file you downloaded must be uploaded somewhere on your server, and referred to appropriately in the code that goes into your HEAD.
Logged

atomkarinca

  • Guest
Re: [MOD] TinyMCE Editor
« Reply #29 on: September 29, 2007, 01:40:57 PM »

thanks,
Logged
Pages: 1 [2] 3