WordPress Hack: Upload From Post

This is a geeky thing, but I take a lot of code from the WordPress community and since I cobbled together a crappy solution I figured that I might as well share it.

Doing something as simple as adding an image is a pain in the ass. There’s an upload screen built in but, you have to leave the post to get there (or open a new window). What I did was make a pop-up link on the posting screen. When I click that it lets me upload and get back to my post. This is a read-me of sorts:

INSTALL:

1. Backup admin-header, edit-form, and edit-form-advanced,

2. Copy the 5 included files to /wp-admin

3. Done.

Changing of link layout or styles can be done in edit-form and edit-form advanced, in the Quicktag section

FILES:

1. _admin-header_: This contains the addition of Javascript to allow pop-ups of controlled size.

2. _admin-header-minimal_: this is a minimal header to keep the upload box simple

3. _edit-form_: This is where the link to the upload dialog is (in the Quicktag div)

4. _edit-form-advanced_: same as above, just for Advanced Posts

5. _upload-minimal_: This is a minimal version of upload.php to keep the upload box simple.

WordPress Post Upload Hack

RSS feed | Trackback URI

1 Comment »

2009-11-05 00:30:47

Very Recently, there has been a great deal of investigation by the
American FTC against blogs and website owners
for not stating their advertising profits, or existing
relationships with advertising agencies.

What are your personal ideas about how this could hurt
the blogging community?

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

email indi AT indi.ca.


Recent Comments


Sarath Fonseka And Minority Politics (2)

indi: I don’t consider him a racist, but he certainly wouldn’t have been seen as a minority champion, until he became a candidate

St. Fallen: Why are we accepting that he’s racist based on that statement? Fonseka is not a politician. What set him apart was the fact that he spoke uninhibited, which landed him in jail. I think he was brave to make a statement that he...

General Sarath Fonseka Out Soon? (2)

Jilebi: Isn’t SF a US Permanant Resident?

shammi: Great news. I didn’t believe it would happen. The general’s lung condition must be bad, and Mahinda knows that the people wont forgive him if anything were to happen to SF, and it was thought that he was denied proper medical...

Sri Lanka Has One Million ‘Extra’ Women (24)

shammi: You missed an apostrophe in girlfriends. Do we add it before or after the “s” ?

Ainsley Samarajiwa (1924-2012) (23)

Giules: Agreed. My deepest sympathies, Indi.

Rumesh: Hey bro, a writing of great depth and value just as the man himself. Growing up as a child through immense suffering and pain, I remember how seeya (I used to call him ‘loku seeya’) and of course aachchi cared for us and...

Kevin: Indi, my deepest sympathies. Please convey my sympathies to Aunty Evelyn.

The iPlayboy App. For The Articles (1)

Tharindu: It was very interesting to see Playboy mags of 50s and 60s….

Night Watch (7)

LC Perera: My deepest sympathies to you and family, Indi.

Sarath Fonseka And Minority Politics

I started off not really liking General Sarath Fonseka, him being part of the aggressive war effort. I didn’t support the war (largely cause I thought it would fail), and I thought Gotabhaya Rajapaksa and Fonseka were gleefully stomping everything. Fonseka even came out and said “I strongly believe that this country belongs to the Sinhalese but there are minority communities and we treat them like our people,” in 2008 (National Post). Then when he ran for President in 2010, he won mainly in minority areas. Which shows you how things can change.

General Sarath Fonseka Out Soon?

General Sarath Fonseka was arrested on a bunch of trumped up charges, but mainly for daring to threaten Mahinda in a Presidential election. Despite his poor health, Fonseka was arrested in February 2010 and sentence to three years. Word on the street now, however, is that he’ll be released soon. Like any day now. President Mahinda Rajapaksa has told the Hindu so, so it looks like the General will be out soon. Without his title, a proper house or much shot at power, but out still.

The iPlayboy App. For The Articles

I’ve been testing a lot of apps. A very interesting one is iPlayboy, from Playboy magazine. It’s bad porn but a good magazine, especially since you can read issues from its cultural heyday – the Mad Men era of the 60s.

Reading Comics Again (Marvel Comics App)

I’m going to get back to blogging. I buy a shitload of stuff on my iPad. Not that I like spending money, and the exchange rate terrifies me, but it’s just so easy, and so good. For example, I’ve been reading comics again. Spiderman, and Carnage. Except this time Spiderman is friends with Iron Man, and Carnage has boobs. Amazing. I’ve realized, however, that Marvel never ends stories. They are all cliff-hangers. Sequels are the business model. They’re such assholes money machines.