Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Improving TXP Image Management
ahh, yeah, I get it.
That’s a great feature.
I hadn’t really used that in upm_img_popper tags much, but I see how that could work nicely. It would be nice to be able to specify one dimension and require the other to follow proportionately. Maybe that can be accomplished via the keyword idea you spoke of above?
Hmm. Now you’ve got me thinking.
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: Improving TXP Image Management
Some days ago:
I would suggest:
I merge my work to an plugin, that handles that AJAX-Tab loading and then we see how to go on.
I finished a very basic plugin, which handles AJAX-Tabs. The tabs only contain text.
I tested it wich Firefox 1.5 and IE 6.0, hope it works for you to.
While i have no help included, where a short description
It adds some lines of XHTML to the write screen:<pre><code> <p><a href=”#” onclick=“toggleDisplayAndLoad(‘bas_img_wizard’,‘selector’);”>Image Wizard</a></p> <div id=‘bas_img_wizard’ style=‘display:none’><div class=‘wrap’><div class=‘inner-wrap’> <ul id=‘navi’> <li id=‘nav-selector’ class=‘down’><a href=‘javascript:swapScreen(“selector”)’>Selector</a></li> <li id=‘nav-styler’ class=‘down’><a href=‘javascript:swapScreen(“styler”)’>Styler</a></li> <li id=‘nav-upload’ class=‘down’><a href=‘javascript:swapScreen(“upload”)’>Upload</a></li> </ul> <div id=’<b>bas_img_wizard_content</b>’></div> <img src=‘http://samisdat.org/images/84.gif’ id=‘loading’> </div></div></div> </code></pre>
Thats is all code which is loaded on client-side on start, the content is loaded by AJAX after a click on Image Wizard link.
If you have a look to plugin’s code, you see that every tab’s content is delivered by a seperate function . The tabs are loaded by the JS function swapScreen:
<code><a href=‘javascript:swapScreen(“tab”,“vars”)’></code>
tab defines the tab to load and vars are passed to the php tab function.
Please try it and give me some feedback.
Offline
Re: Improving TXP Image Management
Looks promising! It interferes with the bas image selector but you wouldn’t use both anyway.
Offline
Re: Improving TXP Image Management
Patrick,
Per this post above, perhaps enabling percentage as an option for width and height?
Bastian,
I’ll check out your plugin tonight! :)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: Improving TXP Image Management
@hakjoon:
>>As well as
title=, which tends to just display on hover, the ability to display a (stylable) caption for each image if required, probably from the text in thetitle=field
>It seems that this should be doable with CSS and Javascript without it being hardwired in the image tag.
True true, evidently I hadn’t thought it through properly last night. ‘Twas late.
I already use the JS/CSS idea on my (currently non-txp) website link over there <— The body triggers an onload which scans the page for img title= tags, creates a new DOM node containing the text and applies a style: CSS takes over from there. It works but there’s a slight delay if the image loads before the page has finished loading, the page is then scanned and the caption created. On slow connections (and if the image was floated) you’d notice the image appear, then the surrounding content would shift out of the way after the caption was added to the DOM structure.
In an ideal world, (X)HTML would support an img caption= attribute like the table tag has (please tell me if it does and I’ve missed it or if there’s a better way than the JS kludge). I just thought that if the txp:image tag was potentially being revamped then an ideal time to create a stylable caption would be by having an attribute caption=“1” or something in the tag itself. Then, instead of displaying the img tag thus:
<img src="blah.jpg" alt="alt_text" title="title_text" />
it could output summat like:
<img src="blah.jpg" alt="alt_text" /><div class="img_caption">title_text</div>
The downside is it would add a whole slew of attributes like caption_style/caption_wraptag etc and it might not be worth it. :shrug: was just an idea. If it has legs, great, if it doesn’t there’s always JS.
>>Support for reading the additional meta/EXIF data/file size/assigned category (or category tree)
>Do you mean reading the exif data on upload/import or using that data when displaying the images?
I envisaged the latter. So, for a photoblog you could maybe offer a nice collapsible “details” link that showed info like camera/ISO/shutter speed for interested geek… sorry, parties :op
The first idea gives nice scope for txp:related_images though, e.g. “hey, I like this picture: show me other images taken with a shutter speed less than 500ms.” Or is that pushing it a bit?!
@ma_smith/hakjoon: like the idea of the 3rd/4th/5th… image size. I’m currently using a thumb for article_lists, a medium size picture for article_images (showing details about the pic) and a full-size available for download. That means keeping track of at least 2 images that differ in only their dimensions. Doesn’t help if I want to offer downloadable desktop images at 1600×1200, 1280×1024, 1152×864 etc as well but that’s my cross to bear :-)
@Bastian: if I get a chance I’ll try your plugin out later on. Nice work.
Last edited by Bloke (2006-03-15 21:22:28)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Improving TXP Image Management
Bloke wrote:
I just thought that if the txp:image tag was potentially being revamped then an ideal time to create a stylable caption would be by having an attribute caption=“1” or something in the tag itself. Then, instead of displaying the img tag thus:
<img src="blah.jpg" alt="alt_text" title="title_text" />it could output summat like:
<img src="blah.jpg" alt="alt_text" /><div class="img_caption">title_text</div>The downside is it would add a whole slew of attributes like caption_style/caption_wraptag etc and it might not be worth it. :shrug: was just an idea. If it has legs, great, if it doesn’t there’s always JS.
that kind of the beauty of having it all be configurable via an output form. You could just have <txp:image> use a form like
<img src="<txp:img_url>" alt="<txp:img_alt>" /><div class="img_caption"><txp:img_caption>/<txp:img_title></div>
This actually opens up all sorts of possibilities without having to have a bunch of attributes for special cases.
Shoving is the answer – pusher robot
Offline
Re: Improving TXP Image Management
hakjoon wrote:
that kind of the beauty of having it all be configurable via an output form. You could just have
<txp:image>use a form like
<img src="<txp:img_url>" alt="<txp:img_alt>" /><div class="img_caption"><txp:img_caption>/<txp:img_title></div>
D’oh! Of course… genius! I’m with you on that 100% now the bulb has finally come on. You can tell I’ve only been using txp a month or two. Still not shaken the ol’ coding mindset.
I’ll crawl back in my box now…
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Improving TXP Image Management
Bloke,
I know that box only too well. You’re not alone bro.
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: Improving TXP Image Management
:briefly poking head out of his box again:
@Bastian: just ran your plugin. Sweeeeeeet. Can see awesome potential in that for image handling, and ultimately the same sort of framework for managing files/links. Keeps everything nice and contained and I like the fact it’s kind of “modal” : there’s no chance that li’l box will get ‘lost’ behind the main browser window like a standard popup would, which aids usability (1:click image link; 2:play in new box; 3:finish playing and dismiss box; 4:instantly back to article). Smart, clean and intuitive for both noobs and veterans alike, imho. Excellent job.
Ran fine in Firefox 1.5.0.1 and Opera 8.53 (build 7722) on win32.
:the box beckoneth once more:
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: Improving TXP Image Management
@maarten and Bloke: Thanks for testing
Next step would be to fill the tabs.
BTW: Is anybody working already on <img src="<txp:img_url>" alt="<txp:img_alt>" />?
I have something similar for my new page
I am using for example <txp:bas_image cat='a-cat' form='image-in-excerpt' />
Fetching all images form a-cat and parse them with image-in-excerpt. That form could contain:
<a href="<txp:bas_img_url />" title="Click to enlarge">
<img src="<txp:bas_thumb_url />" alt="<txp:bas_img_alt />" title="<txp:bas_img_name />" />
</a>
And it will output all thumbs from c-cat linked to enlarge.
Anyone interested or is that work done already?
Offline
Re: Improving TXP Image Management
Work’s not done yet. Some of it is in <upm_image> that comes with upm_img_popper That was more of an ideal example. Although except for the fetching everything in a category part this functionality is in <upm_image> already.
The stuff I outlined in the wiki was sort where I saw the logical progression of what Mary bstarted going. Looks like you had some of the same ideas.
BTW your plugin shell looks awesome. I’d love to help flesh it out.
Last edited by hakjoon (2006-03-17 02:24:52)
Shoving is the answer – pusher robot
Offline
Re: Improving TXP Image Management
Bastian schrieb:
I finished a very basic plugin, which handles AJAX-Tabs. The tabs only contain text.
@Bastian: I tested your plugin and I think it’s much better than any pop up window. I just don’t like the way the wizard is positioned and overlaping the write tab. Wouldn’t it be an good idea to open this new window the “lightbox way”? Overlaying the interface with a fading grey so that the user knows, that there is some kind of new windows where he has to do some actions. It look a little bit confusing to me the way it is now.
edit: For those who don’t know it yet – the lightbox way
Last edited by Skubidu (2006-03-17 08:48:14)
Offline
Re: Improving TXP Image Management
Not to break the party here but I seem to notice that the discussion in this thread has gone to plugin functionalities as opposed to proposals re the improvement of txp.
Quick suggestion. Get back to the subject of image management will ya??:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Improving TXP Image Management
Bastian, and Patrick,
Perhaps we could open either, a new thread for Bas_image_whatchacaller, or throw it up on the WIKI as a back and forth. I am really looking forward to seeing what you two come up with and how this might play into either a plugin or core.
Colak, good call.
I am really pleased about the responses thus far.
Patrick,
What would you say to a rough draft of a proposal in the next two weeks? I could start on one, and that way, even if it takes months, we’ve got something to start ammending?
Per peoples suggestions: I will be curious what decision will arise, regarding image uploading? The more I think about it, and the larger the system I work with, the more it makes sense to keep your image management separate from your “write” tab. But it would be a handy thing to create a scenario where one could easily upload 1 or 2 images to the appropriate place should there be a “lesser” need for robust image management, for say a small blog? What say you people? Bas/Hak, I am especially interested in how this might look/work with the AJAX plugin, but again, perhaps that is best discussed in new area, per Colak’s prompting.
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Re: Improving TXP Image Management
The more I think about it, and the larger the system I work with, the more it makes sense to keep your image management separate from your “write” tab.
I think you’re right with that. Perhaps it would be an option to focus on improving the image management on the write tab. For most users, it would help to have a shortcut on the write tab, any other things could be handled via a plugin (see Bastian approach). On one of my sites I’ve got 500+ images. I need the image tab to organize it, it would get very complex to manage these images on the write tab. If everything could be done on the write tab: Why should you have an image tab?!
Offline