A brand new way of commenting that is a humble mix between normal (Jot) comments and a Forum where people can make custom threads.
It helps if you look at
Nimja.com/comments
Some of the features:
- Have -readable- threads with minimized information.
- Have custom discussions in your comment system, created by Anonymous and registered users.
- View the last X comments, per ’subject’ or ’user’
- Helps users more clearly see where other people have been reading things, urging them to investigate themselves.
- Comments made for a specific page can (and do) back-link to the page itself.
- Really shines when content is based on many children for a parent (for example, Frozen Youth on Nimja.com has 5 children, 4 of which have 100 pages, people wouldn’t look at reactions if they had to wade through each page, while people who are reading can still quickly go to all the comments of a specific page)
- Can be combined with user profiles, showing ’unread threads’ (including the number of new posts)
- Contains editing and (only for the site admin) deleting.
Is it completely done?...
Well, not really. The user rights are very simplified, using a simple function to check if a user has the right to do certain things based on ’is it his post, is he site admin’. And it’s only been used for me, I really need a lot of people looking at it before I would consider it to be useful for a mainstream site.
(I’m already quirky, so it’s doable)
Included is the files(zipped) needed to run this
The files should end up in assets/snippets/threads/*
And to give some additional example I’ve included the "snippet_content.php" here, which includes the snippets you have to create to make this work.
<!--
Threads, by Nimja.com
v1.0 - Basic release after a month of testing.
v1.1 - Minor bugfixes, changed template to work better with IE (damnit), added install function.
Threads is a class with many uses, some of them are displayed here, see the install snippet on how to setup the tables.
Threads_Install
Installs/configures the required tables. Execute this (once) before running Threads.
Threads - Main Snippet uses just the 'run' function and exports into placeholders
[+threads_title+] - Main title (comments or the title of a page), also contains the back-link in a 'span'
[+threads_subtitle+] - subtitle.
[+threads_form+] - Form that users fill in, currently based on horizontal.
[+threads_message+] - Div that appears when people make mistakes in the form, can be placed in the form chunk.
[+threads_content+] - Actual comment output, includes pages for the listings.
Threads_Link - Provides a link below the page with comment count and direct link.
Threads_Unread - Provides a list of unread threads.
A thread is unread when a user has commented in the thread and someone else has replied later.
!-->
<?php
//Snipper: Threads_Install
//You should only execute this once.
require_once($modx->config['base_path'].'assets/snippets/threads/threads.inc.php');
$threads = new Threads();
return $threads->install();
?>
<?php
//Snipper: Threads
//Main snippet for use on the comment page.
require_once($modx->config['base_path'].'assets/snippets/threads/threads.inc.php');
$threads = new Threads();
return $threads->run();
?>
<?php
//Snippet: Threads_Link
//Provides a link to the specific thread, if any, in the comments and a count.
require_once($modx->config['base_path'].'assets/snippets/threads/threads.inc.php');
$threads = new Threads(1); //ID of the comment page.
return $threads->threadLink();
?>
<?php
//Snippet: Threads_Unread
//Show the last 20 threads(page 1) a user has participated in that someone else has replied on.
//(essentially: unread threads of relevance)
require_once($modx->config['base_path'].'assets/snippets/threads/threads.inc.php');
$threads = new Threads(1); //ID of the comment page.
return $threads->showUnread(20,1);
?>