string(fetch_censored_text($this->item['title'])); } /** * Sets up different display variables for the Group Message * * @access protected */ function process_display() { global $show, $vbphrase, $stylevar; // Simplify moderation for templating $this->item['picturecount'] = vb_number_format($this->item['visible']); // Get cover image info $this->item['coverthumburl'] = ($this->item['pictureid'] ? fetch_picture_url($this->item, $this->item, true) : ''); $this->item['coverdimensions'] = ($this->item['thumbnail_width'] ? "width=\"{$this->item[thumbnail_width]}px\" height=\"{$this->item[thumbnail_height]}px\"" : ''); // Display album type if ('private' == $this->item['state']) { $show['personalalbum'] = true; $this->item['albumtype'] = $vbphrase['private_album_paren']; } else if ('profile' == $this->item['state']) { $show['personalalbum'] = true; $this->item['albumtype'] = $vbphrase['profile_album_paren']; } else { $show['personalalbum'] = false; } // Show moderation details if ($this->item['moderation'] AND (can_moderate(0, 'canmoderatepictures') OR $vbulletin->userinfo['userid'] == $this->item['userid'])) { $show['moderated'] = true; $this->item['moderatedcount'] = vb_number_format($this->item['moderation']); } else { $show['moderated'] = false; } } } /** * Social Group Category bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html */ class vB_Bit_GroupCategory extends vB_Bit { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_categorylist_bit'; /** * Hook run at start of template bit * * @access protected * @var string */ var $hook_display_start = 'categorylist_bit_display_start'; /** * Hook run at end of template bit * * @access protected * @var string */ var $hook_display_complete = 'categorylist_bit_display_complete'; /** * The variable name used in templates for the item * * @access protected * @var string */ var $template_item_var = 'category'; /** * Whether to include information about the item user * * @access protected * @var boolean */ var $process_user = false; // ####################################################################### /** * Prepare the text for display * * @access protected */ function process_text() { parent::process_text(); $this->item['description'] = nl2br(fetch_word_wrapped_string(fetch_censored_text($this->item['description']))); $this->item['title'] = fetch_word_wrapped_string(fetch_censored_text($this->item['title'])); } /** * Sets up different display variables for the Group Message * * @access protected */ function process_display() { global $show, $vbphrase, $stylevar; // Simplify moderation for templating $this->item['groups'] = vb_number_format($this->item['groups']); } } /** * Group bit class. * Group bit classes render the template bit for the given group content item. * Use the group bit factory to resolve and fetch the appropriate bit class for a * group content item. * @see vB_Group_Bit_Factory * * @package vBulletin * @copyright http://www.vbulletin.com/license.html * * @abstract */ class vB_Group_Bit extends vB_Bit { /** * Information about the group this message belongs to * * @access protected * @var array */ var $group = array(); // ####################################################################### /** * Constructor, sets up the object. * * @access public * * @param vB_Registry * @param vB_Group_Bit_Factory * @param array Item info * @param array Group info */ function vB_Group_Bit(&$registry, &$factory, $item, $group) { parent::vB_Bit($registry, $factory, $item); $this->group = $group; } /** * Template method that does all the work to render the item, including processing the template * * @access public * * @return string Templated note output */ function construct() { if (isset($this->group)) { $group = $this->group; } return parent::construct(); } /** * Any startup work that needs to be done. * * @access protected */ function prepare_start() { parent::prepare_start(); $this->item['checkbox_value'] = 0; $this->item['checkbox_value'] += ($this->item['state'] == 'moderation') ? POST_FLAG_INVISIBLE : 0; $this->item['checkbox_value'] += ($this->item['state'] == 'deleted') ? POST_FLAG_DELETED : 0; } } /** * Group message bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html */ class vB_Group_Bit_Message extends vB_Group_Bit { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_message'; /** * Hook run at start of template bit * * @access protected * @var string */ var $hook_display_start = 'group_messagebit_display_start'; /** * Hook run at end of template bit * * @access protected * @var string */ var $hook_display_complete = 'group_messagebit_display_complete'; /** * Whether to fetch avatar info for the item's author * * @access protected * @var boolean */ var $use_avatar = true; /** * The variable name used in templates for the item */ var $template_item_var = 'message'; /** * Sets up different display variables for the Group Message * * @access protected */ function process_display() { global $show; $this->discussion = fetch_socialdiscussioninfo($this->item['discussionid']); $this->group = fetch_socialgroupinfo($this->discussion['groupid']); $this->item['is_discussion'] = ($this->item['gmid'] == $this->discussion['firstpostid']); $show['moderation'] = ($this->item['state'] == 'moderation'); if ($this->show_moderation_tools AND !$this->force_inline_selection) { if ($this->item['is_discussion']) { $this->item['inlinemod'] = ( ( $this->item['state'] != 'moderation' OR fetch_socialgroup_modperm('canmoderatediscussions', $this->group) ) AND ( $this->item['state'] != 'deleted' OR fetch_socialgroup_modperm('canundeletediscussions', $this->group) ) AND ( fetch_socialgroup_modperm('canmoderatediscussions') OR fetch_socialgroup_modperm('candeletediscussions', $this->group) OR fetch_socialgroup_modperm('canremovediscussions', $this->group) ) ); } else { $this->item['inlinemod'] = ( ( $this->item['state'] != 'deleted' OR fetch_socialgroup_modperm('canundeletegroupmessages', $this->group) ) AND ( $this->item['state'] != 'moderated' OR fetch_socialgroup_modperm('canmoderategroupmessages', $this->group) ) AND ( fetch_socialgroup_modperm('canmoderategroupmessages', $this->group) OR fetch_socialgroup_modperm('canundeletegroupmessages', $this->group) OR fetch_socialgroup_modperm('canremovegroupmessages', $this->group) ) ); } } else { $this->item['inlinemod'] = $this->force_inline_selection; } if ($this->show_moderation_tools) { if ($this->item['is_discussion']) { $this->item['edit'] = (can_edit_group_discussion($discussion) OR can_edit_group_message($this->item, $this->info['group'])); } else { $this->item['edit'] = can_edit_group_message($this->item, $this->info['group']); } } else { $show['edit'] = $this->item['edit'] = false; } // legacy $show['inlinemod'] = $this->item['inlinemod']; $show['edit'] = $this->item['edit']; } // ####################################################################### /** * Prepare the text for display * * @access protected */ function process_text() { $this->item['message'] = $this->bbcode->parse( $this->item['pagetext'], 'socialmessage', $this->item['allowsmilie'] ); $this->parsed_cache = $this->bbcode->cached; if (!empty($this->item['del_reason'])) { $this->item['del_reason'] = fetch_censored_text($this->item['del_reason']); } $this->item['groupname'] = $this->group['name']; $this->item['discussiontitle'] = $this->discussion['title']; } /** * Any closing work to be done. * * @access protected */ function prepare_end() { global $show; global $onload, $itemid; if (can_moderate(0, 'canviewips')) { $this->item['itemipaddress'] = ($this->item['itemipaddress'] ? htmlspecialchars_uni(long2ip($this->item['itemipaddress'])) : ''); } else { $this->item['itemipaddress'] = ''; } $show['reportlink'] = ( $this->registry->userinfo['userid'] AND ($this->registry->options['rpforumid'] OR ($this->registry->options['enableemail'] AND $this->registry->options['rpemail'])) ); } } /** * Deleted message bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html * */ class vB_Group_Bit_Message_Deleted extends vB_Group_Bit_Message { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_message_deleted'; /** * Whether to fetch avatar info for the item's author * * @access protected * @var boolean */ var $use_avatar = false; } /** * Ignored message bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html * */ class vB_Group_Bit_Message_Ignored extends vB_Group_Bit_Message { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_message_ignored'; /** * Whether to fetch avatar info for the item's author * * @access protected * @var boolean */ var $use_avatar = false; } /** * Group discussion bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html */ class vB_Group_Bit_Discussion extends vB_Group_Bit { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_discussion'; /** * Hook run at start of template bit * * @access protected * @var string */ var $hook_display_start = 'group_discussionbit_display_start'; /** * Hook run at end of template bit * * @access protected * @var string */ var $hook_display_complete = 'group_discussionbit_display_complete'; /** * Whether to check read status of the discussion * * @access protected * @var boolean */ var $check_read = true; /** * Whether to show subscription info * * @access protected * @var boolean */ var $show_subscription = false; /** * The variable name used in templates for the item * * @access protected * @var string */ var $template_item_var = 'discussion'; /** * Whether to fetch avatar info for the item's author * * @access protected * @var boolean */ var $use_avatar = false; // ####################################################################### /** * Template method that does all the work to render the item, including processing the template * * @access public * * @return string Templated note output */ function construct() { if (isset($this->discussion)) { $discussion = $this->discussion; } return parent::construct(); } /** * Created Human readable Dates and Times * * @access protected */ function process_date_status() { $this->item['lastpostdate'] = vbdate($this->registry->options['dateformat'], $this->item['lastpost'], true); $this->item['lastposttime'] = vbdate($this->registry->options['timeformat'], $this->item['lastpost']); } /** * Prepare the text for display * * @access protected */ function process_text() { parent::process_text(); $this->item['title'] = fetch_censored_text($this->item['title']); $this->item['trimmessage'] = htmlspecialchars_uni(fetch_trimmed_title(fetch_censored_text(strip_bbcode($this->item['pagetext'],false,true)), 100)); $this->item['groupname'] = $this->group['name']; } /** * Sets up different display variables for the Group Message * * @access protected */ function process_display() { global $show, $vbphrase; $this->item['canview'] = ($this->item['state'] == 'visible' OR ( ($this->item['state'] == 'deleted') AND fetch_socialgroup_modperm('canundeletediscussions', $this->group) ) OR ( $this->item['state'] == 'moderation' AND fetch_socialgroup_modperm('canmoderatediscussions', $this->group) ) ); // Simplify moderation for templating $this->item['moderated_replies'] = ($this->item['moderation'] > 1 OR ($this->item['state'] != 'moderation' AND $this->item['moderation'] == 1)); $this->item['moderated'] = ($this->item['state'] == 'moderation'); // Show inline selection tools if ($this->show_moderation_tools AND !$this->force_inline_selection) { $this->item['inlinemod'] = ( ( $this->item['state'] != 'deleted' AND fetch_socialgroup_modperm('canmoderatediscussions', $this->group) ) OR fetch_socialgroup_modperm('canundeletediscussions', $this->group) OR fetch_socialgroup_modperm('canremovediscussions', $this->group) ); $show['inlinemod'] = ($show['inlinemod'] OR $this->item['inlinemod']); } else { $show['inlinemod'] = $this->item['inlinemod'] = $this->force_inline_selection; } // Show edit links $this->item['edit'] = ($this->show_moderation_tools AND can_edit_group_discussion($this->item, $this->group)); $show['edit'] = $this->item['edit']; if ($this->check_read) { if (!$this->item['is_read']) { if (!$this->item['readtime']) { $this->item['readtime'] = 0; // no database marking, check cookie if (!$this->registry->options['threadmarking'] OR !$this->registry->userinfo['userid']) { $this->item['readtime'] = max( fetch_bbarray_cookie('discussion_marking', $this->item['discussionid']), $this->registry->userinfo['lastvisit'] ); } } // posts older than markinglimit days won't be highlighted as new $oldtime = (TIMENOW - ($this->registry->options['markinglimit'] * 24 * 60 * 60)); $this->item['readtime'] = max($this->group['readtime'], $this->item['readtime'], $oldtime); $this->item['is_read'] = ($this->item['readtime'] > $this->item['lastpost']); } } else { $this->item['is_read'] = true; } $this->item['replies'] = max(0, ($this->item['visible']-1)); if ($this->show_subscription) { $this->item['showsubsinfo'] = $this->show_subscription; $this->item['notification'] = ($this->item['emailupdate'] ? $vbphrase['instant'] : $vbphrase['none']); } } /** * Sets whether to check if item is read * * @access public * * @param boolean $check */ function check_read($check = true) { $this->check_read = $check; } /** * Sets whether to show subscription info. * * @access public * * @param boolean $show */ function show_subscription($show = true) { $this->show_subscription = $show; } } /** * Deleted discussion bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html * */ class vB_Group_Bit_Discussion_Deleted extends vB_Group_Bit_Discussion { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_discussion_deleted'; } /** * Ignored discussion bit class. * * @package vBulletin * @copyright http://www.vbulletin.com/license.html * */ class vB_Group_Bit_Discussion_Ignored extends vB_Group_Bit_Discussion { /** * The template that will be used for outputting * * @access protected * @var string */ var $template = 'socialgroups_discussion_ignored'; } /*======================================================================*\ || #################################################################### || # Downloaded: 08:17, Sun May 17th 2009 || # SVN: $Revision: 30075 $ || #################################################################### \*======================================================================*/ ?>
Fatal error: Class 'vB_Group_Collection_Factory' not found in /var/www/html/public_html/forum/group.php on line 2096