Disqus comment integration

15 views
Skip to first unread message

craayzie

unread,
Feb 5, 2011, 11:08:28 AM2/5/11
to Radiant CMS: Dev
I couldn't find any info on the best way to generate the
disqus_identifier within Disqus' javascript embed. I'm a complete n00b
so please bear with me.

I think using the epoch timestamp of when the page was created makes
the most sense and I installed the Back Door extension allowing me to
put Ruby code directly into templates (so I could generated that
timestamp) but I'm still not clear on how to save that timestamp when
an article is created initially and then reference that saved
timestamp within the page (basic ActiveRecord stuff right?). Seems
like I need to make some DB changes (i.e. update the page model w/ a
new created_epoch_timestamp field and then reference that field within
the page?

Am I over-engineering/thinking this? Is there an easier way to
integrate w/ Disqus? Thanks in advance for the help :P

Benny Degezelle

unread,
Feb 6, 2011, 3:39:41 PM2/6/11
to Radiant CMS: Dev
there's no need for all that :)

pages have a 'created_at', 'published_at' and 'updated_at' timestamp
by default.
you can easily show these with a radius tag;

<r:date format="%s" />

which returns the time the current page was published or created on in
strftime fashion.
for more info, click 'Available Tags' on the page edit screen, and
type 'r:date'

Fima Leshinsky

unread,
Feb 6, 2011, 4:03:34 PM2/6/11
to radiant...@googlegroups.com, Radiant CMS: Dev
Thanks for replying! Exactly what I was looking for :)

> --
> Radiant CMS Dev Mailing List
> Post: radiant...@googlegroups.com
> Unsubscribe: radiantcms-de...@googlegroups.com
> Group Site: http://groups.google.com/group/radiantcms-dev/

Reply all
Reply to author
Forward
0 new messages