\ForumHolder
ForumHolder represents the top forum overview page. Its children should be Forums. On this page you can also edit your global settings for the entire forum.
Synopsis
class ForumHolder
extends Page
{
- // members
- private static string $avatars_folder = 'forum/avatars/';
- private static string $attachments_folder = 'forum/attachments/';
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $allowed_children = ;
- private static array $defaults = ;
- public static bool $use_spamprotection_on_register = true;
- public static bool $use_spamprotection_on_posts = false;
- public static bool $use_honeypot_on_register = false;
- private static bool $currently_online_enabled = true;
- // methods
- public void getCMSFields()
- public void canPost()
- public void requireDefaultRecords()
- public string Breadcrumbs()
- public int getNumPosts()
- public int getNumTopics()
- public int getNumAuthors()
- public bool CurrentlyOnlineEnabled()
- public DataList CurrentlyOnline()
- public void LatestMember()
- public ArrayList getLatestMembers()
- public DataList getShowInCategories()
- public ArrayList Forums()
- public static String baseForumTable()
- public bool OpenIDAvailable()
- public void getRecentPosts()
- public static bool new_posts_available()
- public ForumHolder getForumHolder()
Hierarchy
Extends
- Page
Members
private
- $allowed_children
- $attachments_folder
- $avatars_folder
- $currently_online_enabled — bool
- $db
- $defaults
- $has_many
- $has_one
public
- $use_honeypot_on_register
—
bool
Add a hidden field to the form which should remain empty If its filled out, we can assume that a spam bot is auto-filling fields. - $use_spamprotection_on_posts
—
bool
If the user has spam protection enabled and setup then we can provide spam prevention for the forum. This stores whether we actually want the posting form (adding, replying) to have such protection - $use_spamprotection_on_register
—
bool
If the user has spam protection enabled and setup then we can provide spam prevention for the forum. This stores whether we actually want the registration form to have such protection
Methods
public
- Breadcrumbs() — If we're on the search action, we need to at least show a breadcrumb to get back to the ForumHolder page.
- CurrentlyOnline() — Get a list of currently online users (last 15 minutes) that belong to the "forum-members" code {@link Group}.
- CurrentlyOnlineEnabled() — Is the "Currently Online" functionality enabled?
- Forums() — Get the forums. Actually its a bit more complex than that we need to group by the Forum Categories.
- LatestMember()
- OpenIDAvailable() — Is OpenID support available?
- baseForumTable() — A function that returns the correct base table to use for custom forum queries. It uses the getVar stage to determine what stage we are looking at, and determines whether to use SiteTree or SiteTree_Live (the general case). If the stage is not specified, live is assumed (general case). It is a static function so it can be used for both ForumHolder and Forum.
- canPost()
- getCMSFields()
- getForumHolder() — Helper Method from the template includes. Uses $ForumHolder so in order for it work it needs to be included on this page
- getLatestMembers() — Get the latest members from the forum group.
- getNumAuthors() — Get the number of distinct authors
- getNumPosts() — Get the number of total posts
- getNumTopics() — Get the number of total topics (threads)
- getRecentPosts() — Get the latest posts
- getShowInCategories() — Get a list of Forum Categories
- new_posts_available() — Are new posts available?
- requireDefaultRecords() — Ensure that any categories that exist with no forum holder are updated to be owned by the first forum holder if there is one. This is required now that multiple forum holds are allowed, and categories belong to holders.