Drigg site configuration #4 - bookmarklet
Posted by: admin in site_development, tags: drigg, drupal, site_development, social ratingI wanted to provide users with a simple bookmarked script for submission of pages. See the discussion re this in the Drigg Forums.
I ended up using
javascript:q=(document.location.href);t=(document.title);s=(document.getSelection());void(open(’http://YOUR DRIGG SITE URL/node/add/drigg?url=’+escape(q)+’&title=’+escape(t)+’&body=’+escape(s),”,”));
The actual code entered (I placed this on my “about” page) is
<a href=”javascript:q=(document.location.href);t=(document.title);s=(document.getSelection());void(open(’http://YOUR DRIGG SITE URL/node/add/drigg?url=’+escape(q)+’&title=’+escape(t)+’&body=’+escape(s),”,”));”> Submit to Drigg</a>
(replace “YOUR DRIGG SITE URL” with .. well … and replace “Submit to Drigg” with whatever descriptive text you’d like)
note - the Input Format on the page in which this is embedded (see link below the Body field) will need to be “Full HTML” in order for this to work.
Users can bookmark this using a right-click (on a Mac, ctrl-click) and “save bookmark as”; or can drag this link into their bookmarks toolbar.
Clicking this bookmarked script when vising a webpage, will open your Drigg site in a new window, directly to a “submit scoop” page; if any text is selected on the webpage to be submitted, this is picked up & entered automatically in the Description field of your Drigg site. The page’s URL and Title are also automatically entered in their respective fields. If the item has already been submitted to the site, this will re-direct instead to the node on your site for the already-submitted item.
This only works if the user is already logged in to your Drigg site. If they are not already logged in, they receive an “Access denied” error, and will need to log in at that point. Since Drigg opened in a new window, the page-to-be-submitted is still open, and when that window is made active again, the bookmarklet can be used to successfully submit the page.
Table of contents for drigg site configuration
- Drigg site configuration - #1
- Drigg site configuration #2 - theme
- Drigg site configuration #3 - menus
- Drigg site configuration #4 - bookmarklet
- Drigg site configuration #5 - restrict registration
- Drigg site configuration #6 - addn’l modules
- Drigg site configuration #7 - authorship
- Drigg site configuration #8 - taxonomy tweaks
- Drigg site configuration #9 - related links
- Drigg site configuration #10 - promotion strategies
- Drigg site configuration #11 - string overrides
- Drigg site configuration #12 - to aggregate or not to aggregate …
- Drigg site configuration #13 - subcategories


Entries (RSS)