4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: BartAfterDark on February 19, 2007, 08:20:33 PM

Title: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 19, 2007, 08:20:33 PM
What it is:
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other Content Management Systems.

This small mod is mostly for people who installed the news mod.

1. Download TinyMCE 2.1.0 and TinyMCE compressor PHP from http://tinymce.moxiecode.com

2. Extract tinymce_2_1_0 and tinymce_compressor_php_1_1_0. Move the files from tinymce_compressor_php_1_1_0 to the tiny_mce folder.

3. Upload the tiny_mce to your website.

4. Backup admin/admin_functions.php

5. Open admin_functions.php and
Find:
Code: [Select]
    <script type="text/javascript" language="javascript" src="<?php echo ROOT_PATH?>admin/browserSniffer.js"></script>
    <script type="text/javascript" language="javascript" src="<?php echo ROOT_PATH?>admin/calendar.js"></script>
Add before:
Code: [Select]
<script type="text/javascript" src="../tiny_mce/tiny_mce_gzip.js"></script>
<script type="text/javascript">
tinyMCE_GZ.init({
plugins : 'inlinepopups,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras',
themes : 'advanced',
languages : 'en',
disk_cache : true,
debug : false
});
</script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
plugins : "inlinepopups,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,|,visualchars,nonbreaking",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_path_location : "bottom",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]"
});
</script>

It still needs some tweaking with the buttons and so. This version uses GZip (should load faster)
One other small problem is that Keywords/Description (under add/edit images) also some of the text area boxes are smaller then usual when TinyMCE is used.

I've posted a screenshot so you guys can see what's all about.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: mantra on February 20, 2007, 01:50:53 AM
this editor also good,,, is simple http://www.solmetra.com/en/disp.php/en_products/en_spaw/en_spaw_intro... i use it on my news editor
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: CeJay on February 20, 2007, 07:17:18 AM
thanks to you both!
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Loda on February 20, 2007, 02:31:09 PM
thank you very much..
one problem: if i edit the comments, the comment field is very small...
look at the sreenshoot please:

Edit:
i solve this problem...
i have to klick on the fullscreenbutton...
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 20, 2007, 04:49:07 PM
Loda, this is when you are editing the comments or?

I'll post the fix later on, because you can change the witdh and high of the text area in one of the php files :)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 20, 2007, 05:20:49 PM
Okay I got it.

Open: admin_global.php
Find:
Code: [Select]
else {
  $textinput_size = "30";
  $textinput_size2 = "17";
  $textarea_size = "28";
}
Replace with:
Code: [Select]
else {
  $textinput_size = "30";
  $textinput_size2 = "17";
  $textarea_size = "120";
}

Open: admin_functions.php
Find:
Code: [Select]
function show_textarea_row($title, $name, $value = "", $cols = "", $rows = 10) {Replace with:
Code: [Select]
function show_textarea_row($title, $name, $value = "", $cols = "", $rows = 30) {
As you can see. 28 is being replaced with 120 (this is the width)
And 10 is replaced by 30 (this is the high) You can always change them to whatever number you want. These settings apply to almost all text boxes in the admin panel (comments, add/edit images/category, etc.)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Loda on February 20, 2007, 05:30:55 PM
yepp...
thank you very much!
that's it!
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: om6acw on February 21, 2007, 04:53:51 AM
Thanks BartAfterDark,
works great  :thumbup:
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 22, 2007, 12:15:58 AM
Hi,

is it working with 4images Version 1.7.1?

Where do i have to put in exactly the new code of the admin_functions.php?

I guess above that line? Am i right?
Code: [Select]
    <script language="JavaScript">
    <!--
    var statusWin, toppos, leftpos;
    toppos = (screen.height - 401)/2;
    leftpos = (screen.width - 401)/2;
    function showProgress() {
      statusWin = window.open('<?php echo $site_sess->url("progress.php"); ?>','Status','height=150,width=350,top='+toppos+',left='+leftpos+',location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes');
      statusWin.focus();
    }
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 22, 2007, 01:57:09 PM
You can try and add it before the javascript you posted :) (it should work)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 22, 2007, 02:01:14 PM
 :(
No. it does not work.
Perhaps i have the wrong path to the script?

Any other idea?

Where i have to put the tiny folder? Does it matter? I put it in the root.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 22, 2007, 02:14:33 PM
I think you forgot to add the Gzip feature :)

Copy tiny_mce_gzip.js and tiny_mce_gzip.php tot he tiny_mce folder. Do you have the tiny_mce in your root folder or is it inside 4images like this (www/4images/tiny_mce) ?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 22, 2007, 02:27:29 PM
(www/4images/tiny_mce) ?

I have it in the 4images folder.  (www.industrie-gravuren.de/galerie....)
Yes, i did copy the files to the destination folder.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 22, 2007, 02:29:08 PM
try and change this
Code: [Select]
<script type="text/javascript" src="../tiny_mce/tiny_mce_gzip.js"></script>to
Code: [Select]
<script type="text/javascript" src="/galerie/tiny_mce/tiny_mce_gzip.js"></script>
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 23, 2007, 12:22:22 AM
 :D Thank you BartAfterDark for this great modification. That rocks!!!

I made mistake and uploaded all extracted files of the download.
I changed it now and only uploaded the tiny_mce folder with compression files.
Also changed the path to it and now it seems to be working.

But i have one more question or problem.

I use the MOD Quick image edit (don`t remember the name of it)...
so there are a lot of textareas and it took a lot of time to load these.

Is there a possibiltiy to use tiny_mce only for some textareas ( for example only for adding news) :?:

I found myself a topic in the tiny forum, there is posted a MOD for switching tiny_mce on or off for the textareas.
http://tinymce.moxiecode.com/punbb/viewtopic.php?id=436 (http://tinymce.moxiecode.com/punbb/viewtopic.php?id=436)

But i don`t really know how to insert this code exactly  :oops:

Would be great if someone could help me to solve this.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 23, 2007, 12:35:01 AM
I'm going to look into it tomorrow :)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 25, 2007, 12:36:34 AM
I'm going to look into it tomorrow :)
@bartafterdark

Do you already find a soultion for toggling on/off the tiny_mce for only some textareas :?:
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 25, 2007, 02:58:14 PM
In admin_functions.php
find:
Code: [Select]
mode : "textareas",
theme : "advanced",
Replace with:
Code: [Select]
mode : "exact",
theme : "advanced",
elements : "news_text",

Now it will only show for the news :-)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on February 27, 2007, 06:29:30 PM
GREAT!  :D

And if I also want to add TinyMCE for the description textarea of for example the news and categories or unique areas?
How to code that?
I think something like that
Code: [Select]
elements : "news_text", "???"  But where i find the name of the textareas?

Thanks @bartafterdark
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on February 28, 2007, 08:29:47 PM
it's easist if you are useing firefox

But the Image description box is image_description_1
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: bibabobu on March 06, 2007, 02:07:23 AM
 :oops: sorry i think i am too stupid.

I like to have the TinyMCE in the news_text and also in the category description.

How i have to code this?

 :?:
Code: [Select]
elements : "news_text", "cat_description" 
If i try that nothing appears. Is the position of the comma wrong or something else?

Please do you have me one more advice. Thanks.

EDIT:  Problem solved by myself. It has to be: 
Code: [Select]
elements : "news_text,cat_description", 
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: BartAfterDark on March 11, 2007, 09:21:29 PM
sorry about the late reply. Nice to see you got it working ;)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: www.katzen.ag on October 15, 2007, 06:23:00 PM
Ein interessanter Mod. Aber für welches der Newssyteme ist dieser Mod konzipiert?
Gibt ja drei...

Grüße
KatzenAG
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: mathuatden on October 17, 2007, 04:37:16 AM
I add this mod but it is not work
I was upload tiny_mce folder( i was Extract tinymce_2_1_0 and tinymce_compressor_php_1_1_0. Move the files from tinymce_compressor_php_1_1_0 to the tiny_mce folder) to root server and this is  my admin_functions.php
http://worldoflady.com/admin_functions.rar
Help me
I need this mod very much
Thank
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: thunderstrike on October 17, 2007, 04:42:02 AM
And what is to see in admin_functions ?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: mathuatden on October 17, 2007, 05:31:27 AM
In admin_fuctions I see unchanged
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: thunderstrike on October 17, 2007, 01:03:15 PM
If you see unchanged ... why post admin_functions if nothing wrong ?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: www.katzen.ag on October 17, 2007, 08:04:06 PM
Hello everybody!

It's an intressting Mod but for which News MOD?
I mean, in this forum I found three News MOD 8O

Thanks
 
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: thunderstrike on October 17, 2007, 08:11:01 PM
Take RSS Feeds MOD. ;)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: mathuatden on October 18, 2007, 03:23:13 PM
Send me admin_fuction.php which was hackthis mod,plz
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mr_LovaLove on October 21, 2007, 09:30:33 PM
not working at all

 i tried to put it at this path

www.alwasmy.net/tiny_mce not work 
also tried this

www.alwasmy.net/pix/tiny_mce  not work

also i found that tiny_mce folder is in : tinymce_2_1_2\tinymce\jscripts\tiny_mce

is this the right folder ??????????????????


i went to add new at my ACP i cannot see any changes :(
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: thunderstrike on October 21, 2007, 09:54:09 PM
Quote
www.alwasmy.net/tiny_mce not work
also tried this

www.alwasmy.net/pix/tiny_mce  not work

Sigh - you know the rule Lovalove for get reply. Two not work. Please read step 6 in my signature.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mr_LovaLove on October 22, 2007, 02:00:56 PM
@thunder lOol ! 

the problem is that its not saying anything !!

i just add the files to my root and add the code to the admin_functions.php

and when i go to the ACP and click on add news

it open normal

but there is javascript error says:

Line : 52
Char: 2
Error: Syntax error
Code: 0
URL: http:\\www.XXXXX.net\xx\admin\news.php?action=addnews


so  where is line 52 ???? if that help
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: thunderstrike on October 22, 2007, 08:42:04 PM
Quote
1. Download TinyMCE 2.1.0 and TinyMCE compressor PHP from http://tinymce.moxiecode.com

You do this too ?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mr_LovaLove on October 23, 2007, 11:50:02 AM

Quote
1. Download TinyMCE 2.1.0 and TinyMCE compressor PHP from http://tinymce.moxiecode.com


You do this too ?

 i downloaded this: Zip compressed file:    tinymce_2_1_2.zip  and TinyMCE compressor PHP     v1.1.0     zip 


i didnt find 2_1_0 ??



Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 07, 2007, 04:25:59 AM
OK.... For some reason the compressor isn't working with the new version...

If you point directly to tiny_mce.js it should work fine.

ex... I'm using only the simple version...

Quote
<script type="text/javascript" src="../tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
   tinyMCE.init({
      mode : "textareas",
      theme : "simple"
   });
</script>
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mte90 on November 20, 2007, 10:08:35 PM
i didn't found the mod news for running this mod in the forum. You can give to me the link Please?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 20, 2007, 11:48:52 PM
You don't need a news mod to run TinyMCE. 
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mte90 on November 21, 2007, 04:52:32 PM
excuse I have misinterpreted but this?
Quote
This small mod is mostly for people who installed the news mod.
the mod written here what is?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 21, 2007, 05:04:23 PM
http://tinymce.moxiecode.com/
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mte90 on November 21, 2007, 05:23:15 PM
I have understood that it is based on tinymce but the mod news that it can have this editor what is?
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 21, 2007, 05:43:30 PM
it affects the description box for categories and images (it looks for any form text area on the page)... so you don't need a news mod installed... but if you install any of them then TinyMCE will work for them too.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 21, 2007, 05:45:04 PM
search for news mod on the forum. I'm sure there's a couple. I never used one... I just use tinyMCE to edit my descriptions.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mte90 on November 22, 2007, 04:47:09 PM
Thanks for the help!
i haven't understood thank
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: albertpr9 on November 22, 2007, 08:22:06 PM
try installing tinyMCE... it takes 1 minute, then log into your control panel and change the description of any picture or gallery... then you will understand what I mean..  :wink:
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Mte90 on November 23, 2007, 12:24:37 PM
the mod is operative! Thanks!
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: GaYan on February 10, 2010, 04:26:31 PM
can we intergrate this to the add new image function in admin panel.. i mean instead of uploading the pic, can we place this editor thier ?

this will be a great oppertunity
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Rembrandt on February 10, 2010, 05:42:50 PM
can we intergrate this to the add new image function in admin panel.....

install the mod and you can see.
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: GaYan on February 11, 2010, 10:36:42 AM
i hav no knowledge about it  :cry: im not a php programmer  :idea:  :?:

it will be great if u can tell me where to edit.. that will help me alot sir ;)

thanks for the relpyy
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: Sunny C. on July 06, 2010, 11:00:46 PM
Gayan,
         look here my on my ACP-Version with example for image_description
         (http://www.4homepages.de/forum/index.php?topic=25098.msg148759#msg148759)
Title: Re: [MOD] Integrate TinyMCE into 4images Admin Panel (Still needs some work)
Post by: x23piracy on November 30, 2010, 06:56:23 PM
Hi,

for the <p> problem check this:
http://www.4homepages.de/forum/index.php?topic=25098.msg153398#msg153398 (http://www.4homepages.de/forum/index.php?topic=25098.msg153398#msg153398)


Greetz X23