Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2017-01-14 19:29:01
- kirito
- Member
- From: Italy
- Registered: 2017-01-10
- Posts: 34
gas_img_popper: a new plugin for click-paste images in Write panel
Hello everybody,
I’m developing this new plugin, started studying upm_image_popper plugin. It seems that the former is not up-to-date (I’m on textpattern 4.6.2 by now) and not working on latest textpattern. Anyway, this plugin in pretty different. It adds a tab in the Write panel from which you can click-paste code for images directly to the body textarea.
Images can be filtered by category, with ajax requests. No images are loaded when opening the panel; the queries are sent only if you initialize the plugin choosing a category or clicking “View all”.
A Github repository is here.
Compiled plugin can be opened/downloaded clicking down here:
I’m not a programmer, this is a hobby for me, so don’t be too hard. :)
Please, someone let me know how it looks like and how it can be improved.
Thank you
Edit: See comment
Last edited by kirito (2017-02-01 17:07:24)
Offline
#2 2017-01-14 19:36:41
- kirito
- Member
- From: Italy
- Registered: 2017-01-10
- Posts: 34
Re: gas_img_popper: a new plugin for click-paste images in Write panel
I would like to implement paging when many images are present (more than 25 in the same category?), and filtering by time-interval. If someone would like to suggest a direction, it would be great.
Thanks.
Offline
Re: gas_img_popper: a new plugin for click-paste images in Write panel
Offline
Re: gas_img_popper: a new plugin for click-paste images in Write panel
Hi, Kirito has already requested a prefix. I’ll also fix up that doc page soon.
Offline
#5 2017-01-15 13:50:41
- kirito
- Member
- From: Italy
- Registered: 2017-01-10
- Posts: 34
Re: gas_img_popper: a new plugin for click-paste images in Write panel
Ok, I just found a bug: if the “alt” of images contains parenthesis, ex. !images/1.jpg(this is the alt (nested))!
, the textile parser goes mad, so parenthesis has to be escaped. The problems doesn’t exists for <txp:image /> tag, of course.
But I can’t think of a robust way to safely escape parenthesis. Ex. you could have an alt for image that is “fig. 1) this – fig. 2) that”, or contains emojis like “(n_n)”. You can escape some way if you do it manually, but I should automate the process. Any suggestions?
Offline
#6 2017-01-23 10:50:50
- kirito
- Member
- From: Italy
- Registered: 2017-01-10
- Posts: 34
Re: gas_img_popper: a new plugin for click-paste images in Write panel
v0.3 Update: I’ve removed (commented out) the button to paste textile image code, because it is not robust enough. Added button to paste <txp:thumbnail /> instead of <txp:image />.
Added from-to date filter (with jquery-ui datepicker plugin), “reset form” and “update” buttons.
Last edited by kirito (2017-01-23 10:55:18)
Offline