Hi & thank you

leemiller - September 19, 2007 - 13:20

Hi,

and and a big thank you to the creators of this brilliant program, Drupal rocks!!

I have begun a project which is social bookmarking orientated but based upon articles as a run a couple of article sites. I have spent weeks looking on the net and on the Drupal site for answers but to no availe so I'm sorry in advance if this question is too basic for you guys.

I am looking for script/code similar to codes that the mainstream bookmarking sites use, i.e. the bit of code or widget that you copy and paste onto your site so that visitors can bookmark to them.

Obviously it would be silly for me to run a sbm site where surfers are unable to bookmark too!!

best regards,

Lee

Add a block under

panis - September 19, 2007 - 14:26

Add a block under Administer->Site Building->Blocks with something like:

<script>
function bookmark(){
  var url = window.document.location;
  var title = window.document.title;
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}
</script>
<a href="javascript:bookmark()">bookmark us</a>

enable the block in your theme at the appropriate region.

Sorry not bookmark, social bookmark.

leemiller - September 19, 2007 - 15:35

Sorry my friend I think maybe I didn't explain myself properly.

Thank you for the reply.

What I need is code that.

Always links back to 1 specific site. e.g. You go to one of my other sites or anybody elses for that matter, which has my snippet of code in it. The visitor clicks the link and it then saves it to their account at my primary site. Just like what happens when you see something you like you diggit!

Hope this explains better?

LM :-)

You need something like

voidberg - September 19, 2007 - 19:15

You need something like prepopulate installed: http://drupal.org/project/prepopulate
This allows you to do something like: http://example.com/node/add/link?title=Page%20Title&body=Body%20contents which is the link people have to click to go to your site with the article info prepopulated in the form.
--
Alexandru Badiu
Web: http://www.voidberg.org
YM: voidberg / Skype: alex.badiu

Thank you.

leemiller - September 19, 2007 - 23:52

Alexandru,

many thanks, I will invetigate further,

Lee

I've got half way

leemiller - September 20, 2007 - 20:04

Hi,

sorry in advance I'm a newbie to this programming stuff!!!

Would I be right in presuming that I am going to have to create a clone of the submit story node but prepopulate it with link?title=Page%20Title&body=Body%20contents details?

Lee

Fields not completed?

leemiller - September 20, 2007 - 20:35

Hi,

have got thus far and it takes me to the correct page however none of the field are being auto completed. I have enabled prepopulate for story.

code used:

a rel="nofollow" style="text-decoration:none;"
a href="http://bookmark.articleheaven.co.uk/drupal-5.2/?q=node/add/story/link?title=Page%20Title&body=Body%20contents"
img style="padding-bottom:1px;" src="http://articleheaven.co.uk/lion.jpg" alt="Add to: Bookmark Heaven" name="BH" border="0" id="BH"

Seems strange, however with little skill in this area I just guessing!!

Lee

 
 

Drupal is a registered trademark of Dries Buytaert.