Jump to content
MakeWebGames

[FAQ] Adding Social Bookmarks to your site


mdshare

Recommended Posts

Digg submission code

Digg does not allow complete automated submission, requiring some human interaction. There are two versions of the code: PHP and Javascript.

PHP Digg code

Using PHP, you can create the 'Digg this' link on the server before sending the page to the browser. The code is (all one line):

 

[url="http://digg.com/submit?phase=2&url=<?php echo urlencode("]">Digg this[/url] 

 

This produces this link: Digg this.

Of course, don't forget to change the http://criminalexistence.com to your domain name!.

Javascript Digg code

The Javascript Digg code was first released by Weston Campbell. You can use it as a bookmarklet: just drag the link to your bookmark toolbar. A simplified version of the code is:

 

[url="javascript:location.href='http://digg.com/submit?phase=2&url='+encodeURIComponent(document.location.href)+' '"]Digg this[/url] 

 

del.icio.us submission code

del.icio.us is a very popular social bookmarking service. Its link submission system is similar to Digg's. Again, we have PHP and Javscript codes.

del.icio.us PHP submission code

The PHP code to submit to del.icio.us is:

 

[url="http://del.icio.us/post?v=2&url=<?php echo urlencode("]&title=<?php echo urlencode($PAGE_TITLE);?>" title="Post to del.icio.us">Post page to del.icio.us[/url] 

 

Note the $PAGE_TITLE variable. This needs to be changed to the page's actual title. If you are using blog software or a content management system (CMS), you might find that this variable is already present, but called something else. If not, you can submit the page without a title, but this forces the user to type it in. In this case, the code will be:

 

[url="http://del.icio.us/post?v=2&url=<?php echo urlencode("]" title="Post to del.icio.us">Post page to del.icio.us[/url] 

 

Which produces this link: Post page to del.icio.us. Notice the difference?

Again, change criminalexistence.com to your domain name!

del.icio.us Javascript submission code

The Javascript code is more straightforward:

 

[url="javascript:location.href='http://del.icio.us/post?v=2&url='+encodeURIComponent(document.location.href)+'&title='+encodeURIComponent(document.title)+' '"]Post to del.icio.us[/url] 

 

Furl posting code

The Furl submission code is similar to the del.icio.us code above.

Furl PHP code

 

[url="http://www.furl.net/storeIt.jsp?t=<?php echo urlencode($PAGE_TITLE);?>&u=<?php echo urlencode("]">Post page to Furl[/url] 

 

Again, notice the $PAGE_TITLE variable. Unlike using the del.icio.us, if you do not provide a link title, Furl automatically sets it to 'untitled'. You may want to avoid that

Furl Javascript code

 

[url="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&t='+encodeURIComponent(document.title)+' '"]Post to Furl[/url] 

 

Netscape.com

Recently (in 2006), Netscape.com introduced a Digg-like interface for its homepage, along with submission URLs.

Netscape.com PHP code

 

[url="http://www.netscape.com/submit/?T=<?php echo urlencode($PAGE_TITLE);?>&U=<?php echo urlencode("]">Add this page to Netscape.com[/url]

 

Netscape.com Javascript code

 

[url="javascript:location.href='http://www.netscape.com/submit/?U='+encodeURIComponent(document.location.href)+'&T='+encodeURIComponent(document.title)+' '"]Post to Netscape.com[/url]
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...