Page 1 of 1

Dynamic post Url tag

Posted: Thu Jan 04, 2007 8:56 pm
by eightgr
Hi!

I'm wondering how I must call the Dynamic post Url tag to include the new feedburner stat code . Here are some explanition from feedburner :

There are two pieces of data you need to insert in this tag before it will work on your blog:

Your feed URL. Here it is: http://feeds.feedburner.com/~s/ItsArtMa ... areAndMore

Dynamic post URL. Use one of your blog’s template tags to dynamically insert the URL of the current post. (E.g. Blogger uses <$BlogItemPermalinkURL$>; Movable Type uses <$MTEntryPermalink$>.)

Code example is :
<script src="http://feeds.feedburner.com/~s/ItsArtMa ... T-URL-HERE" type="text/javascript" charset="utf-8"></script>

Any Idea of what POST-URL-HERE must be in Serendipity case?

It can also be useful to promote Serendipity on feedburner because they give example for a lot of blogging platformexcept Serendipity :-(

Best

Patrice

Re: Dynamic post Url tag

Posted: Thu Jan 04, 2007 11:24 pm
by garvinhicking
Hi!

In that case you need to edit the feed*.tpl template files in your template (if they don'T exist, copy the ones from templates/default/ into your theme dir).

There at the place of this code:

Code: Select all

{$entry.feed_body|@escape} {$entry.feed_ext|@escape}
You can place this instead:

Code: Select all

{$entry.feed_body|@escape} {$entry.feed_ext|@escape}

<script src="http://feeds.feedburner.com/~s/ItsArtMagazineNewsDigitalArtAnimation3d2dVideoGamesSoftwareAndMore?i={$entry.feed_entryLink|escape:url}" type="text/javascript" charset="utf-8"></script>
(You might need to "encode" the <script> thing so that it uses the HTML entities for the < and > characters (> and <), otherwise you might get XML errors from your feed.

That's just one of the many ways to solve this. A plugin might also inject this string into the RSS feed...but that's a bit more lines of code ;)

Best regards,
Garvin

Posted: Fri Jan 05, 2007 9:05 am
by eightgr
Hi!

I'm not sure it's all about feed as it's a new feature which track the site stats and not the feed. I think the code must be implement one of the pluggin which writes codes at the top of the content of the serendipity page .
So In this case what the POST-URL-HERE is ?

<script src="http://feeds.feedburner.com/~s/ItsArtMa ... T-URL-HERE" type="text/javascript" charset="utf-8"></script>

Posted: Fri Jan 05, 2007 12:54 pm
by garvinhicking
Hi!

Please read what I wrote. It can be solved in the template easiest. :) :)

Regards,
Garvin

Posted: Fri Jan 05, 2007 1:37 pm
by eightgr
garvinhicking wrote:Hi!

Please read what I wrote. It can be solved in the template easiest. :) :)

Regards,
Garvin
Hi!

I've done the changes in the feed templates. Thanks for the trick.

What I was wondering if this code doesn't onlmy affect the XML ? Because this new Feedburner feature Goal is aim to track the website and not the feed. It's a code wich must be put inside each html page, like a google analytics one (that's what I've understood, bu perhaps I'm wrong)

Patrice

Posted: Fri Jan 05, 2007 2:40 pm
by garvinhicking
Hi!

Hm, I thought that this FB service only affected the RSS-Feed. If you need to do both, you can insert a similar code into your entries.tpl file, around where $entry.body is emitted.

HTH,
Garvin

Posted: Fri Jan 05, 2007 2:57 pm
by eightgr
You can have a look at this service here :

http://blogs.feedburner.com/feedburner/ ... ence_1.php

I will see if I got some results in the next 48 Hours, I keep you update.

Patrice

Doesn't work

Posted: Sat Jan 06, 2007 1:47 pm
by eightgr
Hi!

I still have no stat in the new Feedburner Dashboard about the website.
So it probably means that the feed.tpl modification has'nt affect the site stat.

Don't you think I must put this code in a head nugget with a right variable set up for the page url ?

best

Patrice

Re: Doesn't work

Posted: Mon Jan 08, 2007 11:02 am
by garvinhicking
Hi!

In your RSS feed

http://feeds.feedburner.com/ItsArtMagaz ... areAndMore

I don't see the "script" tag in your entries. Didn't you edit the right feed*.tpl file?

Regards,
Garvin

Posted: Mon Jan 08, 2007 2:23 pm
by eightgr
Here's what I got in my feed*.tpl :

{if !empty($entry.body)}
<content:encoded>
{$entry.feed_body|@escape} {$entry.feed_ext|@escape}

<script src="http://feeds.feedburner.com/~s/ItsArtMa ... escape:url}" type="text/javascript" charset="utf-8"></script>
</content:encoded>
{/if}

Inside the folder of the folder I use.

Best

Patrice

Solution

Posted: Tue Jan 09, 2007 5:45 pm
by eightgr
Here the Solution :

I've added an Html Nugget with this code :

<script src="http://feeds.feedburner.com/~s/ItsArtMa ... rydata.url}" type="text/javascript" charset="utf-8"></script>


And the Feeds Burner site stat works...

So just replace ItsArtMagazineNewsDigitalArtAnimation3d2dVideoGamesSoftwareAndMore
with your own feedburner feed name and it works.

Posted: Sun Jan 21, 2007 9:02 pm
by zoran
I'm probably not looking at the right place, but ...

I've added

Code: Select all

<script src="http://feeds.feedburner.com/~s/zorankovacevic?i={$entrydata.url|escape:url}" type="text/javascript" charset="utf-8"></script>
to

Code: Select all

/templates/kubrick/entries.tpl
in the div where $entry.body is written.

In the source I only get empty $entrydata.url's. Obviously, they don't show up in the stats :)

I've also tried the HTML nugget, but the PHP does not get parsed.

Any ideas?

Best regards,
Zoran

P.S.: Reading the discussion, I assume it should not be placed in the feed*.tpl
P.P.S.: For anyone interested, the FB explanation is here.

Posted: Mon Jan 22, 2007 3:14 pm
by garvinhicking
Hi!

{$entrydata} is AFAIK not available in that scope. Try to use {$entry.link} instead?

HTH,
Garvin

Posted: Mon Jan 22, 2007 4:27 pm
by zoran
Thanks Garv, as usual :)

I now have added this in the div in the entrytext div (Kubrick template):

Code: Select all

<script src="http://feeds.feedburner.com/~s/zorankovacevic?i={$entry.link|escape
:link}" type="text/javascript" charset="utf-8"></script>
It now appears on home and on entry detail pages.

Not sure if the counting is correct. If not, I'll report back.

If this is the way to go, I'll inform FB that their s9y instructions are wrong.

Seems to work

Posted: Tue Jan 23, 2007 8:26 pm
by Scrapinette
Hi all !


Many thanks to have discussed this subject just at the time I decided to use Feedburner. I followed Zoran's advises and added the code in entries.tpl file of my template just before the </div> corresponding entrytext. As far as I can see Feedburner has begun to count visits... :-)