Hi,
here is the First beta version of TvEditor.
First of All, consider this beta as a draft.
The code is dirty and needs improvements.
I’ll rewrite most of it in the weeks to be.
This code must not be used in production environment, it could mess up your content.
known issue:
FIXED
If you’re adding a new option to a tv which already has options. The module does not check if the new is already in the list.
(In fact it does but there is a bug in the process which follows the duplicate checking)
I haven’t been able to write a satisfying function to filter the duplicate in this case.
If so, all existing options will be deleted and replaced by the new one
It’s been tested with beta 3 and seems to work(except for the case mentioned above) and is released without any guarantee.
INSTALLATION:
1/Extract the archive in assets/modules
2/ Install required chunk:
Use phpMyAdmin and execute tvEditor-chunk.sql
If your db prefix is not "modx_", first search and replace "modx_" with your custom prefix.
3/ create a new Module named tvEditor
copy and paste in content
include_once($modx->config['base_path'] . "/assets/modules/tvEditor/tveditor.snippet.php");
NOTE: You can set $debug=true and changes won’t be stored in db
default is $debug=false; // line 36 file:tveditor.snippet.php
TODO:
- bug fixes
- improve code quality
- remove harcoded string for multilingual purpose
:-)
EDIT : See first post for files