Dynamic post Url tag

Discussion corner for Developers of Serendipity.
Post Reply
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Dynamic post Url tag

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Dynamic post Url tag

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Post 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>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Post 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
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Doesn't work

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Doesn't work

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Post 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
eightgr
Regular
Posts: 66
Joined: Thu Oct 27, 2005 5:52 pm

Solution

Post 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.
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

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

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
zoran
Regular
Posts: 71
Joined: Sun Jan 16, 2005 9:13 pm
Location: Amsterdam
Contact:

Post 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.
Scrapinette
Regular
Posts: 15
Joined: Fri Dec 08, 2006 11:02 am
Contact:

Seems to work

Post 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... :-)
Post Reply