Comments
Comments1. sphene.sphcomments
The main aim of the "Comments" module is to make it easy to attach a forum category to your own modules.
2. Requirements
3. Activation
After setting up all requirements simply add sphene.sphcomments to your INSTALLED_APPS. Afterwards run 'syncdb' and create a new category of type 'Comments Category (sphcomments)'. This is all that is needed to activate comments for the wiki module.
4. Usage for your own models
It is very easy to use the comments module for your own models. Simply follow the guide in 'Activations' to activate the application, and then adapt the template for your model:
(replace 'mymodel' with the model instance in your template.)
{% load sphcomments_extras %}
{% load i18n %}
<div class="comments">
{% sphcomments_load_infos mymodel %}
<h2>{{ threadlist.get_object_count }} Comments</h2>
{% if user.is_authenticated %}
<p>{% include "sphene/sphboard/_category_monitor.html" %}</p>
{% endif %}
{% if threadlist.get_object_count %}
{{ threadlist }}
{% else %}
<p>{% trans "No comments yet." %}</p>
{% endif %}
{% include "sphene/sphboard/_new_thread_link.html" %}
{% endsphcomments_load_infos %}
</div>
This is exactly how the wiki is currently using comments.
5. Feedback
Since the Comments application is still a very young application i would appreciate any kind of feedback on how to improve it, or if you encounter any problems with it. Simply head over the the forums and post your feedback - Thanks!
Tags:
Last Modified: 2008-05-13 21:37:36 by Herbert Poul - [ Snip Changes ] [ Wiki History ]
2 Comments
Customize ListPlease login to create a new thread.