Wordpress Images

By admin | Jun 21, 2005

One of the things that intially frustrated me with wordpress was image placement. My old way of publishing photos wasn’t working correctly and so I decided to house the photos locally. I soon found out that uploading and placing photos was cumbersome. So, I decided to change that. Here was my solution. I simply made this change to quicktags.js. (You can find this file in the wp-admin folder for wordpress):

[js]function edInsertImage(myField) {
var myValue = prompt(’Enter the image file name’, ”);
if (myValue) {
myValue = ‘ + myValue
+ ‘” alt=”‘ + prompt(’Enter a description of the image’, ”)
+ ‘” align=”‘ + prompt(’Enter alignment for the image’, ”)
+ ‘” />’
+ ‘
‘;

edInsertContent(myField, myValue);
}
}
[/js]

This changes the way that the quicktag for img (image) operates. This allows you to: upload the file and specify a thumbnail, make a post, and click on the img quicktag and simply enter the information. I hard coded the file locations, so you will have to change it to the location of your image files. I really like this way of doing it.



Related Posts:

WYSIWYG Wordpress Editor
Joe Schmoe of Mudbomb has made a cool wysiwyg editor for wordpress. Instead of rehashing Joe's words, here they...

Wordpress 2
I just upgraded my blog to wordpress 2 last night. Here are my initial thoughts. The installation was simple. I...

Wordpress Triple Posting Problem
Ok, so I've been having issues lately. No, I'm talking about my computer silly. If you subscribe to...

Wordpress Hacked
Here's a news bulletin if you haven't seen it.  One of Wordpress' servers were hacked.  Code within the 2.1.1 release...

WordPress Cross Site Scripting Vulnerability
Hats off to Ashish for this tip! It seems that the National Vulnerability Database is referencing a WordPress Cross...

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

© 2007 PaulTech Network, - Daily Blog Tips Themes