Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Suggestion: WYSIWYG Editor for Album Description  (Read 8501 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Suggestion: WYSIWYG Editor for Album Description
« on: November 16, 2012, 05:56:09 pm »

Hi,

So I just found out today (after using Coppermine for a couple of years now, ha) that you allow BBCode in Album Description.  Can you think about integrating some WYSIWYG Editor in future Coppermine?

I know for the 'technical' folks the WYSIWYG Editor is simply one step removed from BBCode, but for normal people like me, an editor is what we've become accustomed to. 
Logged

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #1 on: November 21, 2012, 12:27:47 am »

I have a WYSIWYG Editor Plugin for Category, Album, Edit file, Ecard and File upload Coppermine descriptions based on TinyMCE.
I have made the WYSIWYG Editor working on all textarea tags in Coppermine ie inputs where multilines are allowed.

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB http://www.tinymce.com/index.php

To get my TinyMCE Integration plugin working in the current cpg 1.5.21 I have made a lot of code changes like adding plugin hooks and a new TinyMCE class.
Plugin and TinyMCE work together and there are no changes to TinyMCE code which is downloaded from the source site and installed in a Coppermine root subfolder.
Updates are downloaded as is from the TinyMCE download site independent of the plugin which I have tested this week with the latest TinyMCE update.

If Coppermine development is interested in these code changes I can publish a tutorial on how to update for this type of WYSIWYG editors
and make the plugin available for public download if my code changes will be accepted for next Coppermine release.

See attached picture for an example of "WYSIWYG Editor for Album Description" like the thread creators subject.


Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #2 on: November 21, 2012, 01:00:33 am »

We are always looking for plugin hook suggestions. Fell free to post them.

As for the class, AFAIK you should be able to implement that in the codebase.php of your plugin.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #3 on: November 21, 2012, 03:23:07 am »

Overview of plugin hooks for TinyMCE

New:

themes.inc.php


2564: $params = CPGPluginAPI::filter('theme_cat_params', $params);
2574: $params = CPGPluginAPI::filter('theme_cat_params', $params);
2584: $params = CPGPluginAPI::filter('theme_cat_params', $params);
why:
html_entity_decode CAT_DESC

2782: $params = CPGPluginAPI::filter('theme_album_params_cat', $params);
why:
html_entity_decode ALB_DESC

ecard.php

225: $params = CPGPluginAPI::filter('ecard_params', $params);
314: $params = CPGPluginAPI::filter('ecard_params', $params);
why:
replace MESSAGE with html_entity_decoded POSTed message (escaped)
replace PLAINTEXT_MESSAGE with POSTed message (escaped)
html_entity_decode PIC_CAPTION

profile.php

789: $form_data = CPGPluginAPI::filter('profile_form_data', $form_data);
why:
html_entity_decode user_profile6

I'm also using these existing plugin hooks:

javascript_includes
page_html
file_data
theme_display_thumbnails_params
theme_album_params



Logged

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #4 on: November 21, 2012, 03:32:13 am »

For the class name I will take a look at using codebase
but to be honest I must say adding a dummy class name
in 6 tags for making it possible to address all the multiline textareas
should be implemented in Coppermine core
and not being searched for by a user written plugin.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #5 on: November 21, 2012, 11:12:11 am »

It would be superb if you could attach a zip of your plugin so we can test it and maybe introduce your ideas in a future release. Great work so far, keep it up.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #6 on: November 21, 2012, 05:18:54 pm »

Quote
It would be superb if you could attach a zip of your plugin so we can test it and maybe introduce your ideas in a future release. Great work so far, keep it up.

I second that  ;)
Logged

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #7 on: November 22, 2012, 11:19:17 am »

Thanks for your reply Phill I have some more textareas to include in the plugin before you can have a test.
Logged

Veronica

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: se
  • Offline Offline
  • Posts: 106
  • Coppermine 1.5.22
Re: Re: Suggestion: WYSIWYG Editor for Album Description
« Reply #8 on: November 26, 2012, 09:23:31 pm »

It would be superb if you could attach a zip of your plugin so we can test it and maybe introduce your ideas in a future release. Great work so far, keep it up.

TinyMCE Integration plugin for proof-of-concept

Current version is intended only for Coppermine development team to evaluate this concept.

There are 7 required new Plugin Hooks for installing this plugin and you will find documentation about these new hooks in codebase.
These new hooks should be easy to implement for a Coppermine developer.
Plugin manager page will guide you in the installation steps required.
I will not publish any details about how to implement these new hooks as it's Coppermine core functions.

There is no rollback or cleanup function when uninstalling the plugin.
All formatting tags will be shown as clear text after an uninstall.
You must remove this formatting yourself why a test installation of Coppermine 1.5.21 is the best test environment

For a future public available version of this plugin there must be a strategy on how to implement formatting
maybe save both unformatted and formatted text in the database
or decide that uninstalling the plugin is not an option ie more like a Coppermine core function then.

The TinyMCE required dummy textarea class will be searched for and updated by the plugin at runtime.
I'm still asking for this dummy class in all multiline texareas to be a Coppermine core class.
Consider also using the TinyMCE integration for picture title texts which is a single line standard format now.

The TinyMCE integration includes also an integration with the Coppermine core themes maybe not optimal but as a concept acceptable including all theme styles.

Formatting functions of TinyMCE I have choosen to go very advanced with many fancy functions.
For a later official version of the plugin it is ofcourse possible to make simpler menus and gallery owner easy selectable variants of the editing functions.

TinyMCE options configuration setup is available as a TinyMCE controlled textarea after installation in the Plugin Manager page.
Default configuration and backup of current configuration are available backup functions

Support for many of the Coppermine languages is included because TinyMCE and Coppermine language codes are in some cases different.

Read more about TinyMCE here: http://www.tinymce.com/index.php
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.