/** * Return the tag help for this block type * * @access public * @param string Additional info (database id;type) * @return array */ public function getTags($info = '') { //----------------------------------------- // Calendar columns //----------------------------------------- $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__calurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__caldate']), 'title' => array("$r['title']", $this->lang->words['block_feed__caltitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__calcontent'])); $_noinfoColumns = array(); foreach ($this->DB->getFieldNames('cal_events') as $_column) { if ($this->lang->words['col__cal_events_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__cal_events_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } foreach ($this->DB->getFieldNames('cal_calendars') as $_column) { if ($this->lang->words['col__cal_calendars_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__cal_calendars_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } return array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_calendar'] => array(array('$records', $this->lang->words['block_feed__cal'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); }
/** * Return the tag help for this block type * * @access public * @return array */ public function getTags() { $_finalColumns = array(); $_noinfoColumns = array(); foreach ($this->DB->getFieldNames('sessions') as $_column) { if ($this->lang->words['col__sessions_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__sessions_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } foreach ($this->DB->getFieldNames('members') as $_column) { if ($this->lang->words['col__members_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__members_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_fieldInfo = array(); $this->DB->buildAndFetch(array('select' => 'pf_id,pf_title,pf_desc', 'from' => 'pfields_data')); $this->DB->execute(); while ($r = $this->DB->fetch()) { $_fieldInfo[$r['pf_id']] = $r; } foreach ($this->DB->getFieldNames('pfields_content') as $_column) { if ($this->lang->words['col__pfields_content_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__pfields_content_' . $_column]); } else { if (preg_match("/^field_(\\d+)\$/", $_column, $matches) and isset($_fieldInfo[$matches[1]])) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $_fieldInfo[$matches[1]]['pf_title'] . ($_fieldInfo[$matches[1]]['pf_desc'] ? ': ' . $_fieldInfo[$matches[1]]['pf_desc'] : '')); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } } foreach ($this->DB->getFieldNames('profile_portal') as $_column) { if ($this->lang->words['col__profile_portal_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__profile_portal_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_finalColumns['my_member_id'] = array("$r['my_member_id']", $this->lang->words['col__special_my_member_id']); $_finalColumns['pp_main_photo'] = array("$r['pp_main_photo']", $this->lang->words['col__special_pp_main_photo']); $_finalColumns['pp_main_width'] = array("$r['pp_main_width']", $this->lang->words['col__special_pp_main_width']); $_finalColumns['pp_main_height'] = array("$r['pp_main_height']", $this->lang->words['col__special_pp_main_height']); $_finalColumns['_has_photo'] = array("$r['_has_photo']", $this->lang->words['col__special__has_photo']); $_finalColumns['pp_small_photo'] = array("$r['pp_small_photo']", $this->lang->words['col__special_pp_small_photo']); $_finalColumns['pp_small_width'] = array("$r['pp_small_width']", $this->lang->words['col__special_pp_small_width']); $_finalColumns['pp_small_height'] = array("$r['pp_small_height']", $this->lang->words['col__special_pp_small_height']); $_finalColumns['pp_mini_photo'] = array("$r['pp_mini_photo']", $this->lang->words['col__special_pp_mini_photo']); $_finalColumns['pp_mini_width'] = array("$r['pp_mini_width']", $this->lang->words['col__special_pp_mini_width']); $_finalColumns['pp_mini_height'] = array("$r['pp_mini_height']", $this->lang->words['col__special_pp_mini_height']); $_finalColumns['member_rank_img_i'] = array("$r['member_rank_img_i']", $this->lang->words['col__special_member_rank_img_i']); $_finalColumns['member_rank_img'] = array("$r['member_rank_img']", $this->lang->words['col__special_member_rank_img']); return array($this->lang->words['block_plugin__generic'] => array(array('$title', $this->lang->words['block_custom__title'])), $this->lang->words['block_plugin__of_users'] => array(array('$friends', $this->lang->words['block_plugin__of_us'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); }
/** * Return the tag help for this block type * * @access public * @param string Additional info (database id;type) * @return array */ public function getTags($info = '') { $_return = array(); $_noinfoColumns = array(); //----------------------------------------- // Switch on type //----------------------------------------- switch ($info) { case 'topics': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__topicurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__topicdate']), 'title' => array("$r['title']", $this->lang->words['block_feed__topictitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__topiccontent'])); foreach ($this->DB->getFieldNames('topics') as $_column) { if ($this->lang->words['col__topics_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__topics_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_finalColumns['topic_title'] = array("$r['topic_title']", $this->lang->words['col__topics_title']); $_finalColumns['lastpost'] = array("$r['lastpost']", $this->lang->words['col__topics_last_post']); $_finalColumns['lastposter'] = array("$r['lastposter']", $this->lang->words['col__topics_last_poster_id']); $_finalColumns['lastpostername'] = array("$r['lastpostername']", $this->lang->words['col__topics_last_poster_name']); $_finalColumns['topic_posts'] = array("$r['topic_posts']", $this->lang->words['col__topics_posts']); foreach ($this->DB->getFieldNames('posts') as $_column) { if ($this->lang->words['col__posts_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__posts_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } foreach ($this->DB->getFieldNames('forums') as $_column) { if ($this->lang->words['col__forums_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__forums_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_finalColumns['fid'] = array("$r['fid']", $this->lang->words['col__forums_id']); $_finalColumns['fname'] = array("$r['fname']", $this->lang->words['col__forums_name']); $this->_addMemberColumns($_finalColumns, $_noinfoColumns); $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_topics'] => array(array('$records', $this->lang->words['block_feed__topics'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; case 'forums': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__forumurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__forumdate']), 'title' => array("$r['title']", $this->lang->words['block_feed__forumtitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__forumcontent'])); foreach ($this->DB->getFieldNames('forums') as $_column) { if ($this->lang->words['col__forums_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__forums_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_forums'] => array(array('$records', $this->lang->words['block_feed__forums'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; case 'replies': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__replyurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__replydate']), 'title' => array("$r['title']", $this->lang->words['block_feed__replytitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__replycontent'])); foreach ($this->DB->getFieldNames('posts') as $_column) { if ($this->lang->words['col__posts_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__posts_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } foreach ($this->DB->getFieldNames('topics') as $_column) { if ($this->lang->words['col__topics_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__topics_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_finalColumns['topic_title'] = array("$r['topic_title']", $this->lang->words['col__topics_title']); $_finalColumns['lastpost'] = array("$r['lastpost']", $this->lang->words['col__topics_last_post']); $_finalColumns['lastposter'] = array("$r['lastposter']", $this->lang->words['col__topics_last_poster_id']); $_finalColumns['lastpostername'] = array("$r['lastpostername']", $this->lang->words['col__topics_last_poster_name']); $_finalColumns['topic_posts'] = array("$r['topic_posts']", $this->lang->words['col__topics_posts']); foreach ($this->DB->getFieldNames('forums') as $_column) { if ($this->lang->words['col__forums_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__forums_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $_finalColumns['fid'] = array("$r['fid']", $this->lang->words['col__forums_id']); $_finalColumns['fname'] = array("$r['fname']", $this->lang->words['col__forums_name']); $this->_addMemberColumns($_finalColumns, $_noinfoColumns); $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_replies'] => array(array('$records', $this->lang->words['block_feed__replies'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; } return $_return; }
/** * Return the tag help for this block type * * @access public * @param string Additional info (database id;type) * @return array */ public function getTags($info = '') { $_return = array(); $_noinfoColumns = array(); //----------------------------------------- // Switch on type //----------------------------------------- switch ($info) { case 'members': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__memberurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__memberdate']), 'title' => array("$r['title']", $this->lang->words['block_feed__membertitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__membercontent'])); $this->_addMemberColumns($_finalColumns, $_noinfoColumns); $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_members'] => array(array('$records', $this->lang->words['block_feed__members'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; case 'comments': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__memcommurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__memcommdate']), 'title' => array("$r['title']", $this->lang->words['block_feed__memcommtitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__memcommcontent'])); foreach ($this->DB->getFieldNames('member_status_updates') as $_column) { if ($this->lang->words['col__profile_comments_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__profile_comments_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $this->_addMemberColumns($_finalColumns, $_noinfoColumns, 'poster'); $this->_addMemberColumns($_finalColumns, $_noinfoColumns, 'receiver'); $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_memcomm'] => array(array('$records', $this->lang->words['block_feed__memcomm'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; case 'status': $_finalColumns = array('url' => array("$r['url']", $this->lang->words['block_feed__statusurl']), 'date' => array("$r['date']", $this->lang->words['block_feed__statusdate']), 'title' => array("$r['title']", $this->lang->words['block_feed__statustitle']), 'content' => array("$r['content']", $this->lang->words['block_feed__statuscontent'])); foreach ($this->DB->getFieldNames('member_status_updates') as $_column) { if ($this->lang->words['col__member_status_updates_' . $_column]) { $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__member_status_updates_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } foreach ($this->DB->getFieldNames('member_status_replies') as $_column) { if ($this->lang->words['col__member_status_replies_' . $_column]) { unset($_finalColumns[$_column]); $_finalColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['col__member_status_replies_' . $_column]); } else { $_noinfoColumns[$_column] = array("$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true); } } $this->_addMemberColumns($_finalColumns, $_noinfoColumns, 'member'); $_return = array($this->lang->words['block_feed__generic'] => array(array('$title', $this->lang->words['block_feed__title'])), $this->lang->words['block_feed_status'] => array(array('$records', $this->lang->words['block_feed__status'], IPSLib::mergeArrays($_finalColumns, $_noinfoColumns)))); break; } return $_return; }