Code Monkey home page Code Monkey logo

phplist-plugin-ckeditor's People

Contributors

bramley avatar michield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phplist-plugin-ckeditor's Issues

Forbidden error

Hi,

I have installed this plugin with kcfinder when I clicked on browse server, it shows me Forbidden error as below.

You don't have permission to access /phplist/admin/plugins/CKEditorPlugin/kcfinder/browse.php on this server.

Please help me as soon as possible.

Thanks

KCFinder PopUp Window doesnt work in Chrome or Safari

I have an upgraded install of PHPlist v2.11.9. I installed the combo plugin directly from the plugins menu and made the appropriate config changes. All directories are 777 for the uploads. I cannot view images in the directory nor use any of the features of the popup window to browse. In Safari it throws an error that the browser doesnt recognize addresses beginning with "kcact:" I assume there is a weird addressing issue? Otherwise it Looks really slick. Hoping to make it work for our needs. Thanks for the hard work.

LTR/RTL buttons

phpList displays left/center/right/even buttons but not RTL/LTR buttons (the ones that usually look like -> and <-).

View/delete permissions on uploaded files

Is there a way to have different file/image subdirectories per user?

Currently all people who can upload images can see (and use, and even worse - delete) all other files ever uploaded to phpList.

Is there a recommended setting or a workaround for that problem?

incorrect upload images should block upload

I have

define('UPLOADIMAGES_DIR','nonexistingdir');

but the "Browse server" and "Upload" functionality is still there. Using them throws an error.

Would be good to simply remove it, if the dir is not writable.

img align attributes wrong for emails

Like most modern inline editors, CKEditor changes the traditional align=left|right attribute of img tags to inlne css style=float:left|right

This is wrong for reliable email usage for instance with Outlook. Both tags are needed. After some research I discovered this fix which one adds to the end of the ckeditor code. It works perfectly. See http://stackoverflow.com/questions/11551922/ckeditor-image-align-center-customization

I only used the first code goven as image centering is not really an issue and it works fine on this version of ckeditor.

Append this to the end of ckeditor.js


//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function configureHtmlOutput( ev )
{
   var editor = ev.editor,
      dataProcessor = editor.dataProcessor,
      htmlFilter = dataProcessor && dataProcessor.htmlFilter;

   // Out self closing tags the HTML4 way, like <br>.
   dataProcessor.writer.selfClosingEnd = '>';

   // Make output formatting behave similar to FCKeditor
   var dtd = CKEDITOR.dtd;
   for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) )
   {
      dataProcessor.writer.setRules( e,
         {
            indent : true,
            breakBeforeOpen : true,
            breakAfterOpen : false,
            breakBeforeClose : !dtd[ e ][ '#' ], 
            breakAfterClose : true
         });
   }
   // Output properties as attributes, not styles.
   htmlFilter.addRules(
      {
         elements :
         {
            $ : function( element )
            {
               // Output dimensions of images as width and height
               if ( element.name == 'img' )
               {
                  var style = element.attributes.style;

                  if ( style )
                  {
                     // Get the width from the style.
                     var match = /(?:^|\s)width\s*:\s*(\d+)px/i.exec( style ),
                     width = match && match[1];

                     // Get the height from the style.
                     match = /(?:^|\s)height\s*:\s*(\d+)px/i.exec( style );
                     var height = match && match[1];

                     // Get the border from the style.
                     match = /(?:^|\s)border-width\s*:\s*(\d+)px/i.exec( style );
                     var border = match && match[1];

                     // Get the float from the style.
                     match = /(?:^|\s)float\s*:\s*(\D+);/i.exec( style );notSet
                     var float = match && match[1];

                     if ( width )
                     {
                        element.attributes.width = width;
                     }

                     if ( height )
                     {
                        element.attributes.height = height;
                     }

                     if ( border )
                     {
                        element.attributes.border = border;
                     }

                     if ( float )
                     {
                        element.attributes.align = float;
                     }
                  }
               }

               if ( !element.attributes.style )
                  delete element.attributes.style;

               return element;
            }
         }
      } );
}
CKEDITOR.on('instanceReady',configureHtmlOutput);

Upload never starts

I've been working on uploading an image with this awesome plugin and I can't get it to work for some reason. When I choose to upload I see a grey bar and then nothing happens. Can you help me out please? Thank you in advance.

upload images

plugin works great. The only thing I found was the upload images location, but I'm not sure that's my settings.

I have
define('UPLOADIMAGES_DIR','uploadimages');

and in that directory there is a subdir "image". The fckeditor plugin looks in the "image" directory for images, and this plugin creates a new subdir called "images" and places all images there.

So, that would make upgrade to this plugin loose the existing images in the library.

CKEditor becomes slow and/or unresponsive after a few minutes in PHPList 3.2

Hi Duncan,
Thanks for another great plugin. I'm enjoying using the CKEditor.
Since updating to PHPList 3.2.0, the editor becomes very slow after a few minutes of editing.
I don't remember having this issue before upgrading (and I did a lot of campaign editing).
"Save and continue editing" (once I can get a click to register) resets the page and gives me a few more useful minutes, so it definitely seems like a JS issue.
Sometimes, before it slows down, it seems to miss some of the keys I hit.
I'm using Firefox 41.0.2 on a Mac and v2.0.0 of the plugin.

Using RTL automatically

FCKConfig.ContentLangDirection should use phplist's language setting, which means:
FCKConfig.ContentLangDirection = FCKLang.Dir ;
Instead, it's currently hardcoded* to LTR:
FCKConfig.ContentLangDirection = 'ltr' ;

*It's hardcoded in:
public_html\lists\admin\fckphplist.php
public_html\lists\admin\plugins\fckphplist\config.php

upload directory - config

the config says

"path to file upload directory (overrides UPLOADIMAGES_DIR in config.php)"

but when I set it, it still takes the UPLOADIMAGES_DIR and not the config value.

Disable Ckeditor without disabling the plugin

Feature Request, sorry if its the wrong place.
Sometimes I need to have html that is unchanged by the WYSIWYG and other times the WYSIWYG is exactly what is needed. It would be really cool if there was a way to choose at the time of editing whether it was enabled or not and have that setting memorized in the session or maybe at the campaign level. Maybe adding a 3rd option to the "content" label after send a web page, WYSIWG Editor disabled?

Inline CSS - Outlook

CKEditor renders inline css style to images, tables and so on. (float, width...)
Outlook does not implement those inline css styles correctly and the newsletter looks pretty messed up.

Is there a way to use good old html attributes instead of inline css?

Path error

My phpList plugin dir is setup to "../plugins" in config.php
(for example: website.com/admin, website.com/plugins).

The editor is blank because the path is set to relative "plugins/..." in the html code of the page.

If I change this in CKEditorPlugin.php file it works:

<script type="text/javascript" src="$path/ckeditor.js"></script>

to:

<script type="text/javascript" src="/$path/ckeditor.js"></script>

Problem with upload and browsing of Images

Hi,

for short i am not able to upload or view any images. I need help to debug this issue.

When using the CKEditor i get a Message from Chrome that the folder cannot be created. In my php log file i read:

[Fri Apr 20 13:32:03.484761 2018] [:error] [pid 3050] [client 79.246.168.147:39082] PHP Warning: mkdir(): Datei oder Verzeichnis nicht gefunden in /var/www/clients/client4/ web8/web/lists/admin/plugins/CKEditorPlugin/kcfinder/core/class/uploader.php on line 306, referer: https://azmuto.de/lists/admin/?page=send&id=4&tk=60b8b3b7d8688b3674e4b1837 001fef0

When using the fckphplist i just get no error feedback but the upload functions are neither working.

Here are my settings for ckeditor:

File system path to the upload image directory. Usually leave this empty.

Name of the image subdirectory of the file upload directory
lists/uploadimages

Name of the files subdirectory of the file upload directory
lists/uploadimages

Name of the flash subdirectory of the file upload directory
lists/uploadimages

On my webserver i have phplist root directory in

/var/www/azmuto.de/web/lists

Within this i have

drwxrwsr-x 2 www-data www-data 4,0K Apr 20 13:09 uploadimages

I have also copied the .hataccess file from

lists/admin/plugins/CKEditorPlugin/kcfinder/conf/upload.htaccess

to

lists/uploadimages/.htaccess

I have started a discussion at phplist.org, too!

Thanks for your help!
Regards Christoph

kcfinder issue with defined upload image directory ??

Hi @bramley,

I noticed an issue with kcfinder in the following setup.

The phplist installation is one that had been sitting for a good while and got upgraded from 3.3.2 up to the current version (3.6.2) with ckeditor plugin at latest version 2.6.2+20210428.

Now, in the settings page for the ckeditor plugin I have the File system path to the upload image directory as /var/www/vhosts/mydomain.com/newsletter and the image subdirectory to images.

With these settings I can create new folders/delete, upload/download files but I cannot use the View function when right clicking on an image and when selecting the image to be brought into ckeditor the final path is not as it should be. I would expect a path of https://www.mydomain.com/newsletter/images/myfile.jpg and instead I get a https://www.mydomain.com/images/images/myfile.jpg

Unless I am doing something wrong with the directory values in the settings I think that there might an issue with this line

$uploadUrl = sprintf('%s://%s/%s', $public_scheme, $website, ltrim(UPLOADIMAGES_DIR, '/'));

Without having really digged in the code I am thinking that instead of the UPLOADIMAGES_DIR it would be better to use the derived directory in $kcUploadDir since it takes into account whether there has been a directory set in the ckeditor plugin config instead of just going straight to UPLOADIMAGES_DIR .

So I replaced UPLOADIMAGES_DIR in that line with basename($kcUploadDir) and it seemed to fair better but perhaps basename is not the best choice since I recently found out that it doesn't always work correctly with all utf8 filenames.

kcfinder - problem with subfolders

Hi Bramley! I have found problem in the kcfinder plugin. Content of subfolder is not displayed correctly. Actually it displays again the root folder.

image

Thanks for your help.
JB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.