Bookmarklets

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Then this here should work:

Code: Select all

javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(open('http://projekt.blangstrup.org/serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new&serendipity[title]=' + escape(document.title) + '&serendipity[body]=' + escape(bm) + '&serendipity[url]=' + escape(location.href), 'new_log_entry', 'resizable=yes, scrollbars=yes, width=750, height=420, location=yes, status=yes'));
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
davidcrickett
Regular
Posts: 83
Joined: Sat Oct 01, 2005 10:25 am
Location: Denmark
Contact:

Post by davidcrickett »

Thanks! Could you make it a plugin, so Serendipity users just have to draw and drop it on the bookmarks line of the browser - like in Pivot and other blog systems? (I can't get it to work like a normal bookmark). :roll:
read my serendipity blog
http://blangstrup.info
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

How would I make such a plugin? What should it do exactly?

Adding it should work quite easily. Create a webpage with this code:

Code: Select all

<a href="javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(open('http://projekt.blangstrup.org/serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new&serendipity[title]=' + escape(document.title) + '&serendipity[body]=' + escape(bm) + '&serendipity[url]=' + escape(location.href), 'new_log_entry', 'resizable=yes, scrollbars=yes, width=750, height=420, location=yes, status=yes'));">Bookmark me</a>
And then save that file as "test.html", view it in your browser, and bookmark that link. First you need to replace your URL to the real URL of course.

Ah, scrap that, how about this one:

http://spartacus.s9y.org/bookmarklet.html

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
davidcrickett
Regular
Posts: 83
Joined: Sat Oct 01, 2005 10:25 am
Location: Denmark
Contact:

Post by davidcrickett »

thnx! :)
later: It crashed my MIE 7, and didn't work in FireFox. But... ;) I think the url puts a 'projekt' in front of the url.
Later yet: Still crashes IE 7...
A very good idea, though!

I tried some other blog systems this week, seems I've nearly tried them all, and I still return to Serendipity, it's the best... :)
read my serendipity blog
http://blangstrup.info
Post Reply