Topic: Ckeditor toolbar

Where can i change the Ckeditor toolbar?
When i change it in the ckeditor/config.php, nothing happens.

Thanks for help.

2 (edited by 2013-02-24 16:12:35)

Re: Ckeditor toolbar

It is initialised in the CKeditor templates.
The toolbar is set up in:
cutenews/skins/base_skin/addnews/index_cke.tpl
Lines 134 onwards
and
cutenews/skins/base_skin/editnews/editnews/index_cke.tpl
lines 154 onwards

The possible options are shown here:
http://docs.cksource.com/CKEditor_3.x/Deve...s_Guide/Toolbar

If you change this remember that the template will be overwritten whenever you use the cutenews update.

Re: Ckeditor toolbar

Thanks Damoor works fine.

How do I enable plugins?

config.extraPlugins = 'video';

4 (edited by 2013-02-25 14:15:35)

Re: Ckeditor toolbar

Its javascript so:
extraPlugins: 'video',

May work. I have not tried.

If you are going to upload files then you may need to implement the CKfinder.
https://cutephp.com/forum/index.php?s=&...st&p=156447

Also I have shown how to add highslide here:
https://cutephp.com/forum/index.php?showtopic=43344

Re: Ckeditor toolbar

Thanks works fine.

I hope the last question  https://cutephp.com/forum/style_emoticons/default/biggrin.gif
Where can I change the allowed upload fileformats?

Re: Ckeditor toolbar

Upload using which?
Cutenews or ckfinder?
Explain exactly what you are trying to do.

Re: Ckeditor toolbar

I can`t see the uploaded videofiles in the cutenews filemanger.

Re: Ckeditor toolbar

They will not upload if they are too big but it does not generate an error message!
Have you changed the allowed filetypes in inc/images.php?
The best way to upload and embed video is to implement CKfinder with the ckeditor video plugin.
(I assume you have downloaded and installed the ckeditor video plugin?)
I have tried this and it works.

Re: Ckeditor toolbar

Yes i have embed the video plugin, after change $allowed_extensions = ......"mp4","ogg" i can see the uploaded video files.

Thanks Damoor for your help.

Re: Ckeditor toolbar

The standard Cutenews images manager is pretty basic and will only allow upload of images, unless you modify it.
There is a better file manager which is free and will allow the upload of lots of different files.
It was written specially for CKEditor as the standard CKFinder was not free.
FileManager Project
I have successfully embedded it into Cutenews 1.5.2.

11 (edited by 2013-03-03 19:57:56)

Re: Ckeditor toolbar

Integrating FileManager with CKeditor in Cutenews 1.5.2   
The FileManager project is here:
FileManager Project 
The latest FileManager can be downloaded from the link to Github here: 
FileManager Download    To integrate it with CKeditor: 

1. Unpack and Upload the FileManager folder to  cutenews/core/
(Note: I renamed the folder as  'FileManager')   

2. Make a copy of cutenews/core/FileManager/scripts/filemanager.config.js.default as:
cutenews/core/scripts/FileManager/filemanager.config.js   

3.Open cutenews/core/FileManager/config.js   
Set up the variable:  "fileRoot": false,    This should point to your folder for uploading files.  To use the default cutenews/uploads 
Use:

   "serverRoot": true,  "fileRoot": "cutenews/uploads/",  "relPath": false,

 
If you leave it as "fileRoot": false, then FileManager will use its default of FileManager/userfiles 
Make sure that you set the file permissions for this folder if you use it.   
The configurations can be found here: 
https://github.com/simogeo/Filemanager/wiki...figuration-file   

4. Open FileManager/connectors/php/filemanager.php 
Find:

 
       function auth() {
        // You can insert your own code over here to check if the user is authorized.
        // If you use a session variable, you've got to start the session first (session_start())
        return true;
      }

   

replace with: 

 function auth() 
      {
          
          if (isset($_COOKIE['session']) && $_COOKIE['session'])
          {
          return true;
          }
          else 
          {
          return false;
          }
          
      }

 

This checks for the cutenews cookie to prevent other users from directly accessing your FileManager.

5. Open cutenews/skins/addnews/index_cke.tpl
   find:

  filebrowserBrowseUrl: '{$PHP_SELF}?&mod=images&action=quick&wysiwyg=true',
     filebrowserImageBrowseUrl: '{$PHP_SELF}?&mod=images&action=quick&wysiwyg=true',
     filebrowserImageBrowseUrl: '{$PHP_SELF}?&mod=files&action=quick&wysiwyg=true'

   

Replace with: 

  filebrowserBrowseUrl: '/cutenews/core/FileManager/index.html',
    filebrowserImageBrowseUrl: '/cutenews/core/FileManager/index.html?type=Images',
    filebrowserFlashBrowseUrl: '/cutenews/core/FileManager/index.html?type=Flash',
    filebrowserUploadUrl: '/cutenews/core/FileManager/connectors/php/filemanager.php?command=QuickUpload&type=Files',
    filebrowserImageUploadUrl: '/cutenews/core/FileManager/connectors/php/filemanager.php?command=QuickUpload&type=Images',
    filebrowserFlashUploadUrl: '/cutenews/core/FileManager/connectors/php/filemanager.php?command=QuickUpload&type=Flash'

       

Make the same change in: 
cutenews/skins/editnews/editenews/index_cke.tpl   

You now have a working image manager. 

Allowed fileypes and configurable options can be found in:  FileManager/filemanager.config.js 

Note 1: Using the Images button restricts you to uploading images only. If you want to upload other files such as .pdf then you need to use the Link     button in ckEditor.  So far I have not got the quick image upload to work.   

Note 2:  If you update cutenews using the built-in updater then you will need to make the changes in addnews and editnews index_cke.tpl again as they may be     overwritten.   

Note 3:  To use flash, video, youtube, highslide, mp3 etc you will need to install the plugins into    cutenews/core/ckeditor/plugins    and add the options into the toolbar: 
e.g.  extraPlugins: 'youtube,mp3player,highslide,video,flash', 
['Image','highslide','Video','Flash','Youtube','Mp3Player'],
CKEditor plugins
Flash plugin
Video plugin

Re: Ckeditor toolbar

Thanks  Damoor for the tutorial filehandling is now really easy   https://cutephp.com/forum/style_emoticons/default/biggrin.gif

little mistakes -->


<blockquote>2. Make a copy of cutenews/core/FileManager/filemanager.config.js.default as:
cutenews/core/FileManager/filemanager.config.js </blockquote>

filepath wrong:

cutenews/core/FileManager/scripts/filemanager.config.js


<blockquote>filebrowserBrowseUrl: '/cutenews7/core/FileManager/index.html',</blockquote>

filepath wrong:

filebrowserBrowseUrl: '/cutenews/core/FileManager/index.html',







Re: Ckeditor toolbar

Thanks  Damoor for the tutorial filehandling is now really easy   https://cutephp.com/forum/style_emoticons/default/biggrin.gif

little mistakes -->

Thanks Perry.
I have fixed this in the original post.
It took me FIVE attempts to post the code.
This forum kept throwing me out whenever I pasted the code from notepad, telling me I could not post in this forum, so I had to paste it line by line out of my dreamweaver code.

Re: Ckeditor toolbar

Thanks Perry.
I have fixed this in the original post.
It took me FIVE attempts to post the code.
This forum kept throwing me out whenever I pasted the code from notepad, telling me I could not post in this forum, so I had to paste it line by line out of my dreamweaver code.

When i want order my photos/videos with     --> main / options / Manage Images  it`s posible to do this with the fileMananger too?

15 (edited by 2013-03-03 23:25:32)

Re: Ckeditor toolbar

I am not sure what you want to do.
If Filemanager is set to use the folder cutenews/uploads in "fileroot" then Main / Options / Manage  Images will use the same files but  only in the main directory. Filemanager can handle subdirectories.

Re: Ckeditor toolbar

When i click on Manage Images the Filemanager(CoreFive) start but not the standard cutenews filemanager.

17 (edited by 2013-03-06 23:26:08)

Re: Ckeditor toolbar

When i click on Manage Images the Filemanager(CoreFive) start but not the standard cutenews filemanager.

Do you mean that when you click on Options>Manage Uploaded Images
you want filemanager to start?
That's possible but  would require a change in the cutenews code. It could be done by adding it into cutenews options but that must be implemented by the cutenews progammers or it will be overwritten every time cutenews is updated. Also the cutenews manager would need to be used if you do not select the option to use ckeditor.

You can connect directly to FileManager by using:
adddess_to_your_website/cutenews/core/FileManager/index.html
But, you must log in to cutenews first to set the cookie and authorise access.

18 (edited by 2013-03-07 13:45:20)

Re: Ckeditor toolbar

When i click on Manage Images the Filemanager(CoreFive) start but not the standard cutenews filemanager.

Here is a quick way to implement this.
1. Implement the installation of FileManager as in my previous post.
2. Rename inc/images.php to inc/oldimages.php just in case you want to restore it.
3. Create a new file called called inc/images.php and fill it with:

 <?PHP
  if (!defined('INIT_INSTANCE')) die('Access restricted');
  else
   header( 'Location: ./core/FileManager/index.html' );
  ?>


Note:
At your own risk. I have not fully tested it.
This will be overwritten when cutenews is updated so keep copies.