Sep
30
2007
0

Hacking Quicktags: All Links Are Not Created Equal

Okay, next up: the link quicktag. On Needcoffee, we have internal links and external links. Internal links are just plain old links. External links open in a new window. I know that irritates a few people, but I have no idea why. You close the window and you're where you came from. Seems like a no brainer to me.

Anyway. Same deal as before:

1. Go to /wp-includes/js/

2. Edit quicktags.js

3. Look for this code:

edButtons[edButtons.length] =
new edButton('ed_link'
,'link'
,''
,''
,'a'
); // special case

(more…)

Written by Widge in: Wordpress | Tags: , , , ,
Sep
29
2007
0

Hacking Quicktags: One Image Directory, Under Eris

Okay, so here's some fun. At Needcoffee, we pretty much draw from a single directory for images. But if you do the IMG quicktag by itself, all you get is it asking you for the full URL. That's no fun. How can you hardcode the img directory in there?

Simple.

1. Go to wp-includes/js/

2. Edit your quicktags.js

3. Look for this code (I've killed some tabs just to keep it from being too wide for the theme):

function edInsertImage(myField) {
	var myValue = prompt(quicktagsL10n.enterImageURL, 'http://');
	if (myValue) {
		myValue = '<img src="'
		+ myValue
		+ '" alt="' + prompt(quicktagsL10n.enterImageDescription, '')
		+ '" />';
		edInsertContent(myField, myValue);
	}
}

(more…)

Written by Widge in: Wordpress | Tags: , ,
IT BURNS

This is me.

No, really.

I am a writer, poet, spoken word performer, actor, singer, improviser, content creation and idea machine, freelance iconoclast, and the internet's janitor that dispenses pop culture wisdom to the protagonist of your choice. I have seen too many movies, read too many comic books, and when the zombies finally come, I'm the one you want to call. I sure as hell won't answer the phone, but it's the thought that counts. I advise people on the net, websites and technology, because I know these things instead of having a life or sleeping.

If you like something I've done, donate to the Widge Wants to Kill His Day Job Fund. Or if you'd like to hire me for a job, my rates are terribly reasonable. We thank you.

Powered by WordPress. Theme: TheBuckmaker's Aerodrome.