Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:20 am EST
Geeklog Forums
Digg/Del.icio.us links?
Yeraze
Anonymous
does anyone know of a plugin or layout hacks to add "Digg this" or "Add to del.icio.us" links to stories?
12
11
Quote
Status: offline
Chrispcritters
Forum User
Chatty
Registered: 05/11/05
Posts: 49
Location:Tustin, CA
I haven't had time to do any research into this, but I am interested as well.
12
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Shouldn't be too complicated to come up with something for digg.com at least. Here's a couple of bookmarks I collected if anyone wants to tackle it:
http://diggtheblog.blogspot.com/2006/07/integrating-digg-within-your-website.html
http://bill2me.com/digg-integrator/
http://www.intelliot.com/blog/archives/2006/04/02/digg-this-post-with-wordpress/
bye, Dirk
http://diggtheblog.blogspot.com/2006/07/integrating-digg-within-your-website.html
http://bill2me.com/digg-integrator/
http://www.intelliot.com/blog/archives/2006/04/02/digg-this-post-with-wordpress/
bye, Dirk
10
11
Quote
Laugh
Anonymous
I did start a Diggs implementation in the Rating Plugin. Though in it's current form (ver 2.1) it is unusable.
I plan on releasing version 2.2 soon which has a bunch of fixes.
I plan on releasing version 2.2 soon which has a bunch of fixes.
7
10
Quote
Yeraze
Anonymous
eek.. I looked into that and even tried the diggthis.js trick.. The problem is that the URL you have to specify for the "diggthis.js" script is not the URL to the page on yoru site, but the URL to digg's page referencing it.
I tried it, hacked it into my layout files (article.thtml) and it worked.. But I've got no clue how to convert local-URL to digg-URL, as it's based on the submitter's title, and if the page hasn't been submitted then you just get a nasty red "ERROR: Not found" block. Looks like you'ld have to somehow intelligently decide if the page has been submitted or not, maybe just by adding an extra "digg URL" field to the database..
It's not as easy as I'ld hoped.. if they keyed off the destination URL instead of the digg URL, it'ld be a breeze.
I tried it, hacked it into my layout files (article.thtml) and it worked.. But I've got no clue how to convert local-URL to digg-URL, as it's based on the submitter's title, and if the page hasn't been submitted then you just get a nasty red "ERROR: Not found" block. Looks like you'ld have to somehow intelligently decide if the page has been submitted or not, maybe just by adding an extra "digg URL" field to the database..
It's not as easy as I'ld hoped.. if they keyed off the destination URL instead of the digg URL, it'ld be a breeze.
11
9
Quote
Yeraze
Anonymous
Again, not as clean as I'ld hoped but I did come up with a plugin using the autotags syntax to make this work:
The following functions.inc file:
function plugin_autotags_digg ($op, $content = '', $autotag = '')
{
if ($op == 'tagname' ) {
return 'digg';
} else {
$diggurl = trim ($autotag['parm1'] . ' ' . $autotag['parm2']);
# $urltag = urlencode ($tag);
$thistag = '<a href="' . $tagSiteUrl . $urltag . '" rel="tag" class="taglist">'
. $tag . '</a>';
$thisblock = "<iframe src='http://digg.com/api/diggthis.php?u=".
urlencode($diggurl)."' height='82' width='55' align='right' frameborder='0' scrolling='no'></iframe>";
$content = str_replace ($autotag['tagstr'], '', $content);
$content = $thisblock . $content;
return $content;
}
}
?>
Will convert [digg:diggurl] into the nice digg button.. You can see it in use on VizWorld.com in the Sharp Aquos story. It's not as clean as I would like, but it does work.
The following functions.inc file:
Text Formatted Code
<?phpfunction plugin_autotags_digg ($op, $content = '', $autotag = '')
{
if ($op == 'tagname' ) {
return 'digg';
} else {
$diggurl = trim ($autotag['parm1'] . ' ' . $autotag['parm2']);
# $urltag = urlencode ($tag);
$thistag = '<a href="' . $tagSiteUrl . $urltag . '" rel="tag" class="taglist">'
. $tag . '</a>';
$thisblock = "<iframe src='http://digg.com/api/diggthis.php?u=".
urlencode($diggurl)."' height='82' width='55' align='right' frameborder='0' scrolling='no'></iframe>";
$content = str_replace ($autotag['tagstr'], '', $content);
$content = $thisblock . $content;
return $content;
}
}
?>
Will convert [digg:diggurl] into the nice digg button.. You can see it in use on VizWorld.com in the Sharp Aquos story. It's not as clean as I would like, but it does work.
8
6
Quote
Status: offline
Chrispcritters
Forum User
Chatty
Registered: 05/11/05
Posts: 49
Location:Tustin, CA
I think different people are wanting this plugin to do different things. I was looking for a plugin to display a "Digg This" on every article (or static) page that would allow users to add a dig to that article (or create the digg if it didn't already exist). I was able to make a block that would do it in the right or left columns but that's not the look I wanted so I just hard coded the button the the particular static pages. See: http://www.whatismyipaddress.com/staticpages/index.php/how-do-I-change-my-ip-address and you'll see the green dig button in the story. Which after reading the last comment is like what you are talking about.
9
9
Quote
Yeraze
Anonymous
Yeah, I plan to add a button like that to my website as well.. Tonight i'm gonna try to write a plugin to add in "Story Options" for "Digg This", "Add to Del.icio.us", and maybe a few others to the "Mail this story" and "Print this story". Always thought that box looked a little runty
I had kinda hoped the Digg API would recognize when you try to get a yellowbox for a page that isn't in their index, and give you a "Digg it" button, but it doesn't. It just errors out, surprisingly ungracefully.
I had kinda hoped the Digg API would recognize when you try to get a yellowbox for a page that isn't in their index, and give you a "Digg it" button, but it doesn't. It just errors out, surprisingly ungracefully.
11
10
Quote
Status: offline
9c1.us
Forum User
Newbie
Registered: 06/27/07
Posts: 2
Location:Hutchinson Kansas
The method I have used is just to edit storytext.thtml and featuredstorytext.thtml and place this code
<script type="text/javascript">
digg_url = '{article_url}';
digg_bgcolor = '#ffffff';
digg_skin = 'compact';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
<!-- End DIGG Code Here -->
I usually place it immediately before the icons for printing and emailing the story. This way it is out of the way yet easily seen and used - it lines up with the other icons very well.
Replacing with gives you a 16 x 16 icon instead of the compact Digg button, omitting it altogether gives you the large Digg button.
I just did this today on http://WichitaSucks.org
Text Formatted Code
<!-- Start DIGG Code Here --><script type="text/javascript">
digg_url = '{article_url}';
digg_bgcolor = '#ffffff';
digg_skin = 'compact';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
<!-- End DIGG Code Here -->
I usually place it immediately before the icons for printing and emailing the story. This way it is out of the way yet easily seen and used - it lines up with the other icons very well.
Replacing
Text Formatted Code
digg_skin = 'compact';Text Formatted Code
digg_skin = 'icon';I just did this today on http://WichitaSucks.org
9
8
Quote
All times are EST. The time is now 01:20 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content