Parley::Controller::Thread - Catalyst Controller


Catalyst Controller.



Adds a new thread to a specified forum


Take the logged-in user to the post after the last one they have viewed. If they haven't viewed any posts they should be taken to the first in the thread. If the last post they saw was the last in the thread they should be taken to the last post in the thread.


Reply to a post in an existing thread.


This action prepares data in the stash for viewing the current thread.

This action is used to add/remove a watch for a given thread



The guts of the process to add a new reply to an existing thread


The guts of the process to add a new thread/topic to a forum


Returns the post being replied to in a thread.


Increase the number of posts (by one) for a given thread


Inside a transaction, increase the number of views a thread has by one.


Set-up $c->stash->{page} and $c->stash->{page_range_spread} for the current thread. These are used by the pager in the templates (Page X of Y, etc).


Sets $c->stash->{watcher_count} with the number of people who have a watch set for the current thread.


Given a (new) post, update the values for the last post in the relevant thread and forum.


Called when someone makes a new post, increments the total number of posts made by the user, and updates the record of the last post they made.


Sets $c->stash->{watching_thread} with a true|false value indicating whether the current authenticated user is watching the current thread.



This method updates an existing record in the thread_view table, or creates a new one if it doesn't exist.

The timestamp value for the record (keyed on person-thread) is updated to the timestamp of the creation time for the last post on the page - unless the user has already viewed a page containing later posts.


Chisel Wright <>


This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.