The Ukiyoe CMS


Adding a comments section

This page has a comments section powered by maiko.

To add some comments, you'll first have to run a maiko instance (please read the tutorial for instructions). Note that comments lie outside the scope of ukiyoe's search function.

Once that's done, add the following line to your page template:

% include('comments.tpl', topic=metadata['topic'])

Configure the template comments.tpl in the ukiyoe/static/ directory. Basically, just make sure maiko_topics_path and maiko_topic_url are properly set. By default the values are:

% maiko_topic_path = '/tmp/maiko/topics/%s' % (topic,)
% maiko_topic_url = 'http://localhost:9393/%s#add_item' % (topic,)

Change /tmp/maiko/topics/ and http://localhost:9393/ to be the proper path and URL, respectively.

Access the maiko forum and add a topic. If you don't want commenters to make new topic (i.e. comment section) simply set CONFIG['allow_new_topics'] to be False. Remember that comments can be held for moderation and reviewed using the mmod.py script (see the tutorial).

Finally, add the following key pair to the .uki article metadata headers:

topic: #####

where ##### is the topic number (if it's the first it'd be 00000).

That's it, you have a comments section.

Comments

(click here to contribute, will open a new tab)

Comment #00000   by marco
06:40PM 02/Jun/2015

A sample comment