
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.
If you would like to make a comment, please fill out the form below.
Recent Comments