Jump to content


Photo
- - - - -

Wish: Snippet to post etomite page url to social networks


  • Please log in to reply
8 replies to this topic

#1 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 04:15 PM

I'd love to have a snippet that you could add to a template that would display icons and properly-formatted links to allow a viewer to one-click post the page to digg, reddit, facebook, etc. Just like the WordPress sociable plugin. (http://yoast.com/wordpress/sociable/)

I think this would be extremely simple.

Generated links examples would be like this (depending on the individual site's submission link format):
  • http://delicious.com/post?url=http://www.etomite.com/thispage.html
  • http://digg.com/submit?phase=2&url=http://www.etomite.com/thispage.html
  • http://www.stumbleupon.com/submit?url=http://www.etomite.com/thispage.html


#2 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 04:17 PM

I'd love to have a snippet that you could add to a template that would display icons and properly-formatted links to allow a viewer to one-click post the page to digg, reddit, facebook, etc. Just like the WordPress sociable plugin. (http://yoast.com/wordpress/sociable/)

I think this would be extremely simple.

Generated links examples would be like this (depending on the individual site's submission link format):

  • http://delicious.com/post?url=http://www.etomite.com/thispage.html
  • http://digg.com/submit?phase=2&url=http://www.etomite.com/thispage.html
  • http://www.stumbleupon.com/submit?url=http://www.etomite.com/thispage.html


If any programmer wants to team up to build this, I'll do the images, output markup, and the CSS :)

#3 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 24 June 2009 - 04:46 PM

If any programmer wants to team up to build this, I'll do the images, output markup, and the CSS :)

something like this?
$returntext=<<<SBM
<div id="socialBookMarks"> 
<h3>Bookmark with:</h3> 
<ul>
<li class="delicious"> 
<a id="delicious" title="Post this story to Delicious" href="http://del.icio.us/post?url=$url&amp;title=$title">Delicious</a> 
</li>
<li class="digg"> 
<a id="digg" title="Post this story to Digg" href="http://digg.com/submit?url=$url&amp;title=$url">Digg</a> 
</li>
<li class="reddit"> 
<a id="reddit" title="Post this story to reddit" href="http://reddit.com/submit?url=$url&amp;title=$title">reddit</a> 
</li>
<li class="facebook"> 
<a id="facebook" title="Post this story to Facebook" href="http://www.facebook.com/sharer.php?u=$url">Facebook</a> 
</li>
<li class="stumbleupon"> 
<a id="stumbleupon" title="Post this story to StumbleUpon" href="http://www.stumbleupon.com/submit?url=$url&amp;title=$title">StumbleUpon</a> 
</li>
</ul>
</div>
SBM;
need to pass url and title as parameters, though for most uses these could easily be derived using makeurl and the title field directly.

Edited by mikef, 24 June 2009 - 04:49 PM.


#4 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 04:57 PM

something like this?

$returntext=<<<SBM
<div id="socialBookMarks"> 
<h3>Bookmark with:</h3> 
<ul>
<li class="delicious"> 
<a id="delicious" title="Post this story to Delicious" href="http://del.icio.us/post?url=$url&amp;title=$title">Delicious</a> 
</li>
<li class="digg"> 
<a id="digg" title="Post this story to Digg" href="http://digg.com/submit?url=$url&amp;title=$url">Digg</a> 
</li>
<li class="reddit"> 
<a id="reddit" title="Post this story to reddit" href="http://reddit.com/submit?url=$url&amp;title=$title">reddit</a> 
</li>
<li class="facebook"> 
<a id="facebook" title="Post this story to Facebook" href="http://www.facebook.com/sharer.php?u=$url">Facebook</a> 
</li>
<li class="stumbleupon"> 
<a id="stumbleupon" title="Post this story to StumbleUpon" href="http://www.stumbleupon.com/submit?url=$url&amp;title=$title">StumbleUpon</a> 
</li>
</ul>
</div>
SBM;
need to pass url and title as parameters, though for most uses these could easily be derived using makeurl and the title field directly.


Awesome... let me see what I can do with it...

#5 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 06:30 PM

I am 99% there...
Example: http://n-vent.com/audio-player.html

Just need to know how to produce the site name (for LinkedIN)... Mike, do you know that one? I could not find it in documentation...

#6 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 07:13 PM

I am 99% there...
Example: http://n-vent.com/audio-player.html

Just need to know how to produce the site name (for LinkedIN)... Mike, do you know that one? I could not find it in documentation...



Turns out it's $etomite->config['site_name']

(thanks Ralph)

#7 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 07:18 PM

All done- I'll post this snippet once I have triple-checked everything.

#8 cathode

cathode

    Loves Etomite Forums!

  • Staff
  • 663 posts

Posted 24 June 2009 - 07:50 PM

Final snippet posted here: http://www.etomite.c...?showtopic=8495

#9 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,790 posts

Posted 25 June 2009 - 11:21 AM

Take a look at the Twitter snippet I converted that you could also implement.. TweetThis




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users