Re: Hosted Comments for Upstreamed Blog
Georg Bauer <gb-BRhJDZTO+/[email protected]> Wed, 25 Feb 2004 19:34:49 +0100
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <r02010100-1028-4BB764B867C111D8A891000A9573A72A@[10.0.0.145]> |
Hi!
> I'd like to consider (not sure yet, given all the comment-spamming,
but
> nonetheless) providing support for comments in my blog. Is it possible
> to set up my pages to allow taking advantage of hosted comments (e.g.,
> at pycs.net)? If so, is this something to just configure (i.e., did I
Yes and no. There is no automatic way to set it up, as the code is
currently still missing :-)
But you can do it manually. Just go to PyCS.net and create a user (there
is a link on the main page for user creation). Note the links and codes
you get. Now edit the WeblogRendering.tmpl and search for the comment
code stuff. The template checks for comment availability with the
following code:
#if $upstream.get('prefs','cancomment')
$macros.weblogCommentsLink($post.id, $post.pubtime, $category)
#end if
#if $upstream.get('prefs','cantrackback')
$macros.weblogTrackbackLink($post.id, $post.pubtime, $category)
#end if
You just need to change that code to links that make use of your new
comment URLs. You can check the needed code in any existing PyDS blog.
You replacement code should look something like this:
<a class="reference"
href="##INSERTCOMMENTURL##&p=$post.id&link=$post.guid"
onclick="window.open (this.href, 'comments', 'width=515, height=480,
location=0, resizable=1, scrollbars=1, status=0, toolbar=0,
directories=0'); return(false);" title="Click here to comment this
post">comment [<script type="text/javascript"
language="JavaScript">commentCounter('$post.id')</script>]</a>
<a class="reference" href="##INSERTTRACKBACKURL##&p=$post.id"
onclick="window.open (this.href, 'trackbacks', 'width=515, height=480,
location=0, resizable=1, scrollbars=1, status=0, toolbar=0,
directories=0'); return(false);" title="Click here to see the trackbacks
for this post">trackback [<script type="text/javascript"
language="JavaScript">trackbackCounter('$post.id')</script>]</a>
You need to enter your comment url instead of ##INSERTCOMMENTURL## and
your trackback url instead of ##INSERTTRACKBACKURL##
bye, Georg