This is as days pass by, by Stuart Langridge

And this is Recent comments, written , and concerning Uncategorized

A recent comments list is a neat innovation that lots of people are using (Burningbird has a set of instructions for MT). Seemed like a nice idea, so here's some instructions for doing the same with Vellum.

You need to create a template for recent comments, tell Vellum to build said template, and then include the built file somewhere on your pages.

First, the template, in vellum/templates/recentcomments.tmpl:


<%
COMMENTS_TO_DISPLAY = 8
import vellum.plugins.audience,vellum.Entry

comments = vellum.plugins.audience.all_audience()
comments = filter(lambda x:x.type=='comment',comments)

comments.sort(lambda x,y:cmp(y.posted,x.posted))

print '<ul>'
for c in comments[:COMMENTS_TO_DISPLAY]:
  e = vellum.Entry.get(c.entryid)
  print '<li>%s on <a href="%s#au%s">%s</a></li>' % (c.ref,e.permalink,c.id,e.ti
tle)
end
print '</ul>'
%>

(this has changed from my original posting: use this version, because it doesn't have to individually load all the entries from disk, which is very very slow indeed.)

Next, tell Vellum to build the template. Go to the configuration screen for your weblog ("Configure" from the front page) and, in the templates section, add a new template:

  • Template name: Recent comments
  • Template filename: templates/recentcomments.tmpl
  • Permalinks to here: [leave unselected]
  • Permalink expression: [leave blank]
  • Sort expression: [leave blank]
  • Output page: "recentcomments.html"
  • Page header: "Recent Comments"

(the quotes in the last two are important!)

Now, rebuild your weblog. You can include the recentcomments.html file somewhere, but bear in mind that, owing to Vellum's funky caching, it won't be there until it's requested specifically. I get around this by having the "include" from my main page actually do an HTTP request to localhost to get the file.

Comments

sil

The thought occurs that if you use a template to build your front page (which I don’t) then you can just include the above code in the front-page template and that’s all you have to do, which is a lot easier. :-)

Yogesh D

Dear Yahoo Team,

Hi i am not able to change my mobile no from yahoo msg.I cannot delet it also.I have tried to chng by following steps:-Msg - preferences - General - Edit mobile device (new window is open with link http://mobile.yahoo.com/) cliked on mobile web, selected country and entered my new no.But still my old no is displayed.If possible please mail me on my id deshpandeyogesh01@yahoo.com

Plzzzzzzzzz help me.

Regards

Yogesh D

Ragunath S Masti

Hello,

Please help me to change my mobile no in yahoo messenger. Previously i was using hutch and now i changed to Airtel please help me in this regard.

Ragunath S Masti

Change ur mobile no by deleteing the old ones

Regard

Harish

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.