Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools

Comments

Comments

1. 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 List
593
3
2009-09-25 17:58:14
aaa
Anonymous
471
1
2008-09-25 12:35:16
Anonymous
2 Threads

Please login to create a new thread.



Powered by Sphene Community Tools