Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

JoomlaTune Support Forum    ProofReader component    Suggestions, Wishlists & Feature Requests    Topic: Improvements for Developers
Pages: [1]   Go Down
  Print  
Author Topic: Improvements for Developers  (Read 7368 times)
0 Members and 1 Guest are viewing this topic.
harikaram
Newbie
*

Karma: 3
Offline Offline

Posts: 19


« on: March 08, 2011, 23:07:12 »

A few suggestions that would make customising JComments a bit easier for developers...

1. Remove all the HTML DOM creation, deletion and moving via Javascript (for busy indicators, messages etc).  Define it all explicitly in the template HTML and have the JS just show/hide.

2. Implement top level Observer-style events in the JS Jcomments class:  onSubmit(action, data), onComplete, onSuccess, onError.  Pass the resultant data (action name, result code, message, etc).  Then do the DHTML stuff by implementing these methods with JS code *in the template* or, in a JS file that's overridable and separate from the main JS file.  Right now, too much is done in the main JS file and what it does it too specific (eg. having error message *at the top* of the form).

4. In the JS, remove all the conditionals which are required for methods like showMessage() to work for all the different types of messages (ie voting versus adding a comment). Make separate methods for these separate tasks.  The "busy" methods for the loader are another example.  It will make the code cleaner and easier to implement bespoke design functionality.

5. Clean up the TPL files so there are easier to read and override.  Do they really need to be classes?  What about standard joomla views?

6. Make the system recognise multiple theme subfolder folders in the joomla template override folder so you don't need to modify  the main component's structure to have multiple themes.

That's all for now!  When's the next version coming out?!?







Logged
smart
Administrator
Hero Member
*****

Karma: 160
Offline Offline

Gender: Male
Posts: 2559



WWW
« Reply #1 on: April 19, 2011, 05:34:01 »

The next version will be ready soon but I can not implement these suggestions in it. Only in the next version (otherwise current release would be delayed for a long time).

I'm completely agree with all suggestions about JS but I strongly need help with it.

Regarding template's format - I'm going to change it but later because I have to found some way to provide some kind of legacy mode for old templates - I don't want to broke users' sites after they will update JComments Wink

BTW, at this time you can override comments' template via current Joomla's template folder.
Logged

If you use JComments, please post a rating and a review at the Joomla! Extensions Directory
Pages: [1]   Go Up
  Print  
JoomlaTune Support Forum    ProofReader component    Suggestions, Wishlists & Feature Requests    Topic: Improvements for Developers
 
Jump to: