How to create a bookmarklet???
patchak - September 17, 2006 - 16:48
| Project: | Vote Up/Down Package |
| Version: | 4.7.x-1.x-dev |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi, I would like to create a bookmarklet that users could install so they can automatically post stories to my site while they are searching the web...
I know there is the code provided to use in the bookmarklet, but how do you actually create it??
Thanks

#1
Select the code and drag it to the bookmarkbar, or if you stucked with Internet Explorer, right click on it and add it as a favorite. It just a normal bookmark that happens to contains some JavaScript.
To make it easy for users you can add it as a link to your page, like I have done on http://vigillar.se/help/buttons (in Swedish but you get the picture). Like this:
bookmarklet
<a href="javascript:location.href='http://www.example.com/node/add/storylink?edit[url]='+encodeURIComponent(location.href)+'&edit[title]='+encodeURIComponent(document.title)">bookmarklet</a>#2
Thanks, I'll try that!!!
#3
#4
The bookmarklet does not seem to work with internet explorer, any ideas about that?
Thanks
#5
Should add that the exact same code works with firefox.. any ideas?
Thanks
#6
Did you change example.com to the address of your site?
#7
It works fine in IE6, can you state your version of IE?
#8
It seems to me that I have problems with ampersands (&).
If i use address http://www.example.com/?module=news&id=17 we'll have with
http://www.example.com/?id=1&module=news&- looks not correct!#9
I just posted a bug regarding this. If the person who clicks the bookmarklet is not logged in there is no way they can submit the link. Unless they login then go back to the other site then press it and come back, etc. I have been trying to fix this for the past 5 hours and nothing..
Help?
#10
I had to create a php hack with the user login system to get this to work. If anyone is interested...
#11
Mikestefff: could you post your fix to allow people to use the boormarklet even when they are not logged into the site??
Thanks,
Patchak
#12
Yeah I'd like to see the bookmarklet work as well!
#13
I've gotten my bookmarklet to work fine, but if I want it to popup in a new window, how do I do that? My current code for the bookmarklet is:
thanks