1

Topic: Question: Installing it as a TinyMCE plugin

Could anyone explain me in plain english how to add my MCImageManager to my CMS site smile

Its probably straight forward, but i have been trying some hours now without any luck!
I follow this guide :


1.Unpack the imagemanager and copy it to the tinymce plugins directory (tiny_mce/plugins/imagemanager).
2.Add imagemanager to the TinyMCE init plugins option.
3.Add insertimage to the list of buttons in the TinyMCE init options.
4.Reload the page and verify that the imagemanager is working by checking for browse buttons inside the link and image dialogs.
5.Configure the filesystem.rootpath config option by editing the config.php file (tiny_mce/plugins/imagemanager/config.php)
Make sure that the configured rootpath has write access.
Enable and integrate your CMS with the SessionAuthenticator or any other Authenticator implementation to make it secure. You can either use your own authentication script or set a username and password in the login_session_auth.php file. If you don't add username and password settings for ImageManager, any visitor to your website may be able to upload or delete any image they like.

Stopped at the 2. Add imagemanager to the TinyMCE init plugins option.
Where is the file? whats the name of the TinyMCE init plugins file?

Thanks

Best Regards

neliuz

2

Re: Question: Installing it as a TinyMCE plugin

OK!

I did something! Here is my code :

<script type="text/javascript">
        tinyMCE.init({
        // General options
        mode : "none",

        theme : "advanced",

        plugins : "style,table,advimage,advlink,inlinepopups,media,contextmenu,paste,fullscreen,noneditable,visualchars,xhtmlxtras,vimeo,jbimages,spellchecker,insertdatetime,youtube,-externalplugin",
        width : "913",
        height : "300",

        // Theme options
        // Style, image and video
        theme_advanced_buttons1 : "youtube,vimeo,jbimages,styleselect,formatselect,fontselect,fontsizeselect,spellchecker,forecolor,|,code,preview,fullscreenbullist,numlist,|,outdent,indent,undo,redo,|,link,unlink,anchor,charmap,insertimage,",       <------------ Here is step 3. in the installation guide.
        // This is text aspects
        theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,|,,bold,italic,underline,strikethrough,insertdate,paste",
        theme_advanced_buttons3 : "",
        theme_advanced_buttons4 : "",
       
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "center",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : false,
        relative_urls:false,
        file_browser_callback : "mcImageManager.filebrowserCallBack",

        // Skin options
        skin : "cirkuit",
       
        // Example content CSS (should be your site CSS)
        content_css : "<?php echo SITE_CSS; ?>, <?php echo APP_RESOURCES; ?>css/tiny_mce_style.css"
});
setTimeout(function() {tinyMCE.execCommand('mceAddControl', false, 'field');}, 0);

</script>

Here is step 2. in the installation guide :

<script language="javascript" type="text/javascript" src="resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager.js">
</script>
<script language="javascript" type="text/javascript" src="resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager_src.js">
</script>

3

Re: Question: Installing it as a TinyMCE plugin

But no buttons no nothing appears on my site sad

I googled and found this thread : http://www.tinymce.com/forum/viewtopic.php?id=2149

I try to follow it!

But no luck sad

neliuz

4

Re: Question: Installing it as a TinyMCE plugin

I removed the and put it in the head : <script language="javascript" type="text/javascript" src="resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager.js">
</script>
<script language="javascript" type="text/javascript" src="resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager_src.js">
</script>

still no luck sad

5

Re: Question: Installing it as a TinyMCE plugin

There are two methods of integration for the imagemanager one is to have it inside TinyMCE the other is to have it standalone on a form on the page.

Click view source here to see the method of TinyMCE integration:
http://www.tinymce.com/tryit/imagemanag … inymce.php

Click view source here to see the standalone integration method:
http://www.tinymce.com/tryit/imagemanag … ration.php

You can use Firebug or Chrome developer tools to see if the scripts gets loaded correctly. If the imagemanager isn't installed in the plugins directory TinyMCE won't get initialized.

The tinyMCE.init call is supposed to be on the page you have in your CMS.

Best regards,
Spocke - Main developer of TinyMCE

6

Re: Question: Installing it as a TinyMCE plugin

Ok , so if i wanted to integrate it like a standalone version i just copy the code from the link you posted above and save it to a file. After that i add the file to the js folder! And call for it in the head section of my index.php ?

Thanks for reply!

neliuz

7

Re: Question: Installing it as a TinyMCE plugin

Yeah, it should help you to spot any problems with the integration you have since that is a live example.

Best regards,
Spocke - Main developer of TinyMCE

8

Re: Question: Installing it as a TinyMCE plugin

Hi , Thanks smile

The file i am pasting this code to :
<form method="post" action="dump.php">
        <h4>Absolute URL</h4>
        <p>
                <input id="url_abs" style="width:400px" />
                <a href="javascript:;" onclick="mcImageManager.browse({fields : 'url_abs'});">[Pick file]</a>
        </p>
</form>

Does it have to be: myname.js ?

9

Re: Question: Installing it as a TinyMCE plugin

You need to stick that into your HTML page or php page or.

Best regards,
Spocke - Main developer of TinyMCE

10

Re: Question: Installing it as a TinyMCE plugin

Thanks spocke!

Yes i can see the code on my webpage!
got this in my index.php:

<form method="post" action="dump.php">
        <h4>Absolute URL</h4>
        <p>
                <input id="url_abs" style="width:400px" />
                          <a href="javascript:;" onclick="mcImageManager.browse({fields : 'url_rel', relative_urls : true});">[Pick file]</a>
        </p>
</form>       

and the this in my <head> :

<script language="javascript" type="text/javascript" src="resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager.js">
</script>

When i click on pick a file nothing happends!

I dont know much about this , but i hope you are patient with me and try to help me out smile

Thanks ALOT for your help so far!!

neliuz

11

Re: Question: Installing it as a TinyMCE plugin

Use firebug or chrome developer tools and make sure that the mcimagemanger.js gets loaded and that there is no JS errors when clicking the link.

Best regards,
Spocke - Main developer of TinyMCE

12

Re: Question: Installing it as a TinyMCE plugin

yeah.. i got this error in firebug:

mcImageManager is not defined

does it mean that it cant bring the url from <script></script> in my <head> at the top of my index.php?

13

Re: Question: Installing it as a TinyMCE plugin

Yes, make sure it's loaded properly. The url resources/javascript/tiny_mce/plugins/imagemanager/js/mcimagemanager.js needs to be relative from the current page.

Best regards,
Spocke - Main developer of TinyMCE

14

Re: Question: Installing it as a TinyMCE plugin

OMG smile nice!

Now i get a window up when i click on the button labeld "pick a file"!

After i click it it asks me for a password. And its not the same as the login user and pass!

Do you know were i can locate it and change it ?

THANKS ALOT for your help! I bought this plugin today , in order to get done with my CMS big_smile

neliuz

15

Re: Question: Installing it as a TinyMCE plugin

You can get rid of the password if you add a session that the session authenticator can pick up when the user logs in to your system.

See:
http://www.tinymce.com/wiki.php/MCImage … entication

Best regards,
Spocke - Main developer of TinyMCE