CVS edit link for dtengeri

Our goal was to make an online WYSIWYG theme editor for Drupal.
It is similar to the editor of Drupal Gardens, but it can be used under Drupal 6 too.
The project's website is http://drupalthemecreator.org.
On this site, users can select a base theme, edit its layout and style and download a full Drupal theme when they are ready.
While we're developing this editor we found that it would be useful if the users are able to edit their currently theme on their Drupal site.
So we have created this module, which contains the WYSIWYG editor only and it can be used to edit any of the Drupal's theme and to generate a CSS file.
We have extended the administration form at admin/build/themes/settings where the user can turn on/off the previously generated css files.
There is a demo video on our website, which demonstrates the features of this module.
We are planning to release a full Drupal 7 release on the day that Drupal 7 is released.

Comments

dtengeri’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new86.07 KB
new86.77 KB
avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thank you for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.

As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site; for modules, it should include also a comparison with the existing solutions. In particular, what is the difference between the proposed module, and the existing projects that implements or integrate with an existing WYSIWYG editor?

We then review a module/theme per applicant; you should report us if we should review the version for Drupal 6, or Drupal 7.

dtengeri’s picture

Status: Needs work » Needs review

Hello, and thank you for the informations and directions.

With our module you can design your actual theme on your Drupal site by a point and click method. You can modify almost all of available CSS properties only in a few clicks.

Some features of the module:

  • Turn on/off the editor mode without turning of the module.
  • Control the editor's availability by permissions.
  • Select any HTML element to edit it by a single click on it.
    Selectable elements:
    • only the clicked element
    • all same elements (all h1, all div, etc.)
    • all elements in the same class (.title, .block, etc.)
  • Set the value of CSS properties by clicking on images or using sliders. Don't need to write any CSS code.
  • The results will be shown immediately on your Drupal site.
  • Undo/redo your modifications.
  • Path Editor:
    • Easily select a container element of the selected item by clicking on one of its parent in the path editor.
    • Expand/modify the selected elements path (its place in the DOM) to select another element.
  • The toolbar has two modes:
    1. Floating mode allows you to move the toolbar everywhere on the site.
    2. In docked mode the toolbar will be sticked to the bottom of the page.

    The toolbar is collapsible in both modes.

  • Tooltip informations about the CSS properties for users who haven't worked with CSS before.
  • Save your modifications in a CSS file. The file generation is automatic, you don't have to edit manually any CSS files.
  • Turn on/off the generated CSS files at the theme's administration page. You can enable more CSS files at once or disable all if you don't want to use them anymore.

Comparison with existing modules:

Sweaver module provides a visual interace to modify a theme's style.
First, i want to mention that at the time we started the project, Sweaver wasn't reachable at the drupal.org's project page.
The Sweaver module's editor is configurable, it can be expanded by plugins on its admin page. you can add new CSS properties to the editor. We want to provide a simpler, all in one tool which contains everything to modify your site's CSS without the need of configure something in the background.

Sweaver contains a integration with ImageCache and has an interfeace where users can upload images. In this version of the proposed module we don't have such an interface. We are focusing now on the editing functionality.

Our first goal was to create a full theme generator, which allows users to download a full theme. This can be found at http://drupalthemecreator.org. While we're developing this we found that such an editor would be useful on every Drupal site, so we've made the proposed module.

Our target platform is Drupal 6, so please review the version for Drupal 6 first.

dtengeri’s picture

StatusFileSize
new87.38 KB

Coder module found some indentation problems. Fixed now.

dtengeri’s picture

StatusFileSize
new87.24 KB

I checked for normal warnings with Coder module in the previous post. There were some minor warnings (like trailing spaces) too,so I have fixed them in this version.

dtengeri’s picture

Is there anything else that I have to do to review the module?

itarato’s picture

I've checked the code and I haven't found any major problems. Coding conventions and security guidelines are true for the whole code. Looking forward to see it on d.o.

dtengeri’s picture

Thanks for your review. Now, I'm waiting for an official one.

dtengeri’s picture

StatusFileSize
new87.36 KB

I've found a bug in the module. Now it is fixed.
I've changed the Implementation of hook_...(). comments to Implements hook_...().

AlexisWilke’s picture

dtengeri,

Is that dtc zip file a stand alone module? If so then you should create your own project and use the CVS, etc. to get us an actual module.

Thank you.
Alexis

dtengeri’s picture

Dear Alexis,

Yes, it is a standalone module. I don't have a CVS account. I'm waiting for a reviewer, who will inspect the code. I hope somebody will come and if I get the account I can create the module's project page and release the module.

David

verbosity’s picture

Seems to work fine and I can't find any issues myself.

couple of notes:
1. the copyright notice may cause issues, I was asked to remove a similar notice on my submitted module
2.Javascript files are tab indented rather than space indented ( coder does not check javascript files I believe.

avpaderno’s picture

Status: Needs review » Needs work

I am changing the status basing on the previous comment.

To add more points that need to be changed:

  1. Schema descriptions, as well as menu titles and descriptions, should not be passed to t().
  2. The license file should not be included.
  3.     drupal_add_js($path .'/plugins/jquery.min.js');
        drupal_add_js($path .'/plugins/jquery.ui.min.js');
        //Add plugins we will need
        drupal_add_js($path .'/plugins/jquery.json.js');
        drupal_add_js($path .'/plugins/jquery.cookie.js');
    
    

    The jQuery library is already included from Drupal; adding the file once again causes problems.
    There is a module that allows to use the jQuery UI library; if the module needs that library, it should depend on that project (jquery_ui.module).

  4. See http://drupal.org/coding-standards to understand how a module should be written; in particular look how control structures are formatted.
  5. The comment of a hook implementation should report Implements hook_footer().
  6.     //get toolbar
        include_once('dtc_toolbar.inc');
    

    There is a Drupal function to use instead of include_once().
    Comments should be sentences starting in capital case, and ending with a period.

  7. The JavaScript code should be in an external file.
  8. /**
     * Puts option to system_theme_settings pages, to choose which extra style.css
     * file to use
     */
    

    The Doxygen comment of any hook implementations should be different, and simpler.

  9.       $q  = "SELECT COUNT(cid) FROM {dtc_editor_css_files} ";
          $q .= "WHERE theme LIKE '%s' AND file LIKE '%s'";
    

    Is there any reasons the SQL is not written as a single litteral string?

  10.   //Jelzi, hogy fejlesztő-e a user
    

    Comments, as well as variable names, should be in English.

  11. The function dtc_toolbar() outputs much HTML without to use theme functions.
  12. Avoid to escape a string delimiter inside a string, especially when the string is passed to t().
dtengeri’s picture

StatusFileSize
new75.97 KB

Hi,

Thanks for your review. Finally we have time to correct the points you mentioned. I hope everything will be fine now.

The biggest changes:
Now the module depends on jquery_update and jquery_ui modules.
We have refactored the dtc_toolbar(). Now it is a form and it has a theme function. I've tried to minimalize the direct HTML output as I can.
I've read the coding standards and applied them to all php, js and css files.

Regards,
David

dtengeri’s picture

Status: Needs work » Needs review

Changed status as per previous comment.

dtengeri’s picture

Component: Miscellaneous » new project application

Any news?

dtengeri’s picture

I have created a sandbox project for this module:
http://drupal.org/sandbox/dtengeri/1072510

I have created a new issue at http://drupal.org/project/projectapplications based on the new instructions about applying for permission to create full projects.
Link to the issue: http://drupal.org/node/1072556

avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Issue summary: View changes
Status: Closed (fixed) » Closed (duplicate)
Related issues: +#1072556: [D7] Dtc