Page 1 of 1

Digg, entries.tpl and premature balding @_@

Posted: Wed Apr 09, 2008 10:03 pm
by Lithiumeon.com
OK, this will be a quickie for someone who has already figured this little thing out. How to I customize this so each article gets its own dignity? Right now I just tried my hand at it, and failed. All of the articles show my one dig!


Also, how can I put the Digg icon on the lower right of the entries? As of now, it's on the lower left. Is that in the CSS? and if so, what file and line would I have to modify?


here is my entries.tpl

Code: Select all


            <div class="entry">
                {$entry.body}
		<script language="javascript" src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
            </div>
       

If someone could give me a simple "paste here" plug that I could use to resolve this, I'll buy you a beer, or at least give some mad props :D

Thank you in advance!

-Aaron
-lithiumeon.com

Re: Digg, entries.tpl and premature balding @_@

Posted: Wed Apr 09, 2008 10:48 pm
by garvinhicking
Hi!

Have you had a loko at the serendipity_event_findmore plugin? This offers digg integration...

Usually you'll need to edit your entries.tpl template, have you tried editting it? Simply put things near or around where {$entry.body} occurs... :)

Regards,
Garvin

Posted: Wed Apr 09, 2008 11:06 pm
by Lithiumeon.com
Well, if you look at the bit that i posted, the digg .js is under the area you mentioned. I was just trying to see if anyone here knows how to inject specific entry name and url data into digg with that code.

The plugin seems to have broken digg integration. That's why I am doing this the hard way :P


-Aaron

Posted: Thu Apr 10, 2008 11:04 am
by garvinhicking
Hi!

Ah, okay. If you find out how digg does things now, we can fix the official plugin. I don't use digg, so I don'T know how their API changed...

Regards,
Garvin

Posted: Thu May 01, 2008 2:22 am
by abdussamad
Try adding this code below your entry body or wherever you want it displayed in entries.tpl:

Code: Select all

<script type="text/javascript">
digg_url = "{$entry.rdf_ident}";
</script>
<script type="text/javascript" src="http://digg.com/api/diggthis.js"></script>


Surround it with a div if you want styling:

Code: Select all

<div class="entry">
  <div class="digg_count">
   <script type="text/javascript">
    digg_url = "{$entry.rdf_ident}";
   </script>
   <script type="text/javascript" src="http://digg.com/api/diggthis.js"></script>
  </div>
 {$entry.body}                
</div>
And then in styles.css:

Code: Select all

.digg_count
{
float:left; margin:.25em;
}