Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: stm_image_uploader: directly upload images from Write tab
Lookin’ good there Mr iblastoff; an insanely useful update. Those options sound fine, and if the uninstall removes the prefs it adds, it’ll be even better. If you crack that I may even steal borrow your code and use it in a future plugin of mine :-p
Either way I can assure you I’ll be within the first 10 people to download this sucker and put it through its paces… top job, sir.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: stm_image_uploader: directly upload images from Write tab
Steve
Great work. I’m glad to see this plugin being improved again. May I add one item of feedbac and ask one question?
My feedback relates to location on the page. I hacked my current version of the plug in to display to the left hand side of the page. (If I remember correctly, it displays under the article and except text areas by default?). zem_event also displayed there, and I had lots of white space on the sides with my computer screen, so it was more efficient and convenient (for me) to relocate it. My suggestion is that rather than going for a longer page to scroll, it might be more convenient for others as well. fwiw only. ;)
My question: I’m running a fairly recent version of 4.0.5 ( (r2750). With that update I had a change in function with this plugin. The iFrame is suddenly not logging in with the rest of the webpage. I tried logging in through the iFrame. The plugin then showed up correctly. However, after I had logged the plugin/iFrame, I could not save my article (cookie conflict or something – I think the message was along the lines of “cookie didn’t match” or some such thing). I logged out, and then back in via the main browser window. The iFrame was logged out again. I left the plugin/iframe logged out. The article saved. Problem – As long as I leave the plugin iFrame logged out, I can save articles. Log it in, and I can’t.
My question is: are you developing off of the release version of 4.0.5, or a more recent revision? Has anyone else had any problem, or is my computer (or maybe its me) losing touch with reality? :)
Thanks
Mike
Last edited by maverick (2007-12-23 23:26:36)
Offline
Re: stm_image_uploader: directly upload images from Write tab
Steve,
All I can say is WOW!
I thought for sure this would find itself in a watery grave with a ton of other “almost amazing” plugins.
This is a big leap forward for handling images. Thank You!
Cheers Mate!
—
Tom
Offline
#40 2007-12-24 01:28:20
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: stm_image_uploader: directly upload images from Write tab
maverick wrote
I had a change in function with this plugin. The iFrame is suddenly not logging in with the rest of the webpage. I tried logging in through the iFrame. The plugin then showed up correctly.
Yes I remember I had the same problem but – at least until now – it showed up only when logging from my computer at work (not when logging to the same site from home). Anyway I’m sorry I have no idea what can be the cause.
iblastoff
Thank you for adding plugin preferences. It’s a nice addition.
Besides, I don’t want to bother you too much but I have another question: I’m using upm_file to associate single or multiple files with an article (it creates a custom field similar to “article image” but for files).
I don’t know if you ever used this plugin but in case do you think it could be easy to hack stm_image_uploader in order to have a similar functionality for files?
Offline
Re: stm_image_uploader: directly upload images from Write tab
thanks for the encouragement all!
ok so i got the preferences to be installable/uninstallable via the backend. kept wondering why i was getting two sets of textpattern headers showing up and found an extra pagetop() somewhere. gah! seems to work just fine now though.
does anyone have any recommendations as to how it should be styled? working within the iframe might be a little limiting and i’m trying to find a method to automatically size the iframe based on its content. i’m not too familiar with javascript as a whole though. here is how the iframe is rendered in the plugin:
var iframe = document.createElement("iframe");
iframe.id="pictures";
iframe.border = "0";
iframe.src = "http://'.$GLOBALS['prefs']['siteurl'].'/textpattern/index.php?event=picture_upload_form";
iframe.style.width = "100%";
iframe.style.height = "165px";
iframe.style.border = "none";
p.appendChild(iframe);</script>';
what i would like to do is add an onload attribute to that iframe but i’m not sure how. it would seem to make sense that i could simply do iframe.onload = but that doesn’t seem to work.
as for some of the issues:
maverick: i’m using the ‘official’ 4.0.5 build to test the plugin but i also have an up-to-date svn dev version of pre-4.0.6 and have tested on that as well. i haven’t seen any noticable differences in their functionality in regards to this plugin.
i do remember once when i used to use the plugin it would give me a hiccup or two very similar to what you were experiencing (as in sometimes i would have to actually log in via the iframe) but i havent seen it happen again thus far. this was on the ‘official’ 4.0.5 version of txp. i really have no idea what would cause that. i also wonder if the file upload form could just be slapped on there via javascript rather than javascript + iframes but thats beyond the scope of what i’m trying to do at the moment.
as for the location of the form, i’m keeping it to the bottom by default for now. where exactly did you place it on the left side? within the advanced options toggle? somewhere else? maybe i could include that as a preference instead.
redbot: i’m not familiar with upm_file but i can see how something like stm_*file*_uploader would be handy. i’ll take a look at it once i wrap this up a bit more.
Last edited by iblastoff (2007-12-25 11:35:54)
Offline
Re: stm_image_uploader: directly upload images from Write tab
jameslomax wrote:
Excellent!
This is working for me, whereas dzd_upload_image isn’t.I also think the location of this, in the center column, is much more balanced.
Can just a little more be added though? – you still have to navigate to the Images page, to assign an image category – so the plugin is convenient, but it isn’t more efficient.
If you can assign a category to the image when you upload it, that will be great!
update: now have the ability to assign image category on upload.
(can be turned off/on via preferences of course)
Last edited by iblastoff (2007-12-25 04:06:56)
Offline
Re: stm_image_uploader: directly upload images from Write tab
Looking really great. But were si download link?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#44 2007-12-25 18:11:38
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: stm_image_uploader: directly upload images from Write tab
ibalstoff wrote
i also wonder if the file upload form could just be slapped on there via javascript rather than javascript + iframes
I am wondering the same thing…
i’m not familiar with upm_file but i can see how something like stm_*file*_uploader would be handy. i’ll take a look at it once i wrap this up a bit more.
great!
update: now have the ability to assign image category on upload
excellent!
Thank you for your work Steve. You added a lot of new features to stm_image_uploader to the point it is now a different plugin. Should I call it lam_image_uploader?
Offline
Re: stm_image_uploader: directly upload images from Write tab
iblastoff wrote:
maverick: sometimes i would have to actually log in via the iframe) but i havent seen it happen again thus far. …. i really have no idea what would cause that.
Thanks for the feedback. I may have it working. On a chance it had nothing to do with Textpattern or any plugins, I went into Mac’s Keychain and deleted all the passwords that had accumulated for that site. So far (just a short time), its working as advertised again. The problem on this website only began this past week, but I have had a number of sporadic password issues since upgrading to OS X 10.5.x.
i also wonder if the file upload form could just be slapped on there via javascript rather than javascript + iframes but thats beyond the scope of what i’m trying to do at the moment.
On paper that sounds like an more elegant solution :)
as for the location of the form, i’m keeping it to the bottom by default for now.
No problem – I just wanted put the idea out there.
where exactly did you place it on the left side? within the advanced options toggle? somewhere else? maybe i could include that as a preference instead.
At the moment, if you are looking at the left column, the list is: Textile Help, Insert Link, Advanced Options, Recent Articles, and then Pictures Upload (stm_image_uploader). I had tried putting it under Advanced Options, but decided against it. I often alternate floating my images left or right, so I place the image in the article using Textile with whatever class I need at the moment. I don’t often use the advanced options or the image associated to article option. I do use Recent Articles often; When I tried stm_image_uploader in Adv. Opt. and expanded Adv. Options, Recent Articles was far enough down the page I needed to scroll. Placing the image uploader under Recent Articles means I rarely need to scroll.
If its a useful option to others to add a location preference, cool. If its just me, I can easily continue to manually customize it.
Thanks
Mike
Offline
#46 2007-12-26 01:39:50
- Sono Juventino
- Member
- From: Skedsmo, Norway
- Registered: 2007-12-22
- Posts: 81
Re: stm_image_uploader: directly upload images from Write tab
ibalstoff wrote
i also wonder if the file upload form could just be slapped on there via javascript rather than javascript + iframes
How about php include? I don’t know shit about plugin devlopment, but that would be the best solution I think.
One suggestion. Will it be possible to add thumbnail hight and width in forms and choose forms with a drop down menu? I don’t know if that is even possible, but that would be really great. My site uses different sizes on news. At the moment, I’m letting the css hack down the image size, but it’s of course not a good solution because it’s hard on the server.
Just a suggestion. ;)
Offline
#47 2007-12-26 15:22:14
- Joey
- Member
- From: Netherlands
- Registered: 2005-01-19
- Posts: 257
Re: stm_image_uploader: directly upload images from Write tab
Great to see all the progress here, thanks! When will the updated plugin be available?
Regards,
Joey
Offline
Re: stm_image_uploader: directly upload images from Write tab
as soon as i can figure out how to completely get rid of the border around the iframe that keeps showing up in IE6.
tried everything from:
iframe.setAttribute("border","0");
iframe.setAttribute("frameborder","0");
iframe.style.border = "none";
iframe.border ="0";
iframe.border = "none";
and none of them get rid of it. bah! border doesn’t show up for any other browser. annoying as hell. if anyone has any ideas!
anyway i added a few more preferences to the backend:
Last edited by iblastoff (2007-12-26 18:55:32)
Offline