Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: TinyMCE + image management (iBrowser)  (Read 14028 times)

ramppi

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
TinyMCE + image management (iBrowser)
« on: September 30, 2007, 09:31:21 AM »

EDIT 6th10 2007: After posting this I've been 'studing'. If You like to migrate 3rd party text editor and image uploading funcs I suggest rather FCKEditor than combination mentioned below. Please read thread
http://snewscms.com/forum/index.php?topic=6046.0
--------------
Long time visiting sNews Folks. Great to see the strenght, simplicity & power in SNews running moreandmore strong. And Community is full of life&energy too.

some may find image management (me) useful too - so to the thing (again).

Migrating TinyMCE text editor like 'ens' has (http://snewscms.com/forum/index.php?topic=4806.0) tipped here - now together with iBrowser image management functionality.

Download +expand the latest versions (date posted: TinyMCE 2.1.2 / iBrowser 1.3.2 (is 1.3.6)
http://tinymce.moxiecode.com/download.php
http://www.j-cons.com/main.php > iBrowser (in changelog 20.8.2006 - seems bit passive)

Put 'tiny_mce' folder (in 'tinymce/jscripts/') in same location where your sNews is

Put 'ibrowser' folder in 'tiny_mce/plugins/' folder
- chmod 'ibrowser/temp' and 'ibrowser/scripts/phpThumb' folders 0775 or 0777 (in my server 0777 to have full functionality)

iBrowser complete
- in 'ibrowser/interface' folder you find:
tinyMCE 2.05_editor_plugin_src.js
tinyMCE 2.05_editor_plugin.js

remove prefix tinyMCE 2.05_ and move/copy them to 'ibrowser' folder - like:
tiny_mce/plugins/ibrowser/editor_plugin_src.js
tiny_mce/plugins/ibrowser/editor_plugin.js

create/name the folder(s) where you (will) keep/upload images chmod 0777, example 'myphotos'. You can add/rename etc later.

in 'ibrowser/config/config.inc.php' ~line 98 point the path from 'root dir' to your gallery and name it(line 99) (Example):

======================
// use static image libraries   
$cfg['ilibs'] = array (
array (   
'value'   => '/snews/myphotos/',   /////<= here your pics locate in: 'http://yourdomain.com/snews/myphotos/'      
'text'    => 'My Gallery 1',      /////<= free to name what you like
======================

add several galleries if you like in same way (chmod 0777) (look bottom *) 2)

TinyMCE time now
Like 'ens' (and 'urbitasmedia' - only logged in function) told, in your index.php between <head> </head> tags place this (made it bit advanced - look bottom *) 1)

index.php ADD

======================
<? 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 : "table,advlink,spellerpages,paste,fullscreen,ibrowser,insertdatetime",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_buttons1: "bold,italic,outdent,indent,hr,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,formatselect,link,unlink,ibrowser,fullscreen,code",
theme_advanced_buttons2: "undo,redo,cleanup, removeformat,tablecontrols,spellerpages,pastetext,pasteword,insertdate,inserttime",
theme_advanced_buttons3: "",
plugin_insertdate_dateFormat : "%d.%m.%Y",
theme_advanced_disable : "anchor, help, sub",
convert_urls : false
});</script>
<? } ?>
======================

Then in sNews we remowe the buttons from textarea, find ~lines 1313-1321

snews.php REMOVE (shortened)

======================
echo html_input('button', 'str .... '');
echo html_input('button', 'em' .... '');
echo html_input('button', 'str .... '');
echo html_input('button', 'p', ....'');
echo html_input('button', 'br' ....'');
echo html_input('button', 'bre ....'');
echo html_input('button', 'img' ....'');
echo html_input('button', 'lin ....'');
echo html_input('button', 'inc ....'');
======================

Now TinyMCE editor with iBrowser (button) shows & is running when you are logged in.

bottom *) 1
Made this advanced to show that you can mod TimyMCE options and look as you like. In 'tiny_mce/plugins/' you find the possibilities - iBrowser is now the new one. In index.php javascript you call the plugins you like and call the buttons for plugins too. theme_advanced_buttons1 (& 2 & 3) are the lines in your editor's design. Because only logged wievers had this expanded editor function, it doesn't slow your site loading.
For ex 'fullscreen' option is useful if design'in large layout, among many other.
Keep your styling simple, minimal, in line choosen. Looks more peaceful and site loads faster.

bottom *) 2
in 'ibrowser/config/config.inc.php' very beginning You can choose variable of options to resize pics showing when uploading. Uncomment/comment/create for your needs it is documented there...
* -symbol keeps size likeit is. Its useful to have some predefind sizes - you can freely scale pictures in tinyMce editor although.

kind reg: matti
« Last Edit: October 06, 2007, 08:25:20 AM by ramppi »
Logged

pwendel

  • Full Member
  • ***
  • Karma: 8
  • Posts: 106
    • sNews 1.6 in Danish
Re: TinyMCE + image management (iBrowser)
« Reply #1 on: September 30, 2007, 09:43:41 AM »

I kinda like the idea to have an extra layer in the integration like you did here...definately worth looking into for TinyMCE'ers. It is abit concerning that it doesnt seem all to active, the iBrowser script, but its not exactly promoted as a beta either so I suppose it should work ok.

Karma for you ;)
Logged
"Opportunity is missed by alot of people because it comes dressed in blue overalls and looks like hard work" -- Thomas Edison (1847-1931)

ramppi

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
Re: TinyMCE + image management (iBrowser)
« Reply #2 on: September 30, 2007, 11:10:21 AM »

Thanks pwendel, but I'm not worth of karma thing - just begged stealed borrowed. iBrowser job was done with 1.4 already. Still working anyways.

up five for You
Logged

ramppi

  • Newbie
  • *
  • Karma: 0
  • Posts: 15
Re: TinyMCE + image management (iBrowser)
« Reply #3 on: October 06, 2007, 08:26:05 AM »

After starting this thread I've been 'studing'. If You like to migrate 3rd party text editor and image uploading funcs I suggest rather FCKEditor than combination mentioned below. Please read thread
http://snewscms.com/forum/index.php?topic=6046.0
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: TinyMCE image management iBrowser
« Reply #4 on: July 01, 2010, 02:43:54 AM »

Hi,

I have a problem with the ibrowser pluggin...

Have you looked at the TinyMCE Plugins Page - or at the TinyMCE Forums for help? That would be the best place to get some help. We don't offers support for third-party applications.  ;)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU