Posted by bflora on February 10, 2009 at 3:11am
Jump to:
| Project: | Drigg External Vote Button |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
There should be lines in the Drigg button JS that will let the user insert hooks for the story title and story body.
So the js should look like this:
<script type="text/javascript">
url_site = 'url_goes_here';
title = 'title_goes_here';
body = 'body_goes_here';
</script>
<script src="http://www.windycitizen.com/sites/all/modules/drigg_external/js/button.js" type="text/javascript"></script>Then you'd need to add some lines to the .js file itself and the .module file to work with this new info and have it be in the URL as follows
http://www.domains.com.com/node/add/drigg/?url=url_goes_here&title=title...
That would make this already awesome button even cooler.
Comments
#1
I wonder if someone work this out!
#2
try this
url_site = document.location.href;
title = document.title;
similiat to bookmarklet

this version works for all the browser since getSelection() function broke with new IE vewrsions
let me know how it worls. I am having problems with my EVB with the latest version
--shqipsot
#3
missed bookmarklet code in the previous post
<a href="javascript:q=(document.location.href);t=(document.title);function getSelText(){var txt = '';if (window.getSelection){txt = window.getSelection();}else if (document.getSelection){ txt = document.getSelection();}else if (document.selection){txt = document.selection.createRange().text;}else return;return txt;};s=(getSelText()); void(open('http://www.shqipsot.com/submit?url='+escape(q)+'&title='+t+'&body='+s,'','resizable,location,menubar,toolbar,scrollbars,status'));" title="Posto ne shqipsot.com" alt="Posto ne shqipsot.com"><img src="http://www.shqipsot.com/files/logo_small.gif" alt="Posto ne shqipsot.com" /></a>