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.phphttp://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