Go to the source code of this file.
This module is the redeveloped version of Paul Booker's OG Forum module. This module comes with the name "OG Forum Reloded" - OGFR.
Definition in file og_forums.module.
| enum PRIVATE_DEFAULT |
Constant to define the publicity of a forum.
Definition at line 15 of file og_forums.module.
Constant to define the publicity of a forum.
Definition at line 20 of file og_forums.module.
| enum PUBLIC_AUTO |
Constant to define the publicity of a forum.
Definition at line 25 of file og_forums.module.
Constant to define the publicity of a forum.
Definition at line 30 of file og_forums.module.
| og_forums_help | ( | $ | path, | |
| $ | arg | |||
| ) |
Implementation of hook_help().
Definition at line 35 of file og_forums.module.
| og_forums_perm | ( | ) |
Implementation of hook_perm().
Definition at line 58 of file og_forums.module.
| og_forums_menu | ( | ) |
Implementation of hook_menu().
Definition at line 65 of file og_forums.module.
| og_forums_menu_alter | ( | &$ | callbacks | ) |
Implementation of hook_menu_alter().
Definition at line 143 of file og_forums.module.
| og_forums_form_alter | ( | &$ | form, | |
| &$ | form_state, | |||
| $ | form_id | |||
| ) |
Implementation of hook_form_alter().
Definition at line 159 of file og_forums.module.
References og_forums_get_vid(), og_forums_gid_from_tid(), og_forums_is_public(), and og_forums_set_og_group_context_from_tid().
| og_forums_group_type_load | ( | $ | arg | ) |
Wildcard loader function.
Definition at line 316 of file og_forums.module.
References og_forums_get_forum_container(), and og_forums_is_public_all().
| og_forums_block | ( | $ | op = 'list', |
|
| $ | delta = 0, |
|||
| $ | edit = array() | |||
| ) |
Implementation of hook_block().
Creates a block to display forum information for a group.
Definition at line 346 of file og_forums.module.
References og_forums_get_forum_container().
| og_forums_access_privileges_1 | ( | $ | gid | ) |
Access callback.
Definition at line 426 of file og_forums.module.
References og_forums_is_admin().
| og_forums_access_privileges_2 | ( | $ | gid | ) |
Access callback.
Definition at line 438 of file og_forums.module.
References og_forums_is_admin().
| og_forums_access_privileges_3 | ( | $ | gid, | |
| $ | tid | |||
| ) |
Access callback.
Definition at line 449 of file og_forums.module.
References og_forums_forum_limit_reached(), and og_forums_is_admin().
| og_forums_public | ( | $ | gid, | |
| $ | tid | |||
| ) |
Set a forum as public, and its container as well.
| $gid | The group ID of the forum. | |
| $tid | The term ID of the forum. |
Definition at line 466 of file og_forums.module.
References og_forums_get_forum_container().
Referenced by og_forums_taxonomy().
| og_forums_private | ( | $ | gid, | |
| $ | tid | |||
| ) |
Set forum as private, and its container if no other forums in it are public.
| $gid | The group ID of the forum. | |
| $tid | The term ID of the forum. |
Definition at line 501 of file og_forums.module.
References og_forums_get_forum_container().
Referenced by og_forums_taxonomy().
| og_forums_reset | ( | $ | gid, | |
| $ | tid | |||
| ) |
Reset forum to default of PRIVATE_DEFAULT, and its container if no other forums in it are public.
| $gid | The group ID of the forum. | |
| $tid | The term ID of the forum. |
Definition at line 544 of file og_forums.module.
References og_forums_get_forum_container().
| og_forums_manage | ( | $ | gid | ) |
Let group managers manage their forums.
_og_forums_no_forums_message()
| $gid | An group ID. |
Definition at line 584 of file og_forums.module.
References _og_forums_manage_breadcrumb(), _og_forums_manage_row(), _og_forums_no_forums_message(), _og_forums_ogterms(), og_forums_forum_get_parent(), og_forums_forum_limit_reached(), og_forums_get_group_forums(), og_forums_get_tree(), og_forums_get_vid(), og_forums_is_admin(), and og_forums_tid_from_gid().
| _og_forums_manage_row | ( | $ | manage, | |
| $ | op | |||
| ) |
Helper funtion to build container and forum rows.
| $manage | An associative array contain the following parameters:
| |
| $op | Possible values:
|
Definition at line 728 of file og_forums.module.
Referenced by og_forums_manage().
| og_forums_forum_availability | ( | $ | form_state | ) |
Provide the form to allow group managers toggle the forums availability.
Definition at line 835 of file og_forums.module.
| og_forums_forum_availability_submit | ( | $ | form, | |
| &$ | form_state | |||
| ) |
Submit callback.
Saves availability of the forums from a group in the user object of the group manager.
Definition at line 905 of file og_forums.module.
| og_forums_form_main | ( | $ | type, | |
| $ | group_id, | |||
| $ | tid | |||
| ) |
Select the right form to display.
| $type | Possible values:
| |
| $group_id | An group ID. | |
| $tid | An term ID. |
Definition at line 929 of file og_forums.module.
References og_forums_forum_get_parent().
| og_forums_set_og_group_context_from_tid | ( | $ | tid = 0 |
) |
Using the term ID, set the group context.
Definition at line 964 of file og_forums.module.
Referenced by og_forums_access_forum_page(), og_forums_comment(), og_forums_form_alter(), and og_forums_nodeapi().
| og_forums_gid_from_tid | ( | $ | tid = 0 |
) |
Using the term ID, get the group ID.
| $tid | An term ID. |
Definition at line 983 of file og_forums.module.
Referenced by _og_forums_forum_list_hide(), _og_forums_set_breadcrumb(), og_forums_access_forum_page(), og_forums_comment(), og_forums_form_alter(), og_forums_nodeapi(), og_forums_preprocess_forum_list(), and og_forums_preprocess_forums().
| og_forums_tid_from_gid | ( | $ | gid | ) |
Using the group ID, get the term ID.
The requested term id is the id of the groups name term - the container of the group.
| $gid | An group ID. |
Definition at line 1006 of file og_forums.module.
Referenced by _og_forums_parent_select(), and og_forums_manage().
| og_forums_db_rewrite_sql | ( | $ | query, | |
| $ | primary_table = 'n', |
|||
| $ | primary_field = 'nid', |
|||
| $ | args = array() | |||
| ) |
Implementation of hook_db_rewrite_sql().
Definition at line 1020 of file og_forums.module.
| og_forums_nodeapi | ( | &$ | node, | |
| $ | op, | |||
| $ | teaser = NULL, |
|||
| $ | page = NULL | |||
| ) |
Implementation of hook_nodeapi().
Automatically creates a forum container and forum each time an organic group is added.
og_forums_set_og_group_context_from_tid()
Definition at line 1078 of file og_forums.module.
References _og_forums_no_forums_message(), _og_forums_set_breadcrumb(), og_forums_get_forum_container(), og_forums_get_group_forums(), og_forums_gid_from_tid(), og_forums_is_admin(), and og_forums_set_og_group_context_from_tid().
Referenced by og_forums_retroactively_apply().
| og_forums_manage_terms | ( | &$ | node, | |
| $ | op | |||
| ) |
Manage terms and access templates.
| $node | An node object. | |
| $op | Possible values:
|
Definition at line 1343 of file og_forums.module.
References _og_forums_access_template_container_default(), _og_forums_access_template_forum_default(), _og_forums_clean_forum_names(), og_forums_access_template(), and og_forums_get_vid().
| og_forums_comment | ( | &$ | a1, | |
| $ | op | |||
| ) |
Implementation of hook_comment().
Definition at line 1565 of file og_forums.module.
References _og_forums_set_breadcrumb(), og_forums_gid_from_tid(), and og_forums_set_og_group_context_from_tid().
| og_forums_get_forum_container | ( | $ | gid | ) |
Retrieve container for given group.
| $gid | Organic group ID. |
Definition at line 1591 of file og_forums.module.
Referenced by og_forums_block(), og_forums_group_type_load(), og_forums_nodeapi(), og_forums_og_create_links(), og_forums_private(), og_forums_public(), og_forums_reset(), and og_forums_settings_submit().
| og_forums_is_admin | ( | $ | group | ) |
Check if a user is a group manager of the given group.
| $group | The node object of a group. |
Definition at line 1604 of file og_forums.module.
Referenced by og_forums_access_privileges_1(), og_forums_access_privileges_2(), og_forums_access_privileges_3(), og_forums_form_validate(), og_forums_manage(), og_forums_nodeapi(), and og_forums_og_create_links().
| og_forums_og_create_links | ( | $ | group | ) |
Implementation of hook_og_create_links().
Create additional OG Forums links to display in the OG administer block.
Definition at line 1629 of file og_forums.module.
References og_forums_get_forum_container(), and og_forums_is_admin().
| og_forums_retroactively_apply | ( | ) |
Creates forums for all groups that don't have any yet.
Definition at line 1659 of file og_forums.module.
References og_forums_nodeapi().
Referenced by og_forums_settings_submit().
| og_forums_form_forum | ( | &$ | form_state, | |
| $ | edit, | |||
| $ | gid = 0, |
|||
| $ | tid = 0 | |||
| ) |
Provide the forum creation form.
Definition at line 1687 of file og_forums.module.
References _og_forums_manage_breadcrumb(), _og_forums_parent_select(), og_forums_get_vid(), and og_forums_is_public().
| og_forums_form_validate | ( | $ | form, | |
| &$ | form_state | |||
| ) |
Validate group id, default container and term id values.
Definition at line 1803 of file og_forums.module.
References _og_forums_ogterms(), and og_forums_is_admin().
| og_forums_form_submit | ( | $ | form, | |
| &$ | form_state | |||
| ) |
Store created/updated forum on the database.
Definition at line 1834 of file og_forums.module.
| og_forums_taxonomy | ( | $ | op, | |
| $ | type, | |||
| $ | obj | |||
| ) |
Implementation of hook_taxonomy().
This should replace og_forums's own management of terms which bypasses regular taxonomy. Using this function allows group forums to be managed both from within the group and at the site-wide forum admin pages.
| $op | What is being done to $array. Possible values:
| |
| $type | What manner of item $array is. Possible values:
| |
| $obj | The item on which $op is being performed. Possible values:
|
Definition at line 1885 of file og_forums.module.
References _og_forums_access_template_container_default(), _og_forums_access_template_forum_default(), og_forums_access_template(), og_forums_forum_limit_reached(), og_forums_private(), and og_forums_public().
| og_forums_confirm_delete | ( | $ | form_state, | |
| $ | tid, | |||
| $ | gid | |||
| ) |
Create a confirmation form for deleting a forum.
| $tid | The ID of the term to be deleted. | |
| $gid | An group ID. |
Definition at line 1959 of file og_forums.module.
| og_forums_confirm_delete_submit | ( | $ | form, | |
| &$ | form_state | |||
| ) |
Implementation of forms api _submit call. Deletes a forum after confirmation.
Definition at line 1990 of file og_forums.module.
| og_forums_node_delete_confirm_submit | ( | $ | form, | |
| &$ | form_state | |||
| ) |
| og_forums_forum_limit_reached | ( | $ | nid, | |
| $ | corrector = 1 | |||
| ) |
Find out if the limit has been reached for groups forums in a particular group.
| $nid | ID of an group. |
Definition at line 2026 of file og_forums.module.
Referenced by og_forums_access_privileges_3(), og_forums_manage(), and og_forums_taxonomy().
| og_forums_is_public | ( | $ | tid | ) |
Test whether a tid (forum or container) is public and return results.
| $tid | ID of an term. |
Definition at line 2063 of file og_forums.module.
Referenced by og_forums_form_alter(), og_forums_form_forum(), and og_forums_preprocess_forum_list().
| og_forums_is_public_all | ( | $ | nid | ) |
Test whether all tids (forums or container) is public.
Definition at line 2084 of file og_forums.module.
Referenced by og_forums_group_type_load().
| og_forums_is_og_forums | ( | $ | tid | ) |
Test whether a tid is an OGFR forum.
Definition at line 2108 of file og_forums.module.
| og_forums_get_vid | ( | ) |
Get the forums vocabulary.
Definition at line 2127 of file og_forums.module.
Referenced by og_forums_form_alter(), og_forums_form_forum(), og_forums_manage(), and og_forums_manage_terms().
| og_forums_get_parents_all | ( | $ | tid | ) |
Find all ancestors of a given term ID.
Definition at line 2137 of file og_forums.module.
| og_forums_access_template | ( | $ | tid, | |
| $ | grant, | |||
| $ | op | |||
| ) |
Insert/update/delete the forum_access database entries for the OGFR access template permissions by a given term and for the two roles anonymous user and authenticated user.
| $tid | ID of an term. | |
| $grant | An array contain the permission values. | |
| $op | The item on which $op is being performed. Possible values:
|
Definition at line 2170 of file og_forums.module.
Referenced by og_forums_manage_terms(), and og_forums_taxonomy().
| og_forums_preprocess_node | ( | &$ | variables | ) |
For OGFR forums content - make a correct breadcrumb.
Definition at line 2202 of file og_forums.module.
References _og_forums_set_breadcrumb().
| og_forums_get_forums_availability | ( | $ | node, | |
| $ | user | |||
| ) |
Check groups forums availability, configured by group manager.
Definition at line 2214 of file og_forums.module.
| og_forums_access_forum_page | ( | $ | tid = 0 |
) |
Menu callback.
Definition at line 2240 of file og_forums.module.
References og_forums_gid_from_tid(), and og_forums_set_og_group_context_from_tid().
| og_forums_preprocess_forums | ( | &$ | variables | ) |
Preprocess variables to format the forums.
Alter the "Post new forum topic" link to "Post new Group forum topic".
Definition at line 2285 of file og_forums.module.
References _og_forums_set_breadcrumb(), _og_forums_set_group_context(), og_forums_forum_empty(), and og_forums_gid_from_tid().
| og_forums_preprocess_forum_topic_list | ( | &$ | variables | ) |
Preprocess variables to format the forum topic listing.
Hide the table header if a forum has no topics.
Definition at line 2318 of file og_forums.module.
| og_forums_preprocess_forum_list | ( | &$ | variables | ) |
Process variables to format a forum listing.
Hide private groups forums in the main forum list. Administrators and group members can see private groups forums in the main forum list.
Definition at line 2335 of file og_forums.module.
References _og_forums_forum_list_hide(), og_forums_get_group_forums(), og_forums_gid_from_tid(), and og_forums_is_public().
| og_forums_get_group_forums | ( | $ | gid = FALSE, |
|
| $ | op = 'all' | |||
| ) |
Returns all group container and forums or only forums by a given group.
If no group will be given back all group container and forums.
| $gid | ID of an group. | |
| $op | Optional; Return container and forums or only forums. Possible values:
|
Definition at line 2398 of file og_forums.module.
Referenced by _og_forums_forum_list_hide(), og_forums_manage(), og_forums_nodeapi(), and og_forums_preprocess_forum_list().
| og_forums_forum_get_parent | ( | $ | tid | ) |
Returns parent term by a given term.
| $tid | ID of an term. |
Definition at line 2442 of file og_forums.module.
Referenced by og_forums_form_main(), and og_forums_manage().
| og_forums_get_tree | ( | $ | vid, | |
| $ | parent = 0, |
|||
| $ | depth = -1, |
|||
| $ | max_depth = NULL | |||
| ) |
Create a hierarchical representation of a vocabulary.
OGFR used this function mainly to produce the tree of a group.
| $vid | Which vocabulary to generate the tree for. | |
| $parent | The term ID under which to generate the tree. If 0, generate the tree for the entire vocabulary. | |
| $depth | Internal use only. | |
| $max_depth | The number of levels of the tree to return. Leave NULL to return all levels. |
Definition at line 2470 of file og_forums.module.
Referenced by _og_forums_parent_select(), and og_forums_manage().
| og_forums_forum_empty | ( | $ | node | ) |
Display different messages when all the forums of a group are private and if the visitor is not a member of the group.
Definition at line 2488 of file og_forums.module.
Referenced by og_forums_preprocess_forums().
| og_forums_forum_access_get_settings | ( | $ | tid = NULL, |
|
| $ | rid = DRUPAL_AUTHENTICATED_RID | |||
| ) |
Retrieve the settings for a forum by an role.
| $tid | ID of an term. | |
| $rid | ID of an role. |
Definition at line 2528 of file og_forums.module.
| og_forums_error | ( | $ | tid = NULL, |
|
| $ | nid = NULL, |
|||
| $ | term_title = NULL | |||
| ) |
Log errors to watchdog.
| $tid | An term ID. | |
| $nid | An node ID. |
Definition at line 2565 of file og_forums.module.
| _og_forums_set_breadcrumb | ( | $ | tid, | |
| $ | is_forum_post = FALSE | |||
| ) |
Helper function to create the breadcrumb for OG Forums.
Definition at line 2580 of file og_forums.module.
References og_forums_gid_from_tid().
Referenced by og_forums_comment(), og_forums_nodeapi(), og_forums_preprocess_forums(), and og_forums_preprocess_node().
| _og_forums_manage_breadcrumb | ( | $ | group, | |
| $ | op = NULL | |||
| ) |
Set a nice breadcrumb for the manage pages.
Definition at line 2625 of file og_forums.module.
Referenced by og_forums_form_forum(), and og_forums_manage().
| _og_forums_forum_list_hide | ( | &$ | variables | ) |
Helper function to hide container if they contains no (public) forums.
Definition at line 2656 of file og_forums.module.
References og_forums_get_group_forums(), and og_forums_gid_from_tid().
Referenced by og_forums_preprocess_forum_list().
| _og_forums_ogterms | ( | $ | group | ) |
Returns an array containing terms associated to this og.
| $group | An group node object. |
Definition at line 2697 of file og_forums.module.
Referenced by og_forums_form_validate(), and og_forums_manage().
| _og_forums_set_group_context | ( | $ | group | ) |
Set the theme for the current request. Set the language for the page based on group's language. Set the group context for the current request.
Definition at line 2715 of file og_forums.module.
Referenced by og_forums_preprocess_forums().
| _og_forums_parent_select | ( | $ | tid, | |
| $ | title, | |||
| $ | child_type, | |||
| $ | gid | |||
| ) |
Returns a select box for available parent terms.
| $tid | ID of the term which is being added or edited. | |
| $title | Title to display the select box with. | |
| $child_type | Whether the child is forum or container. | |
| $gid | An group ID. |
Definition at line 2738 of file og_forums.module.
References og_forums_get_tree(), and og_forums_tid_from_gid().
Referenced by og_forums_form_forum().
| _og_forums_access_template_container_default | ( | ) |
Provisioning of the default values of the system-variable og_forums_access_template_container.
Definition at line 2798 of file og_forums.module.
Referenced by _og_forums_access_template_form(), _og_forums_template_value(), og_forums_manage_terms(), and og_forums_taxonomy().
| _og_forums_access_template_forum_default | ( | ) |
Provisioning of the default values of the system-variable og_forums_access_template_forum.
Definition at line 2814 of file og_forums.module.
Referenced by _og_forums_access_template_form(), _og_forums_template_value(), og_forums_manage_terms(), and og_forums_taxonomy().
| _og_forums_no_forums_message | ( | $ | op = 'member', |
|
| $ | path | |||
| ) |
Create an status message if no forums exists for a group.
| $op | Possible values:
|
Definition at line 2844 of file og_forums.module.
Referenced by og_forums_manage(), and og_forums_nodeapi().
| _og_forums_clean_forum_names | ( | $ | forum_names | ) |
Clean form input.
Definition at line 2871 of file og_forums.module.
Referenced by og_forums_admin_settings_validate(), and og_forums_manage_terms().
| og_forum_migrate | ( | ) |
Definition at line 2887 of file og_forums.module.
1.5.5