Five dollar bookmarklet
PapaScott wants a better bookmarklet:
What I need is a million dollar authoring app so I can keep track of all those million dollar tags I can use. I don’t think a two bit bookmarklet is up to the job.
Actually, it doesn’t take a million dollar authoring app, just a few minutes hacking away at CMS.pm
You probably don’t want to always have your bookmarklet come up with a heavily marked up blockquote, so first make yourself a new bookmarklet for BlogQuote (you may need to rename the original first, so your browser doesn’t object to having two bookmarklets with the same name until you rename the new one). Edit the new bookmarklet (right-click, Properties) to add &bquote=1
to the URI that the window.open
will call (to avoid all the quotes out at the end, I put it right after the first parameter, so I’ve got ?is_bm=1&bquote=1&bm_show=trackback,
…).
Somewhere in the neighborhood of line 584 in MT 2.51, or line 623 in MT 2.6 in {your MT directory}/lib/MT/App/CMS.pm, you should find:
if ($q->param('is_bm')) {
$param{selected_text} = $param{text};
and just below that is the section that produces the stuff that will be inserted in your post from the “Post to MT Blog” bookmarklet:
$param{text} = sprintf qq(<a title="%s" href="%s">%s</a>\n\n%s),
scalar $q->param('link_title'),
scalar $q->param('link_href'),
scalar $q->param('link_title'),
$param{text};
Replace that with:
if ($q->param('bquote')){
$param{text} = sprintf qq(\n\n\n<blockquote cite="%s" title="%s"><p>%s</p>\n\n
<p class="cite">--<a href="%s">%s</a></p></blockquote>\n\n),
scalar $q->param('link_href'),
scalar $q->param('link_title'),
$param{text},
scalar $q->param('link_href'),
scalar $q->param('link_title');
} else {
$param{text} = sprintf qq(<a href="%s">%s</a>\n\n%s),
scalar $q->param('link_href'),
scalar $q->param('link_title'),
$param{text};
}
and you’ll get the default results (minus the redundant title attribute on the link, which I snipped out because I hate it) from your original bookmarklet, but the new one will give you
<blockquote cite="the link" title="the page title"><p>(the selected text)</p>
<p class="cite">--<a href="the link">the page title</a></p></blockquote>
You can choose your own way to arrange the pieces and parts of the quote and the links; just be sure to keep the scalar $q->param('whatever')
and $param{text}
in the order you want to have them replace the %s
‘s in the first line. Then with that out of the way, you can move on to the more difficult aspects of keeping up with Mark.
Hiya,
I’m wanting to slightly simplify the standard bookmarklet that is created when you tick none of the boxes in MT.
Here’s what I want to do.
Remove the blog box — there’s only one blog that all the users are associated with and I need to keep this as simple as possible. Remove the publish status box — the default is set to publish, and this is what they are always wanting.
Remove the text that gets automatically put in the textbox.
Any help greatly appreciated
Rachel
What about creating a bookmarklet that puts the title of the page you’re blogging in the ”Title” field?
Erm. You did both remember to subscribe to the RSS feed for this post and comments, didn’t you? I’ll get to it, or at least get to trying, but right now it looks like this weekend will be the earliest.
Any help — when you’re able to get to it — would make my day Phil :)
Is there any way to implement this sort of thing for the Blogger ”Blog this!” Bookmarklet as well?
Lazy Web in action
dedicated to the founding principles
http://slackerbit.ch/archives/2003/01/01/.html
Actually, it doesn’t take a million dollar authoring app, just a few minutes hacking away at CMS.pm –phil ringnalda dot
Multi-Dollar MT hacking
Actually, it doesn’t take a million dollar authoring app, just a few minutes hacking away at CMS.pm –phil ringnalda dot
Five Dollar Bookmarklet
About the time my New Year’s hangover was starting, Phie Ringnalda had come with a Five dollar bookmarklet in response to my authoring app post. While hacking the MT bookmarklet
(X)HTML Attributes used!
When Mark Pilgrim speaks, err! writes, the blogworld is listening. This time he’s playing with the <cite>-attribute, making automatic references
A million dollar pattern
Another idea for the lazyweb: Over at the Interactivetools.com Forum, I asked Can htmlArea help us do million dollar markup?
A better MT bookmarklet?
Source: phil ringnalda dot com: Five dollar bookmarklet This shows a way to change the bookmarklet behavior in MT.
imdb moveabletype hack
That last movie review post I made was the first one using a new system I hacked together to make
Why Yes, Those Are New Tweaks
I am not in the mood for news right now, in case you were wondering. It’s a beautiful, sunny day here in Hawai’i, which makes me disinclined to surround myself with the black clouds of headlines. However, like every beautiful, sunny day since I’ve move…