4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started 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: <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:
<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.
-
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
-
thanks to you both!
-
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...
-
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 :)
-
Okay I got it.
Open: admin_global.php
Find:
else {
$textinput_size = "30";
$textinput_size2 = "17";
$textarea_size = "28";
}
Replace with:
else {
$textinput_size = "30";
$textinput_size2 = "17";
$textarea_size = "120";
}
Open: admin_functions.php
Find:
function show_textarea_row($title, $name, $value = "", $cols = "", $rows = 10) {
Replace with:
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.)
-
yepp...
thank you very much!
that's it!
-
Thanks BartAfterDark,
works great :thumbup:
-
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?
<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();
}
-
You can try and add it before the javascript you posted :) (it should work)
-
:(
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.
-
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) ?
-
(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.
-
try and change this
<script type="text/javascript" src="../tiny_mce/tiny_mce_gzip.js"></script>
to
<script type="text/javascript" src="/galerie/tiny_mce/tiny_mce_gzip.js"></script>
-
: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.
-
I'm going to look into it tomorrow :)
-
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 :?:
-
In admin_functions.php
find:
mode : "textareas",
theme : "advanced",
Replace with:
mode : "exact",
theme : "advanced",
elements : "news_text",
Now it will only show for the news :-)
-
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 elements : "news_text", "???"
But where i find the name of the textareas?
Thanks @bartafterdark
-
it's easist if you are useing firefox
But the Image description box is image_description_1
-
: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?
:?: 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: elements : "news_text,cat_description",
-
sorry about the late reply. Nice to see you got it working ;)
-
Ein interessanter Mod. Aber für welches der Newssyteme ist dieser Mod konzipiert?
Gibt ja drei...
Grüße
KatzenAG
-
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
-
And what is to see in admin_functions ?
-
In admin_fuctions I see unchanged
-
If you see unchanged ... why post admin_functions if nothing wrong ?
-
Hello everybody!
It's an intressting Mod but for which News MOD?
I mean, in this forum I found three News MOD 8O
Thanks
-
Take RSS Feeds MOD. ;)
-
Send me admin_fuction.php which was hackthis mod,plz
-
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 :(
-
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.
-
@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
-
1. Download TinyMCE 2.1.0 and TinyMCE compressor PHP from http://tinymce.moxiecode.com
You do this too ?
-
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 ??
-
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...
<script type="text/javascript" src="../tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "simple"
});
</script>
-
i didn't found the mod news for running this mod in the forum. You can give to me the link Please?
-
You don't need a news mod to run TinyMCE.
-
excuse I have misinterpreted but this?
This small mod is mostly for people who installed the news mod.
the mod written here what is?
-
http://tinymce.moxiecode.com/
-
I have understood that it is based on tinymce but the mod news that it can have this editor what is?
-
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.
-
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.
-
Thanks for the help!
i haven't understood thank
-
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:
-
the mod is operative! Thanks!
-
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
-
can we intergrate this to the add new image function in admin panel.....
install the mod and you can see.
-
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
-
Gayan,
look here my on my ACP-Version with example for image_description
(http://www.4homepages.de/forum/index.php?topic=25098.msg148759#msg148759)
-
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