ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilForumProperties Class Reference
+ Collaboration diagram for ilForumProperties:

Public Member Functions

 insert ()
 update ()
 copy ($a_new_obj_id)
 setDefaultView ($a_default_view)
 getDefaultView ()
 setStatisticsStatus ($a_statistic_status)
 isStatisticEnabled ()
 setAnonymisation ($a_anonymized)
 isAnonymized ()
 setPostActivation ($a_post_activation)
 isPostActivationEnabled ()
 setObjId ($a_obj_id=0)
 getObjId ()
 setAdminForceNoti ($a_admin_force)
 isAdminForceNoti ()
 setUserToggleNoti ($a_user_toggle)
 isUserToggleNoti ()
 isThreadRatingAllowed ($a_allow_rating=null)
 setPresetSubject ($a_preset_subject)
 getPresetSubject ()
 setAddReSubject ($a_add_re_subject)
 getAddReSubject ()
 setNotificationType ($a_notification_type)
 getNotificationType ()
 getSubjectSetting ()
 setSubjectSetting ($a_subject_setting)
 setMarkModeratorPosts ($a_mod_post)
 getMarkModeratorPosts ()
 getUserToggleNoti ()
 getAdminForceNoti ()

Static Public Member Functions

static getInstance ($a_obj_id=0)
static _isAnonymized ($a_obj_id)
static _isAdminForceNoti ($a_obj_id)
static _isUserToggleNoti ($a_obj_id)

Data Fields

const VIEW_TREE = 1
const VIEW_DATE = 2
const VIEW_DATE_ASC = 2
const VIEW_DATE_DESC = 3

Protected Member Functions

 __construct ($a_obj_id=0)

Private Member Functions

 __clone ()
 read ()

Private Attributes

 $obj_id
 Object id of current forum private.
 $default_view = self::VIEW_TREE
 Default view ( 1 => 'order by answers', 2 => 'order by date ascending', 3 => 'order by date descending') private.
 $anonymized = 0
 Defines if a forum is anonymized or not private.
 $statistics_enabled = 0
 Defines if a forum can show ranking statistics private.
 $post_activation_enabled = 0
 Activation of new posts private.
 $notification_type = null
 Global notification-type setting (CRS/GRP) possible values: 'all_users', 'per_user', null (default)
 $admin_force_noti = false
 Activation of (CRS/GRP) forum notification by mod/admin private.
 $user_toggle_noti = false
 Activation of allowing members to deactivate (CRS/GRP)forum notification private.
 $thread_ratings_allowed = false
 $preset_subject = 1
 Preset subject on reply.
 $add_re_subject = 0
 Add 'Re: ' to subject on reply.
 $mark_mod_posts = 0
 $db = null
 DB Object private.

Static Private Attributes

static $instances = array()

Detailed Description

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
Id:

Definition at line 10 of file class.ilForumProperties.php.

Constructor & Destructor Documentation

ilForumProperties::__construct (   $a_obj_id = 0)
protected

Definition at line 103 of file class.ilForumProperties.php.

References read().

{
global $ilDB;
$this->db = $ilDB;
$this->obj_id = $a_obj_id;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilForumProperties::__clone ( )
private

Definition at line 112 of file class.ilForumProperties.php.

{
}
static ilForumProperties::_isAdminForceNoti (   $a_obj_id)
static

Definition at line 306 of file class.ilForumProperties.php.

References $res.

Referenced by ilForumNotification\checkForumsExistsInsert().

{
global $ilDB;
$res = $ilDB->queryF("SELECT admin_force_noti FROM frm_settings WHERE obj_id = %s",
array('integer'),
array($a_obj_id));
while($record = $ilDB->fetchAssoc($res))
{
return $record['admin_force_noti'];
}
return 0;
}

+ Here is the caller graph for this function:

static ilForumProperties::_isAnonymized (   $a_obj_id)
static

Definition at line 253 of file class.ilForumProperties.php.

References $result.

Referenced by ilPDNewsTableGUI\fillRow().

{
global $ilDB;
$result = $ilDB->queryf("SELECT anonymized FROM frm_settings WHERE obj_id = %s",
array('integer'),array($a_obj_id));
while($record = $ilDB->fetchAssoc($result))
{
return $record['anonymized'];
}
return 0;
}

+ Here is the caller graph for this function:

static ilForumProperties::_isUserToggleNoti (   $a_obj_id)
static

Definition at line 321 of file class.ilForumProperties.php.

References $res.

Referenced by ilForumNotification\checkForumsExistsInsert().

{
global $ilDB;
$res = $ilDB->queryF("SELECT user_toggle_noti FROM frm_settings WHERE obj_id = %s",
array('integer'),
array($a_obj_id));
while($record = $ilDB->fetchAssoc($res))
{
return $record['user_toggle_noti'];
}
return 0;
}

+ Here is the caller graph for this function:

ilForumProperties::copy (   $a_new_obj_id)

Definition at line 206 of file class.ilForumProperties.php.

{
if ($a_new_obj_id)
{
$this->db->insert('frm_settings',
array( 'obj_id' => array('integer', $a_new_obj_id),
'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts))
);
return true;
}
return false;
}
ilForumProperties::getAddReSubject ( )

Definition at line 359 of file class.ilForumProperties.php.

References $add_re_subject.

Referenced by getSubjectSetting().

{
}

+ Here is the caller graph for this function:

ilForumProperties::getAdminForceNoti ( )
Returns
mixed

Definition at line 433 of file class.ilForumProperties.php.

References $admin_force_noti.

ilForumProperties::getDefaultView ( )

Definition at line 233 of file class.ilForumProperties.php.

References $default_view.

{
}
static ilForumProperties::getInstance (   $a_obj_id = 0)
static

Definition at line 116 of file class.ilForumProperties.php.

Referenced by ilForumModeratorsGUI\addModerator(), ilForumModeratorsGUI\detachModeratorRole(), and ilForumXMLParser\handlerEndTag().

{
if (!self::$instances[$a_obj_id])
{
self::$instances[$a_obj_id] = new ilForumProperties($a_obj_id);
}
return self::$instances[$a_obj_id];
}

+ Here is the caller graph for this function:

ilForumProperties::getMarkModeratorPosts ( )

Definition at line 417 of file class.ilForumProperties.php.

References $mark_mod_posts.

{
}
ilForumProperties::getNotificationType ( )

Definition at line 371 of file class.ilForumProperties.php.

References $notification_type.

ilForumProperties::getObjId ( )

Definition at line 281 of file class.ilForumProperties.php.

References $obj_id.

{
return $this->obj_id;
}
ilForumProperties::getPresetSubject ( )

Definition at line 351 of file class.ilForumProperties.php.

References $preset_subject.

Referenced by getSubjectSetting().

{
}

+ Here is the caller graph for this function:

ilForumProperties::getSubjectSetting ( )

Definition at line 376 of file class.ilForumProperties.php.

References getAddReSubject(), and getPresetSubject().

{
if($this->getPresetSubject() == 0
&& $this->getAddReSubject() == 0)
{
return "empty_subject";
}
else if($this->getPresetSubject() == 1)
{
return "preset_subject";
}
else if($this->getAddReSubject() == 1)
{
return "add_re_to_subject";
}
else return "preset_subject";
}

+ Here is the call graph for this function:

ilForumProperties::getUserToggleNoti ( )
Returns
mixed

Definition at line 425 of file class.ilForumProperties.php.

References $user_toggle_noti.

ilForumProperties::insert ( )

Definition at line 160 of file class.ilForumProperties.php.

{
if ($this->obj_id)
{
$this->db->insert('frm_settings',
array( 'obj_id' => array('integer', $this->obj_id),
'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts))
);
return true;
}
return false;
}
ilForumProperties::isAdminForceNoti ( )

Definition at line 291 of file class.ilForumProperties.php.

References $admin_force_noti.

ilForumProperties::isAnonymized ( )

Definition at line 249 of file class.ilForumProperties.php.

References $anonymized.

{
}
ilForumProperties::isPostActivationEnabled ( )

Definition at line 272 of file class.ilForumProperties.php.

References $post_activation_enabled.

ilForumProperties::isStatisticEnabled ( )

Definition at line 241 of file class.ilForumProperties.php.

References $statistics_enabled.

ilForumProperties::isThreadRatingAllowed (   $a_allow_rating = null)

Definition at line 335 of file class.ilForumProperties.php.

References $thread_ratings_allowed.

{
if(null === $a_allow_rating)
{
}
$this->thread_ratings_allowed = $a_allow_rating;
return $this;
}
ilForumProperties::isUserToggleNoti ( )

Definition at line 301 of file class.ilForumProperties.php.

References $user_toggle_noti.

ilForumProperties::read ( )
private

Definition at line 126 of file class.ilForumProperties.php.

References $res, and $row.

Referenced by __construct(), and setObjId().

{
if ($this->obj_id)
{
$res = $this->db->queryf('
SELECT * FROM frm_settings
WHERE obj_id = %s',
array('integer'), array($this->obj_id));
$row = $this->db->fetchObject($res);
if (is_object($row))
{
$this->default_view = $row->default_view;
$this->anonymized = $row->anonymized ;// == 1 ? true : false;
$this->statistics_enabled = $row->statistics_enabled ;// == 1 ? true : false;
$this->post_activation_enabled = $row->post_activation ;// == 1 ? true : false;
$this->admin_force_noti = $row->admin_force_noti == 1 ? true : false;
$this->user_toggle_noti = $row->user_toggle_noti == 1 ? true : false;
$this->preset_subject = $row->preset_subject;
$this->add_re_subject = $row->add_re_subject;
$this->notification_type = $row->notification_type == null ? 'default': $row->notification_type;
$this->mark_mod_posts = $row->mark_mod_posts == 1 ? true : false;
return true;
}
return false;
}
return false;
}

+ Here is the caller graph for this function:

ilForumProperties::setAddReSubject (   $a_add_re_subject)

Definition at line 355 of file class.ilForumProperties.php.

Referenced by setSubjectSetting().

{
$this->add_re_subject = $a_add_re_subject;
}

+ Here is the caller graph for this function:

ilForumProperties::setAdminForceNoti (   $a_admin_force)

Definition at line 286 of file class.ilForumProperties.php.

{
$this->admin_force_noti = $a_admin_force;
}
ilForumProperties::setAnonymisation (   $a_anonymized)

Definition at line 245 of file class.ilForumProperties.php.

{
$this->anonymized = $a_anonymized;
}
ilForumProperties::setDefaultView (   $a_default_view)

Definition at line 229 of file class.ilForumProperties.php.

{
$this->default_view = $a_default_view;
}
ilForumProperties::setMarkModeratorPosts (   $a_mod_post)

Definition at line 412 of file class.ilForumProperties.php.

{
$this->mark_mod_posts = $a_mod_post;
}
ilForumProperties::setNotificationType (   $a_notification_type)

Definition at line 364 of file class.ilForumProperties.php.

{
if($a_notification_type == null)
$this->notification_type = 'default';
else
$this->notification_type = $a_notification_type;
}
ilForumProperties::setObjId (   $a_obj_id = 0)

Definition at line 276 of file class.ilForumProperties.php.

References read().

{
$this->obj_id = $a_obj_id;
$this->read();
}

+ Here is the call graph for this function:

ilForumProperties::setPostActivation (   $a_post_activation)

Definition at line 268 of file class.ilForumProperties.php.

{
$this->post_activation_enabled = $a_post_activation;
}
ilForumProperties::setPresetSubject (   $a_preset_subject)

Definition at line 347 of file class.ilForumProperties.php.

Referenced by setSubjectSetting().

{
$this->preset_subject = $a_preset_subject;
}

+ Here is the caller graph for this function:

ilForumProperties::setStatisticsStatus (   $a_statistic_status)

Definition at line 237 of file class.ilForumProperties.php.

{
$this->statistics_enabled = $a_statistic_status;
}
ilForumProperties::setSubjectSetting (   $a_subject_setting)

Definition at line 393 of file class.ilForumProperties.php.

References setAddReSubject(), and setPresetSubject().

{
if($a_subject_setting == 'empty_subject')
{
$this->setPresetSubject(0);
$this->setAddReSubject(0);
}
else if($a_subject_setting == 'preset_subject')
{
$this->setPresetSubject(1);
$this->setAddReSubject(0);
}
else if($a_subject_setting == 'add_re_to_subject')
{
$this->setPresetSubject(0);
$this->setAddReSubject(1);
}
}

+ Here is the call graph for this function:

ilForumProperties::setUserToggleNoti (   $a_user_toggle)

Definition at line 296 of file class.ilForumProperties.php.

{
$this->user_toggle_noti = $a_user_toggle;
}
ilForumProperties::update ( )

Definition at line 184 of file class.ilForumProperties.php.

{
if ($this->obj_id)
{
$this->db->update('frm_settings',
array( 'default_view' => array('integer', $this->default_view),
'anonymized' => array('integer', $this->anonymized),
'statistics_enabled'=> array('integer', $this->statistics_enabled),
'post_activation' => array('integer', $this->post_activation_enabled),
'admin_force_noti' => array('integer', $this->admin_force_noti),
'user_toggle_noti' => array('integer', $this->user_toggle_noti),
'preset_subject' => array('integer', $this->preset_subject),
'add_re_subject' => array('integer', $this->add_re_subject),
'notification_type' => array('text', $this->notification_type),
'mark_mod_posts' => array('integer', $this->mark_mod_posts)),
array( 'obj_id' => array('integer', $this->obj_id))
);
return true;
}
return false;
}

Field Documentation

ilForumProperties::$add_re_subject = 0
private

Add 'Re: ' to subject on reply.

private

Definition at line 91 of file class.ilForumProperties.php.

Referenced by getAddReSubject().

ilForumProperties::$admin_force_noti = false
private

Activation of (CRS/GRP) forum notification by mod/admin private.

Definition at line 61 of file class.ilForumProperties.php.

Referenced by getAdminForceNoti(), and isAdminForceNoti().

ilForumProperties::$anonymized = 0
private

Defines if a forum is anonymized or not private.

Definition at line 33 of file class.ilForumProperties.php.

Referenced by isAnonymized().

ilForumProperties::$db = null
private

DB Object private.

Definition at line 99 of file class.ilForumProperties.php.

ilForumProperties::$default_view = self::VIEW_TREE
private

Default view ( 1 => 'order by answers', 2 => 'order by date ascending', 3 => 'order by date descending') private.

Definition at line 27 of file class.ilForumProperties.php.

Referenced by getDefaultView().

ilForumProperties::$instances = array()
staticprivate

Definition at line 101 of file class.ilForumProperties.php.

ilForumProperties::$mark_mod_posts = 0
private

Definition at line 93 of file class.ilForumProperties.php.

Referenced by getMarkModeratorPosts().

ilForumProperties::$notification_type = null
private

Global notification-type setting (CRS/GRP) possible values: 'all_users', 'per_user', null (default)

private

Definition at line 55 of file class.ilForumProperties.php.

Referenced by getNotificationType().

ilForumProperties::$obj_id
private

Object id of current forum private.

Definition at line 21 of file class.ilForumProperties.php.

Referenced by getObjId().

ilForumProperties::$post_activation_enabled = 0
private

Activation of new posts private.

Definition at line 45 of file class.ilForumProperties.php.

Referenced by isPostActivationEnabled().

ilForumProperties::$preset_subject = 1
private

Preset subject on reply.

If deactivated, user is forced to enter a new subject

private

Definition at line 84 of file class.ilForumProperties.php.

Referenced by getPresetSubject().

ilForumProperties::$statistics_enabled = 0
private

Defines if a forum can show ranking statistics private.

Definition at line 39 of file class.ilForumProperties.php.

Referenced by isStatisticEnabled().

ilForumProperties::$thread_ratings_allowed = false
private

Definition at line 76 of file class.ilForumProperties.php.

Referenced by isThreadRatingAllowed().

ilForumProperties::$user_toggle_noti = false
private

Activation of allowing members to deactivate (CRS/GRP)forum notification private.

Definition at line 66 of file class.ilForumProperties.php.

Referenced by getUserToggleNoti(), and isUserToggleNoti().

const ilForumProperties::VIEW_DATE = 2
const ilForumProperties::VIEW_DATE_ASC = 2
const ilForumProperties::VIEW_DATE_DESC = 3
const ilForumProperties::VIEW_TREE = 1

The documentation for this class was generated from the following file: