uploading pictures/photos with the P2 theme?
-
The P2 theme is great!
For a team that is working on a more image focused project, is there an easy to way upload photos from the front page posting interface?
-
Not yet. But we’re hoping to integrate this feature soon.
Please hurry!! LOL
I’ve been doing my best to hack apart the QuickPress… learned a little about the TinyMCE that WordPress uses… And now my brain hurts. Been working on this for about a week.
I hope you have made some progress.
And, noel – THANKS DUDE! You ROCK.
Guess what?? I got “something” like this working!!! Woooo hoooo. After a long time of playing and learning… and yet so much more to learn!!!!
It’s a bit of a hack and I haven’t released it into my production site yet. Want to clean it up a bit. I’ll post back here when I’m ready to show it off!!! LOL… and will probably have to anwer a LOT of questions for you guys!
The jist of it: I found a php upload/resize script (actually about 20 of them and played with each and took the best parts of them). I found a Javascript onclick and rewrote to update the TEXTAREA with the <img src….> once a picture is chosen. After you choose a picture (providing the right extension (jpeg,gif, png,etc) it automatically uploads it and renames it to a random name, to the designated folder (whose link is what gets put in the TEXTAREA)… that was tricky, passing variables between PHP JS and PHP again…. pretty cool, though. Oh, and it resizes it, too, maintaining aspect ratio… it’s all code I found all over the place, but I modified it a TON… but I will try to keep all their names on it…
So – now that I got a “working” thing…. I would like to present some better ideas about it… or upgrades to it already… Yeah – I’m already upgrading it!
* Choose a file, but if you decide to choose a different picture after seeing your litte thumbnail preview (oh yeah, i have that working, too!) it needs to delete the file that got uploaded (automatically) or you could potentially fill up space if ppl choose the wrong pictures a lot… I have someone’s code that already do this, but need to adapt it to mine.
* So, I don’t like how the PICTURE is added… i don’t like the <img src…blah blah> added in the TEXTAREA. The TEXTAREA should be where you might have a description of the picture or something… I don’t ppl to see HTML code!!! YUK — How about a new field? I mentioned this in a previous posting somewhere. TITLE, PICTURE, TEXTAREA, TAGS, CATAGORY, etc. (and let them have a CHOICE as to what fields they want! I just want PICTURE and TEXTAREA.. and maybe TITLE)
* Also, I can’t allow for ppl to start typing in the TEXTAREA before they add the picture, or the JS onclick won’t update it! Sux. Of course, if the previous idea is implemented, this problem goes away. Right now, i get around it by not DISPLAYing the TEXTAREA DIV. So all you can do is add a picture, with no description/text. I cannot expect “normal” ppl to understand the <img src….> piece and they could mess it up…
* put the resized picture in the DB? Maybe… There’s some ppl that have already written that code, too. I just need to learn more about MYSQL… and then adapt the DB for WordPress, and figure out the previous items, and drink a lot of beer…….
Sounds amazing!
Some forums lets people add pictures and files and these gets added at the very bottom of the post. Either just a thumbnail or a link to the file. You can’t edit it that much and would fit with not showing the HTML side of it.
The bad thing about it is that you can’t have text picture text. You’ll just have to accept that the file/picture goes to the bottom.
I could live with that. ??
Keep it up!
OK – DONE:
https://www.womendrinkingbeer.comCreate a user and give it a try.
I’m going to look into “combining” textareas at submit… somehow…
I would REALLY just like to have “image” as a separate field… and the textarea would be a description. Then I could format the description around the picture, below, above, or whatever… as a separate DIV.
Hmmm… seems to have an issue with IE6… will have to resolve later, or encourage users to upgrade to a modern browser made in this decade!!
Sorry to upload a non-drinking-woman-picture. ?? Just had to try it out.
It’s very cool but perhaps not super-intuitive for non-techies. If you could have a regular P2-postbox and add a picture/file next to tags that would be fantastic. I’m not sure of the limitations to your model. But this seems to be very picture-posting-centric.
Thanks for showing that it’s possible!
Tore
Tore – Takk for ? prove!
(ja – jeg prate litt Norsk! … men vet jeg at du er Svensk…)SO, yes… there’s a LOT of work left… I’m huge on making things intuitive and user friendly. That’s mainly why I put BETA in the title…
I actually don’t like the way it works right now, but just wanted to throw it out there to spark some interest. It should be changing a lot in the next week or so.
Sounds fantastic!
(Haha! Roligt! ?r du fr?n USA?)
Jeg er Amerikansk. Mor min er Norske. Jeg har snakket litt hele livet og har bodde in Norge mange ganger, og gikk p? norske skole et ?ret der… 20 ?r siden!! S? har jeg glemte masse!!!
(Ah! D? f?rst?r jag. Vad kul att du bott i Norge. ?nd? imponert att du beh?llit s? mycket av ditt modersm?l! Sj?lv ?r jag nog ?nd? inte alls lika bra p? att f?rst? norska som du. Det har sina likheter med svenskan men en hel del andra ord. S?rskilt att l?sa norska ?r sv?rt.
:))
OK Everyone. I have a FULL working Prototype… with one caveat – it doesn’t exactly work in Firefox!!! Yeah yeah, I know. That’s a real problem!
The caveat: well it DOES work in FF if you access the form itself directly. I have the link on my webpage, in the top.
Oh – and it’s BETA, so still needs to be pretty-fied!
dlopeman that’s impressive. Now the question is how can I get this on my p2 themed blog?
Dwarshak – it looks like we have 2 threads of the same topic going on here… I’m trying to keep the other one on top!! But that’s cool – here we are.
Yes – Since my last post up above I have made quite a bit of progress. My effort has been going for a few months now. That FF issue above is resolved… in fact I pretty much have it all working in FF, IE6&8, Opera 10, Safari ?, and Google Chrome.
Also, you should know, that Noel (theme author) has also been making progress and announced that he will be releasing this feature in the next version, with the WP 2.9 release. Just glancing at his code, I think he’s going to use the backend media links/engine already in WP… which is smart. I tried that first, but had no luck. So I re-invented the wheel. It also gave me the freedom to modify how it acts. I eventually want to REMOVE the backend completely from public view.
My work has really just been HEAVY modifications of the P2 theme and a culmination of several upload, resize, ajax-like scripts… and then hacking the crap out of them to make them as cross-browser as possible. I don’t know what the GPL GNU or whatever licensing stuff is or what I have to do to make it “right.” I think I left everone’s names intact except for one guy who had funky characters in his name which I removed in case it was playing havoc with stuff I was doing. Purely a troubleshooting tactic on my part.
I mentioned to Noel in another post that I could sent him my stuff. I could probably do the same for anyone.
- The topic ‘uploading pictures/photos with the P2 theme?’ is closed to new replies.