[drupal-devel] inline checkbox for attachements
Hi there, I am about to propose a solution to a client of mine for the attachments. She thinks the current system is **** horrible (well, in fact she said much more, but that is not poilite over the mailinglist) Amoungst the various options of additional modules (inline, img assist etc) I want to propose the Simple Solution too. Which would be another column in the attchements table for "inline". That would then call a theme function that gets a $node pointer passed along. y default all it will do is append image tags (if it is an image) or link tags, if it is a file to the article. That would be at filter time, so one will not see the HTML. I am: * Looking around first to find out how much chance that this makes it into core, since I will not "sell" a hacked core to this client. We have no proper hook to change that table, so maybe a third solution would be to introduce one. * Looking for additional ideas, on how to enlarge the chance this gets in core. * Thinking of how this will conflict with modules such as inline module. Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
On Fri, 17 Jun 2005, Bèr Kessels wrote:
Amoungst the various options of additional modules (inline, img assist etc) I want to propose the Simple Solution too. Which would be another column in the attchements table for "inline". That would then call a theme function that gets a $node pointer passed along. y default all it will do is append image tags (if it is an image) or link tags, if it is a file to the article. That would be at filter time, so one will not see the HTML.
upload_image does this (generate thumbnails from uploaded images). Also makes those images image nodes.
I am: * Looking around first to find out how much chance that this makes it into core, since I will not "sell" a hacked core to this client. We have no proper hook to change that table, so maybe a third solution would be to introduce one.
I have hidden the orignal table through css and generate my own. Not nice, I know, but works.
* Looking for additional ideas, on how to enlarge the chance this gets in core.
It would be nice to make the original table themable. I do not think we need an "inline" selector. Simply make all images inline. Cheers, Gerhard
Op zaterdag 18 juni 2005 08:32, schreef Gerhard Killesreiter:
upload_image does this (generate thumbnails from uploaded images). Also makes those images image nodes.
I know, but this is certainly not what I meant.What i want is show the current file inline in the current node. If i attach foo.jpg to node 32, i want it to show up in node 32, not in node 33. Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
On Sat, 18 Jun 2005, Bèr Kessels wrote:
Op zaterdag 18 juni 2005 08:32, schreef Gerhard Killesreiter:
upload_image does this (generate thumbnails from uploaded images). Also makes those images image nodes.
I know, but this is certainly not what I meant.What i want is show the current file inline in the current node. If i attach foo.jpg to node 32, i want it to show up in node 32, not in node 33.
node 32 will show the thumbnail of foo.jpg (node 33) below the body if you use upload_image. That is, if upload_image works as intended. I haven't tested it yet. :) Oh, and I also need some CSS for it... Cheers, Gerhard
A convenient way to use the Attachment feature to in-line images is a great idea. It may be, however, that we don't need to change the Attachment feature at all, only provide an input filter that knows how to find and insert image tags that reference attachments. The workflow of the actual upload is intuitive and easy (maybe with a link to more detailed how-to info for the perplexed). We can already de-list an upload which would be a requirement of typical in-lining use case. And the upload assigns an ordinal to the attachment that provides a convenient reference for in-line use. It would seem that all we need is an easy in-line reference syntax for the filter that doesn't collide with other input mark-ups. For example, __1__ double underscores and attachment number reference could be enough to insert an image on its own line. __2l__ and __3r__ could indicate left and right alignment of attachments 2 and 3 respectively. And for good measure, __1-alt text here__ could be used for adding an alt text attribute. To reduce complexity, we might default hspace and vspace attributes or provide a global admin setting. And if all that wasn't enough, advanced users might be able to use, for example, __1lh10v4-my picture__ to in-line attachment 1 image with left alignment, 10 pixel horizontal space, 4 pixel vertical space, and 'my picture' alt text. --Sohodojo Jim-- -- Jim Salmons and Timlynn Babitsky Founders and Research Directors Sohodojo - http://sohodojo.com
Hi Op zaterdag 18 juni 2005 15:53, schreef Sohodojo Jim:
It would seem that all we need is an easy in-line reference syntax for the filter that doesn't collide with other input mark-ups. For example, __1__ double underscores and attachment number reference could be enough to insert an image on its own line. __2l__ and __3r__ could indicate left and right alignment of attachments 2 and 3 respectively. And for good measure, __1-alt text here__ could be used for adding an alt text attribute.
This is what inline module does. Only ionline module uses the de-facto standard for drupal tookens: [inline: filename] [inline: numer] What I want is: 1 something in core. This is a very-often requested feature 2 something very intuitive. No tokens, no HTML, nothing, only a radio or checkbox. You might cvall my client stupid, but it took quite some time to let her grok the concept of the tokens. And still every now and again she has to look yup the syntax, or concept. That is simply Not Good. No-one should have to look up syntaxes, copy-pasrte filenames etc to insert stuff inline. Yes, Javascript, HTMLareas are an option too, but they live on the other side of the spectrum: they are so complex that that they strive way passed their goal: to simplify editing. HTMLareas etc often make editing harder then simple HTML. Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
On Sat, 18 Jun 2005, Bèr Kessels wrote:
Op zaterdag 18 juni 2005 15:53, schreef Sohodojo Jim:
right alignment of attachments 2 and 3 respectively. And for good measure, __1-alt text here__ could be used for adding an alt text attribute.
This is what inline module does. Only ionline module uses the de-facto standard for drupal tookens: [inline: filename] [inline: numer]
What I want is: 1 something in core. This is a very-often requested feature 2 something very intuitive. No tokens, no HTML, nothing, only a radio or checkbox.
<advert> upload_image does not even need a checkbox. :) </advert>
You might cvall my client stupid, but it took quite some time to let her grok the concept of the tokens. And still every now and again she has to look yup the syntax, or concept. That is simply Not Good. No-one should have to look up syntaxes, copy-pasrte filenames etc to insert stuff inline.
Requiring users to learn a new "language" or some tokens is a serious case of bad usability, nothing else. Cheers, Gerhard
Bèr Kessels wrote:
Hi
Op zaterdag 18 juni 2005 15:53, schreef Sohodojo Jim:
It would seem that all we need is an easy in-line reference syntax for the filter that doesn't collide with other input mark-ups. For example, __1__ double underscores and attachment number reference could be enough to insert an image on its own line. __2l__ and __3r__ could indicate left and right alignment of attachments 2 and 3 respectively. And for good measure, __1-alt text here__ could be used for adding an alt text attribute.
This is what inline module does. Only ionline module uses the de-facto standard for drupal tookens: [inline: filename] [inline: numer]
Thanks for the pointer to the inline module. This will be useful for some of the sites I am working on (although I might need to extend it for alignment/alt/hspace/vspace attribute specs mentioned in my prior note to this thread). SIDE-ISSUE: I try to scan modules to avoid 'reinventing the wheel' but Drupal is starting to "drown in its success" community contribution/sharing-wise. There are so darn many modules and our "laundry list by version" access method doesn't really help you to find what you need. A 'find' on the text of the page or a site-search is sometimes helpful, but both these methods are kind of hit-or-miss. Perhaps it is time to explore/revisit using a taxonomy vocabulary and one of the various taxonomy display modules to better organize and showcase Drupal modules/themes such as you have at Freshmeat or at the various OSS 'forge' type repository sites.
What I want is: 1 something in core. This is a very-often requested feature 2 something very intuitive. No tokens, no HTML, nothing, only a radio or checkbox.
A super simple in-lining of images would certainly be useful in some situations. But how would you control placement, alignment, and spacing without at least some minimal placeholder token? I would think that a demanding client who is opinionated about input issues would not accept anything less than total flexibility and control of the rendered content once input. Perhaps your client could learn to live with the inline module with the addition of a simple extended help message that includes a copy and paste-able inline token string. Or if the client allows Javascript, you might do a textarea help message that includes a link or button to insert the inline module syntax at the textarea insertion point. I am not trying to deter you from your search for a perfect solution, just trying to be helpful in finding a quick and easy solution for a "high maintenance" client that might work until you can provide the 'just right' solution. --Sohodojo Jim--
participants (3)
-
Bèr Kessels -
Gerhard Killesreiter -
Sohodojo Jim