Forums / Cotonti / Development / Plugins - TODO list

tensh
#1 2013-02-24 17:09

I'm working on a big project for my needs (a community fan site).

This is the list of plugins/modules I'm going to do. If anyone has something similar, I'd like to ask you for your contribution so that I won't be reinventing the wheel :)
I'll gradually add here plugins as I proceed with making them. It would be great if I manage to do all of this in a 2-month time or so.

1. Inline editing of pages with newest CKeditor
(based on: http://stackoverflow.com/questions/13763727/ckeditor-4-inline-editing-save-button-plugin)

2. Stream manager - embed stream (ustream, twitch) in user profile and display online/offline streams on index page.

3. Items module - a copy/paste of page module but different name (so that page module/database don't get overloaded with data)

4. Profile photo from a webcam - an implementation of jQuery webcam module

5. Youtube channel in profile page

6. Twitter feed in profile page

7. A port of "Like" button from Genoa plugin I made once upon a time

8. BBcode ajax tooltip - BBcode producing a link with ajax tooltip, displaying some information from a page that the link is pointing to. (only for pages)

9. Responsive Attachments mod (current popup doesn't play nicely with responsive designs)

10. Forums as groups - ask for read/write access with moderation panel (using the Auth by user id plugin) (low priority)

11. Page multi-edit in page category

12. Import pages from .csv file (low-priority)

13. CKeditor and PFS integration ("Upload image" linking to ajax script that will load images into PFS)

14. PFS mod - multiupload like in attachments plugin.

15. PFS mini-gallery in user profile

16. Search box with auto-suggest based on pages and page lists

17. Modifications of PMs to Facebook-like style (history of conversation with user) (low priority)

18. Autofields plugin - automatic extra fields

19. Raphaeljs graph maker - based on http://raphaeljs.com/

I think that's all for now.

Trustmaster
#2 2013-02-24 18:35

Wow, that's an impressive list!

1. I'm very interested in this too.

3. There's a potential danger that the forked module will get out-of-sync, so consider using the old good pages as well.

5. I have some YouTube code for Genoa that might be helpful, I can share it privately.

6. There are some Twitter plugs in Downloads section.

7. Have a look at "Thanks" plugin, it is similar to likes and is being developed for Siena.

9. Interesting. We might need to discuss this in more detail.

11. Should be good thing with the inline editor.

13-15. Maybe you could use Attachments (attach files to users) or elFinder plugin (can be integrated with CKEditor) for these.

16. This is also wanted in many projects, so collaboration is possible.

17. Honestly the PM module as it is now in Siena needs a decent revamp/rewrite in general.

May the Source be with you!
tensh
#3 2013-02-25 07:57

Thank you for response! :)

1. I'm starting from inline editing of pages. Maybe I'll manage to make it in such a way that every html container will be able to be inline-edited. I'm not sure if I manage to do the same for text inputs. I'll be in touch.

3. Yeah, I was thinking about it too. It's only that there will be a lot of extra fields to take care of (and each category will have different fields to fill in) and I wonder if it will be easy to maintain on the long go.

5. That would be great, thanks! :)

6. Yeah, I'llk take a look at it.

7. Thank you! 

9. I can show you a website with responsive design and attachments - I can imagine that on mobile the popup will appear out of place.

11. I'm still wondering if I should do it in admin backend or in the site. Ajax would be indeed great for this, but I want it to take into account every field possible. So first chose the fields we want to multi-edit, and then it displays a list of pages with these fields.

13-15. Attach files to users - great idea! :) But I will have to make a attachments control panel for them? I assume I can also attach files to page categories? I was thinking rather about an ajax script that would use the same multiupload function as attachments, but saving files into PFS database. hmm.

16. Nice, so I'll have some help :)

17. Okay, so I'll give it a bigger priority.

Trustmaster
#4 2013-02-28 11:45

1. This is the highest priority to me as some of my customers would like this feature rather much. I suppose this might require some changes in the core too, so the sooner we start the sooner we can make it work. I already thought of integrating Create.js with Cotonti a while ago but it requires implementing a RESTful backbone backend. They have also started working on CKE4 support. Built-in CKE4 facilities for inline editing are good but many fields are not WYSIWYG and you also'd like to edit them inline.

3. Yeah, the weak point of extrafields is that they are global for entire table, you can't use them on specific category. On some sites it results into a mere hundred extrafields.

9. I'm sure this can be handled with CSS and merged into the plugin itself: https://github.com/trustmaster/cot-attach2/

13-15. You can attach files to anything that has an integer ID (categories have IDs too). But keep in mind Attachments does not have folders. Multi-upload for PFS has been a long awaited feature but nobody managed to integrate it there so far.

Contact me via PM if you want to discuss more details.

May the Source be with you!
tensh
#5 2013-03-01 08:10

1. I've been thinking about Editable of jEditable for normal fields and selects and CKE 4 for textareas (http://www.arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html or http://www.appelsiini.net/projects/jeditable). Your example looks great as well, but I think for the time being we might manage to make a plugin for inline edits that would not touch the core. At least that's what I think. But yeah, RESTfull interface is a great thing :)

ad 1. Specially for inline edits, I'm thinking about a module of custom blocks that can be placed in the site (and that then can be inline-edited). I think pagetextbyid plugin is too much of a hassle for this, I want something smaller (just a specific field in database, not whole page).

I didn't have time yet to start making it, but during this weekend I should come up with something.

Okay, I'll drop you a PM if I will have some questions :)

Added 1 weeks later:

Edit inline almost ready :) I'll finish it today at night or tomorrow.

This post was edited by tensh (2013-03-11 13:39, 11 years ago)
Trustmaster
#6 2013-03-11 16:27

Cool! Will you put it on GitHub when it's ready?

May the Source be with you!
tensh
#7 2013-03-11 18:32

I will try, I haven't used github yet :) Eventually you can put it there for me ^^

Added 5 hours later:

Here's work in progress ... I've got to ask you for some help ^_^

http://www.cotonti.com/datas/users/ajax_inlineedit_253.zip

1. Is HTML passed through HTML purifier in this plugin? I guess not? How can I sanitize it?
2. How can I localize messages in CKeditor plugin?
3. Are the permissions & security more or less okay?
4. There's an onblur notification reminding to hit the save button :) How to make it appear only if the data weren't saved? This puzzles me :)

TODO: jeditable page title.

Usage:

1. copy files (if you already have CKeditor 4.0, then copy only '\ckeditor\lib\plugins\ajaxsave\' plugin
2. if you test it on Nemesis default skin, copy the page tpls provided. If not:
- the div surrounding text in page must have following structure: <div class="textbox" id="{PAGE_CAT}_{PAGE_ID}">{PAGE_TEXT}</div>
- optionally you can add it also in page lists: <div class="textbox" id="{LIST_ROW_CAT}_{LIST_ROW_ID}">{LIST_ROW_TEXT_CUT}</div> (but of course the text cannot be cut :) )

That's it, it should be working.

This post was edited by tensh (2013-03-11 23:14, 11 years ago)
Dyllon
#8 2013-03-12 01:14

That is a pretty remarkable plugin. I have come across a bug in which the text doesn't save on occasion, but I can't seem to recreate it consistently. Other than that  it is coming along great!

We are what we repeatedly do. Excellence then, is not an act, but a habit.
tensh
#9 2013-03-12 07:26

Thank you! :)

I think I figured how to localize messages = I'll try to pass an array to ckeditor plugin with already localized messages.

As for onblur notification... maybe I'll create hidden div and change contents onkeyup, and also change contents on save-button click... I'll try to figure it out. I'm not that good in jQuery.

I'll also try to add onmouseover styles showing that area is editable.

Dyllon
#10 2013-03-13 03:38

Came a cross another bug. When editing a page that uses these characters   "   OR   '   it cuts off the rest of the text. I don't believe these can be passed through the javascript without causing a problem.

We are what we repeatedly do. Excellence then, is not an act, but a habit.
tensh
#11 2013-03-13 07:18

Thanks for feedback, I'll try to fix that. :)

Macik
#12 2013-03-13 12:03
#37201 tensh:

I will try, I haven't used github yet :) 

It's very simple - register on github. Download client for Windows or Mac. Load it. Login with you name-pass/ Select «Add repository», name it. Copy files to it, and «Sync» it with GitHub.

#37201 tensh:

Eventually you can put it there for me ^^

It's not a best way, because it needs someone upload new versions everytime you make any changes.

Added 5 hours later:

Here's work in progress ... I've got to ask you for some help ^_^

http://www.cotonti.com/datas/users/ajax_inlineedit_253.zip

1. Is HTML passed through HTML purifier in this plugin? I guess not? How can I sanitize it?

As you use 'HTM' filter in «editinline.ajax.php» it should be sanitized via HTMLPurifier in case you set HTML parser in cfg of you site ($sys['parser'] == 'html').

2. How can I localize messages in CKeditor plugin?

Use «lang» sub folder in plugins folder (see «a11yhelp» plugin for example).

3. Are the permissions & security more or less okay?

No. Rely on «c» parameter to check user ability for edit are wrong:
- page can be retrieved direct by specifying «id» or «al» parameter, and in this case inline editor not loading (example index.php?e=page&al=spoiler2804).
- page can be accessed with any category specified (example index.php?e=page&al=spoiler2804&c=any_cat_user_can_edit)

See «modules\page\inc\page.edit.php» for implementation. May be it required to transfer code from «rc» part to «header.first» (that hooks after page main) so you can use already some defined variables ($pag['page_cat']).

4. There's an onblur notification reminding to hit the save button :) How to make it appear only if the data weren't saved? This puzzles me :)

 

I'm not sure for crossbrowsing solutionm, but try to google this.

 

Some bugs, etc:


- widrh of editable block not match existing size of page text block, see pic 
- after pressing «templates» button on editor panel - getting blended screen with no dialog and without ability to press anything or exit this mode, see.pic
- some of markup are breaks on some image links (cant represent yet).
- «contenteditable» attr valid only in HTML5, and not valid in for example «XHTML 1.0 Transitional» (as in Nemesis skin) inspite of browsers are use it.

Добавлено 1 минуты спустя:

And you can open separate topic for discussing you plugin in «Extensions» section.

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
tensh
#13 2013-03-13 14:41

Wow, thank you for all the feedback! I'll do as suggested :)

P.S. Only one thing: "contenteditable" is a mechanic from CKEditor, I'm not sure if I can hack into it.

Macik
#14 2013-03-14 07:54
#37214 tensh:

Wow, thank you for all the feedback! I'll do as suggested :)

P.S. Only one thing: "contenteditable" is a mechanic from CKEditor, I'm not sure if I can hack into it.

«Contetnteditable» in source is HTML5 technilogy CKeditor «inline editing» is based on. See info

 

https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F
tensh
#15 2013-03-14 10:34

Oh okay, I just thought they made it for themselves :)

Added 5 days later:

I'll update the plugin after this weekend aroud wednesday (and create separate topic for it), now I'm preparing for a Tekken tournament at redfightdistrict.com ^^ Wish me good luck, it always helps, maybe I won't lose that badly ;)

 

Added 5 months later:

OK, I'm going back to this TODO list :) This time I'll have more time to work with.

This post was edited by tensh (2013-08-07 07:48, 10 years ago)