当前位置: 首页>>代码示例>>PHP>>正文


PHP user::img方法代码示例

本文整理汇总了PHP中phpbb\user::img方法的典型用法代码示例。如果您正苦于以下问题:PHP user::img方法的具体用法?PHP user::img怎么用?PHP user::img使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpbb\user的用法示例。


在下文中一共展示了user::img方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: viewtopic_modify_data

 /**
  * Show bbcodes and smilies in the quickreply
  * Template data for Ajax submit
  *
  * @param object $event The event object
  * @return null
  * @access public
  */
 public function viewtopic_modify_data($event)
 {
     $forum_id = $event['forum_id'];
     $topic_data = $event['topic_data'];
     $post_list = $event['post_list'];
     $topic_id = $topic_data['topic_id'];
     $s_quick_reply = false;
     if (($this->user->data['is_registered'] || $this->config['qr_allow_for_guests']) && $this->config['allow_quick_reply'] && $topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY && $this->auth->acl_get('f_reply', $forum_id)) {
         // Quick reply enabled forum
         $s_quick_reply = $topic_data['forum_status'] == ITEM_UNLOCKED && $topic_data['topic_status'] == ITEM_UNLOCKED || $this->auth->acl_get('m_edit', $forum_id) ? true : false;
     }
     if (!$this->user->data['is_registered'] && $s_quick_reply) {
         add_form_key('posting');
         $s_attach_sig = $this->config['allow_sig'] && $this->user->optionget('attachsig') && $this->auth->acl_get('f_sigs', $forum_id) && $this->auth->acl_get('u_sig');
         $s_smilies = $this->config['allow_smilies'] && $this->user->optionget('smilies') && $this->auth->acl_get('f_smilies', $forum_id);
         $s_bbcode = $this->config['allow_bbcode'] && $this->user->optionget('bbcode') && $this->auth->acl_get('f_bbcode', $forum_id);
         $s_notify = false;
         $qr_hidden_fields = array('topic_cur_post_id' => (int) $topic_data['topic_last_post_id'], 'lastclick' => (int) time(), 'topic_id' => (int) $topic_data['topic_id'], 'forum_id' => (int) $forum_id);
         // Originally we use checkboxes and check with isset(), so we only provide them if they would be checked
         !$s_bbcode ? $qr_hidden_fields['disable_bbcode'] = 1 : true;
         !$s_smilies ? $qr_hidden_fields['disable_smilies'] = 1 : true;
         !$this->config['allow_post_links'] ? $qr_hidden_fields['disable_magic_url'] = 1 : true;
         $s_attach_sig ? $qr_hidden_fields['attach_sig'] = 1 : true;
         $s_notify ? $qr_hidden_fields['notify'] = 1 : true;
         $topic_data['topic_status'] == ITEM_LOCKED ? $qr_hidden_fields['lock_topic'] = 1 : true;
         $this->template->assign_vars(array('S_QUICK_REPLY' => true, 'U_QR_ACTION' => append_sid("{$this->phpbb_root_path}posting.{$this->php_ext}", "mode=reply&f={$forum_id}&t={$topic_id}"), 'QR_HIDDEN_FIELDS' => build_hidden_fields($qr_hidden_fields), 'USERNAME' => $this->request->variable('username', '', true)));
         if ($this->config['enable_post_confirm']) {
             $captcha = $this->captcha->get_instance($this->config['captcha_plugin']);
             $captcha->init(CONFIRM_POST);
         }
         if ($this->config['enable_post_confirm'] && (isset($captcha) && $captcha->is_solved() === false)) {
             $this->template->assign_vars(array('S_CONFIRM_CODE' => true, 'CAPTCHA_TEMPLATE' => $captcha->get_template()));
         }
         // Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
         if (isset($captcha) && $captcha->is_solved() !== false) {
             $this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields($captcha->get_hidden_fields()));
         }
     }
     // Ajaxify viewtopic data
     if ($this->request->is_ajax() && $this->request->is_set('qr_request')) {
         if (!$this->user->data['is_registered'] && $this->config['enable_post_confirm']) {
             $captcha = $this->captcha->get_instance($this->config['captcha_plugin']);
             $captcha->init(CONFIRM_POST);
             // Add the confirm id/code pair to the hidden fields, else an error is displayed on next submit/preview
             if (isset($captcha) && $captcha->is_solved() !== false) {
                 $this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields($captcha->get_hidden_fields()));
             }
         }
         // Fix issues if the inserted post is not the first.
         if ($this->qr_insert && !$this->qr_first) {
             $this->template->alter_block_array('postrow', array('S_FIRST_ROW' => false), false, 'change');
         }
         $page_title = $event['page_title'];
         $this->template->assign_vars(array('S_QUICKREPLY_REQUEST' => true, 'S_QR_NO_FIRST_POST' => $this->qr_insert, 'S_QR_FULL_QUOTE' => $this->config['qr_full_quote']));
         $this->template->append_var('QR_HIDDEN_FIELDS', build_hidden_fields(array('qr' => 1, 'qr_cur_post_id' => (int) max($post_list))));
         // Output the page
         page_header($page_title, false, $forum_id);
         page_footer(false, false, false);
         $json_response = new \phpbb\json_response();
         $json_response->send(array('success' => true, 'result' => $this->template->assign_display('@tatiana5_quickreply/quickreply_template.html', '', true), 'insert' => $this->qr_insert));
     }
     if ($s_quick_reply) {
         include_once $this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext;
         // HTML, BBCode, Smilies, Images and Flash status
         $bbcode_status = $this->config['allow_bbcode'] && $this->config['qr_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id) ? true : false;
         $smilies_status = $this->config['allow_smilies'] && $this->config['qr_smilies'] && $this->auth->acl_get('f_smilies', $forum_id) ? true : false;
         $img_status = $bbcode_status && $this->auth->acl_get('f_img', $forum_id) ? true : false;
         $url_status = $this->config['allow_post_links'] ? true : false;
         $flash_status = $bbcode_status && $this->auth->acl_get('f_flash', $forum_id) && $this->config['allow_post_flash'] ? true : false;
         $quote_status = true;
         // Build custom bbcodes array
         if ($bbcode_status) {
             display_custom_bbcodes();
         }
         // Generate smiley listing
         if ($smilies_status) {
             generate_smilies('inline', $forum_id);
         }
         // Show attachment box for adding attachments if true
         $form_enctype = @ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$this->config['allow_attachments'] || !$this->auth->acl_get('u_attach') || !$this->auth->acl_get('f_attach', $forum_id) ? '' : '" enctype="multipart/form-data';
         $allowed = $this->auth->acl_get('f_attach', $forum_id) && $this->auth->acl_get('u_attach') && $this->config['allow_attachments'] && $form_enctype;
         $attachment_data = false;
         if ($bbcode_status || $smilies_status || $this->config['qr_attach'] && $allowed) {
             $this->user->add_lang('posting');
         }
         if ($this->config['qr_attach'] && $allowed) {
             $this->template->assign_vars(array('U_QR_ACTION' => append_sid("{$this->phpbb_root_path}posting.{$this->php_ext}", "mode=reply&f={$forum_id}&t={$topic_id}") . $form_enctype));
             include_once $this->phpbb_root_path . 'includes/message_parser.' . $this->php_ext;
             $message_parser = new \parse_message();
             $message_parser->set_plupload($this->plupload);
             $message_parser->set_mimetype_guesser($this->mimetype_guesser);
             $message_parser->get_submitted_attachment_data($this->user->data['user_id']);
//.........这里部分代码省略.........
开发者ID:edipdincer,项目名称:QuickReply,代码行数:101,代码来源:listener.php

示例2: get_template_center

 /**
  * {@inheritdoc}
  */
 public function get_template_center($module_id)
 {
     if (!function_exists('display_forums')) {
         include $this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext;
     }
     \display_forums('', $this->config['load_moderators'], false);
     $this->template->assign_vars(array('FORUM_IMG' => $this->user->img('forum_read', 'NO_NEW_POSTS'), 'FORUM_NEW_IMG' => $this->user->img('forum_unread', 'NEW_POSTS'), 'FORUM_LOCKED_IMG' => $this->user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'), 'FORUM_NEW_LOCKED_IMG' => $this->user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'), 'U_MARK_FORUMS' => $this->user->data['is_registered'] || $this->config['load_anon_lastread'] ? append_sid("{$this->phpbb_root_path}index.{$this->php_ext}", 'hash=' . generate_link_hash('global') . '&mark=forums') : '', 'U_MCP' => $this->auth->acl_get('m_') || $this->auth->acl_getf_global('m_') ? append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", 'i=main&mode=front', true, $this->user->session_id) : ''));
     return 'forumlist.html';
 }
开发者ID:alhitary,项目名称:Board3-Portal,代码行数:12,代码来源:forumlist.php

示例3: site_logo_header

 /**
  * Update the template variables
  *
  * @param object $event The event object
  * @return null
  * @access public
  */
 public function site_logo_header($event)
 {
     $site_logo_img = $this->config['site_logo_remove'] ? '' : $this->user->img('site_logo');
     if ($this->config['site_logo_image'] && !$this->config['site_logo_remove']) {
         $logo_path = strpos(strtolower($this->config['site_logo_image']), 'http') !== false ? $this->config['site_logo_image'] : append_sid($this->root_path . $this->config['site_logo_image'], false, false);
         $logo_corners = '0px 0px 0px 0px';
         $logo_corners = $this->config['site_logo_left'] ? $this->config['site_logo_pixels'] . 'px 0px 0px ' . $this->config['site_logo_pixels'] . 'px' : $logo_corners;
         $logo_corners = $this->config['site_logo_right'] ? '0px ' . $this->config['site_logo_pixels'] . 'px ' . $this->config['site_logo_pixels'] . 'px 0px' : $logo_corners;
         $logo_corners = $this->config['site_logo_left'] && $this->config['site_logo_right'] ? $this->config['site_logo_pixels'] . 'px ' . $this->config['site_logo_pixels'] . 'px ' . $this->config['site_logo_pixels'] . 'px ' . $this->config['site_logo_pixels'] . 'px' : $logo_corners;
         $site_logo_img = '<img src=' . $logo_path . ' style="max-width: 100%; height:auto; height:' . $this->config['site_logo_height'] . 'px; width:' . $this->config['site_logo_width'] . 'px; -webkit-border-radius: ' . $logo_corners . '; -moz-border-radius: ' . $logo_corners . '; border-radius: ' . $logo_corners . ';">';
     }
     $this->template->assign_vars(array('SITE_DESCRIPTION' => $this->config['site_name_supress'] ? '' : $this->config['site_desc'], 'SITE_LOGO_CENTRE' => $this->config['site_logo_position'] == 1 ? true : false, 'SITE_LOGO_IMG' => $site_logo_img, 'SITE_LOGO_RIGHT' => $this->config['site_logo_position'] == 2 ? true : false, 'SITENAME_SUPRESS' => $this->config['site_name_supress'] ? true : false, 'S_IN_SEARCH' => $this->config['site_search_remove'] ? true : false));
 }
开发者ID:Galixte,项目名称:david63-sitelogo,代码行数:20,代码来源:listener.php

示例4: build

 public function build(array $topic_data, \phpbb\template\twig\twig &$template)
 {
     $this->user->add_lang('viewtopic');
     $forum_id = (int) $topic_data['forum_id'];
     $topic_id = (int) $topic_data['topic_id'];
     $cur_voted_id = $this->_get_users_votes($topic_id);
     $s_can_vote = $this->_user_can_vote($forum_id, $topic_data, $cur_voted_id);
     $viewtopic_url = append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "f={$forum_id}&amp;t={$topic_id}");
     $poll_total = $poll_most = 0;
     $poll_info = $this->_get_poll_info($topic_data, $poll_total, $poll_most);
     $poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
     $this->_build_poll_options($cur_voted_id, $poll_info, $poll_total, $poll_most, $template);
     $template->assign_vars(array('POLL_QUESTION' => $topic_data['poll_title'], 'TOTAL_VOTES' => $poll_total, 'POLL_LEFT_CAP_IMG' => $this->user->img('poll_left'), 'POLL_RIGHT_CAP_IMG' => $this->user->img('poll_right'), 'L_MAX_VOTES' => $this->user->lang('MAX_OPTIONS_SELECT', (int) $topic_data['poll_max_options']), 'L_POLL_LENGTH' => $this->_get_poll_length_lang($topic_data['poll_length'], $poll_end), 'S_CAN_VOTE' => $s_can_vote, 'S_DISPLAY_RESULTS' => $this->_show_results($s_can_vote, $cur_voted_id), 'S_IS_MULTI_CHOICE' => $this->_poll_is_multiple_choice($topic_data['poll_max_options']), 'S_POLL_ACTION' => $viewtopic_url, 'S_FORM_TOKEN' => $this->sitemaker->get_form_key('posting'), 'U_VIEW_RESULTS' => $viewtopic_url . '&amp;view=viewpoll'));
 }
开发者ID:3D-I,项目名称:phpBB-ext-sitemaker,代码行数:14,代码来源:poll.php

示例5: sgp_get_rand_logo

 public function sgp_get_rand_logo()
 {
     $rand_logo = $imglist = $imgs = "";
     // Random logos are disabled config, so return default logo //
     if ($this->k_config['k_allow_rotating_logos'] == 0) {
         return $this->user->img('site_logo');
     }
     mt_srand((double) microtime() * 1000001);
     $logos_dir = $this->phpbb_root_path . 'ext/phpbbireland/portal/styles/' . rawurlencode($this->user->style['style_path']) . '/theme/images/logos';
     $handle = @opendir($logos_dir);
     if (!$handle) {
         return $this->user->img('site_logo');
     }
     while (false !== ($file = readdir($handle))) {
         if (stripos($file, ".gif") || stripos($file, ".jpg") || stripos($file, ".png") && stripos($file, "ogo_") || stripos($file, "logo")) {
             $imglist .= "{$file} ";
         }
     }
     closedir($handle);
     $imglist = explode(" ", $imglist);
     if (sizeof($imglist) < 2) {
         return $user->img('site_logo');
     }
     $random = mt_rand(0, mt_rand(0, sizeof($imglist) - 2));
     $image = $imglist[$random];
     $rand_logo .= '<img src="' . $logos_dir . '/' . $image . '" alt="" /><br />';
     return $rand_logo;
 }
开发者ID:phpbbireland,项目名称:portal,代码行数:28,代码来源:block_block.php

示例6: view

    /**
     * Display popup comment
     *
     * @param	int		$link_id		The category ID
     * @param	int		$page			Page number taken from the URL
     * @param	string	$mode			add|edit
     * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
     * @throws	\phpbb\exception\http_exception
     */
    public function view($link_id, $page, $mode = 'new')
    {
        $this->_check_comments_enable($link_id);
        $comment_id = $this->request->variable('c', 0);
        $view = $this->request->variable('view', '');
        $start = ($page - 1) * $this->config['dir_comments_per_page'];
        $this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
        $this->_populate_form($link_id, $mode);
        $sql = 'SELECT COUNT(comment_id) AS nb_comments
			FROM ' . DIR_COMMENT_TABLE . '
			WHERE comment_link_id = ' . (int) $link_id;
        $result = $this->db->sql_query($sql);
        $nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
        $this->db->sql_freeresult($result);
        // Make sure $start is set to the last page if it exceeds the amount
        $start = $this->pagination->validate_start($start, $this->config['dir_comments_per_page'], $nb_comments);
        $sql_array = array('SELECT' => 'a.comment_id, a.comment_user_id, a. comment_user_ip, a.comment_date, a.comment_text, a.comment_uid, a.comment_bitfield, a.comment_flags, u.username, u.user_id, u.user_colour, z.foe', 'FROM' => array(DIR_COMMENT_TABLE => 'a'), 'LEFT_JOIN' => array(array('FROM' => array(USERS_TABLE => 'u'), 'ON' => 'a.comment_user_id = u.user_id'), array('FROM' => array(ZEBRA_TABLE => 'z'), 'ON' => 'z.user_id = ' . $this->user->data['user_id'] . ' AND z.zebra_id = a.comment_user_id')), 'WHERE' => 'a.comment_link_id = ' . (int) $link_id, 'ORDER_BY' => 'a.comment_date DESC');
        $sql = $this->db->sql_build_query('SELECT', $sql_array);
        $result = $this->db->sql_query_limit($sql, $this->config['dir_comments_per_page'], $start);
        $have_result = false;
        while ($comments = $this->db->sql_fetchrow($result)) {
            $have_result = true;
            $edit_allowed = $this->user->data['is_registered'] && ($this->auth->acl_get('m_edit_comment_dir') || $this->user->data['user_id'] == $comments['comment_user_id'] && $this->auth->acl_get('u_edit_comment_dir'));
            $delete_allowed = $this->user->data['is_registered'] && ($this->auth->acl_get('m_delete_comment_dir') || $this->user->data['user_id'] == $comments['comment_user_id'] && $this->auth->acl_get('u_delete_comment_dir'));
            $this->template->assign_block_vars('comment', array('MINI_POST_IMG' => $this->user->img('icon_post_target', 'POST'), 'S_USER' => get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), 'S_USER_IP' => $comments['comment_user_ip'], 'S_DATE' => $this->user->format_date($comments['comment_date']), 'S_COMMENT' => generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']), 'S_ID' => $comments['comment_id'], 'U_EDIT' => $edit_allowed ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '', 'U_DELETE' => $delete_allowed ? $this->helper->route('ernadoo_phpbbdirectory_comment_delete_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'], '_referer' => $this->helper->get_current_url())) : '', 'S_IGNORE_POST' => $comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id']) ? true : false, 'L_IGNORE_POST' => $comments['foe'] ? $this->user->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), '<a href="' . $this->helper->url('directory/link/' . $link_id . '/comment' . ($page > 1 ? '/' . $page : '') . '?view=show#c' . (int) $comments['comment_id']) . '">', '</a>') : '', 'L_POST_DISPLAY' => $comments['foe'] ? $this->user->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->url('directory/link/' . $link_id . '/comment' . ($page > 1 ? '/' . $page : '') . '?c=' . (int) $comments['comment_id'] . '&view=show#c' . (int) $comments['comment_id']) . '">', '</a>') : '', 'S_INFO' => $this->auth->acl_get('m_info')));
        }
        $base_url = array('routes' => 'ernadoo_phpbbdirectory_comment_view_controller', 'params' => array('link_id' => (int) $link_id));
        $this->pagination->generate_template_pagination($base_url, 'pagination', 'page', $nb_comments, $this->config['dir_comments_per_page'], $start);
        $this->template->assign_vars(array('TOTAL_COMMENTS' => $this->user->lang('DIR_NB_COMMS', (int) $nb_comments), 'S_HAVE_RESULT' => $have_result ? true : false));
        return $this->helper->render('comments.html', $this->user->lang['DIR_COMMENT_TITLE']);
    }
开发者ID:rmcgirr83,项目名称:ext-phpbb-directory,代码行数:40,代码来源:comments.php

示例7: assign_template_variables_for_qr

 /**
  * Assign template variables if quick reply is enabled
  *
  * @param int $forum_id Forum ID
  */
 public function assign_template_variables_for_qr($forum_id)
 {
     if ($this->phpbb_extension_manager->is_enabled('rxu/PostsMerging') && $this->user->data['is_registered'] && $this->config['merge_interval']) {
         // Always show the checkbox if PostsMerging extension is installed.
         $this->user->add_lang_ext('rxu/PostsMerging', 'posts_merging');
         $this->template->assign_var('POSTS_MERGING_OPTION', true);
     }
     $this->template->assign_vars(array('S_QR_COLOUR_NICKNAME' => $this->config['qr_color_nickname'], 'S_QR_NOT_CHANGE_SUBJECT' => $this->auth->acl_get('f_qr_change_subject', $forum_id) ? false : true, 'QR_HIDE_SUBJECT_BOX' => $this->config['qr_hide_subject_box'], 'S_QR_COMMA_ENABLE' => $this->config['qr_comma'], 'S_QR_QUICKNICK_ENABLE' => $this->config['qr_quicknick'], 'S_QR_QUICKNICK_REF' => $this->config['qr_quicknick_ref'], 'S_QR_QUICKNICK_PM' => $this->config['qr_quicknick_pm'], 'S_QR_QUICKQUOTE_ENABLE' => $this->config['qr_quickquote'], 'S_QR_QUICKQUOTE_LINK' => $this->config['qr_quickquote_link'], 'S_QR_FULL_QUOTE' => $this->config['qr_full_quote'], 'S_QR_CE_ENABLE' => $this->config['qr_ctrlenter'], 'QR_SOURCE_POST' => $this->config['qr_source_post'], 'S_DISPLAY_USERNAME' => !$this->user->data['is_registered'], 'MESSAGE' => $this->request->variable('message', '', true), 'READ_POST_IMG' => $this->user->img('icon_post_target', 'POST'), 'S_QR_CAPS_ENABLE' => $this->config['qr_capslock_transfer'], 'S_QR_SHOW_BUTTON_TRANSLIT' => $this->config['qr_show_button_translit'], 'L_FULL_EDITOR' => $this->config['qr_ajax_submit'] ? $this->user->lang['PREVIEW'] : $this->user->lang['FULL_EDITOR'], 'S_QR_AJAX_SUBMIT' => $this->config['qr_ajax_submit'], 'S_QR_AJAX_PAGINATION' => $this->config['qr_ajax_pagination'] && $this->user->data['ajax_pagination'], 'S_QR_ENABLE_SCROLL' => $this->user->data['qr_enable_scroll'], 'S_QR_SCROLL_INTERVAL' => $this->config['qr_scroll_time'], 'S_QR_SOFT_SCROLL' => $this->config['qr_scroll_time'] && $this->user->data['qr_soft_scroll'], 'S_QR_ALLOWED_GUEST' => $this->config['qr_allow_for_guests'] && $this->user->data['user_id'] == ANONYMOUS, 'S_ABBC3_INSTALLED' => $this->phpbb_extension_manager->is_enabled('vse/abbc3')));
 }
开发者ID:DataMedics,项目名称:QuickReply,代码行数:14,代码来源:listener_helper.php

示例8: afficher_photos

 public function afficher_photos($event)
 {
     $user_id = $this->user->data["user_id"];
     $this->user->add_lang_ext('Aurelienazerty/Photos', 'photos');
     $lesPhotos = fonctionGetLastCommentaireForUser($user_id, 10, false);
     $lesPhotos = commentaireForUser($lesPhotos, $user_id);
     $tpl_loopname = 'recent_photos';
     foreach ($lesPhotos['lignesMessage'] as $photo) {
         if ($photo['compteNonLu']) {
             $folder_alt = 'UNREAD_POST';
             $folder_type = 'topic_unread';
             $contexte = $photo['contexte'];
             $tpl_ary = array('LAST_POST_AUTHOR_FULL' => get_username_string('full', $photo['user_id'], $photo['username'], $photo['user_colour']), 'U_VIEW_PHOTO' => $photo['link'], 'PHOTO_TITLE' => $photo['nom'], 'LAST_POST_TIME' => $this->user->format_date($photo['date']), 'TOPIC_FOLDER_IMG_ALT' => $this->user->lang[$folder_alt], 'TOPIC_IMG_STYLE' => $folder_type, 'NEWEST_POST_IMG' => $this->user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'PHOTO_CONTEXTE_URL' => replace_mod_rewrite($contexte[1]['href']), 'PHOTO_CONTEXTE' => $contexte[1]['txt']);
             //$vars = array('photo', 'tpl_ary');
             //extract($this->dispatcher->trigger_event('Aurelienazerty.Photos.modify_tpl_ary', compact($vars)));
             $this->template->assign_block_vars($tpl_loopname, $tpl_ary);
         }
     }
 }
开发者ID:Aurelienazerty,项目名称:Photos,代码行数:19,代码来源:listener.php

示例9: assign_images

 public function assign_images($assign_user_buttons, $assign_post_buttons)
 {
     // may extend to add portal images //
     $this->template->assign_vars(array('REPORTED_IMG' => $this->user->img('icon_topic_reported', 'POST_REPORTED')));
     if ($assign_user_buttons) {
         $this->template->assign_vars(array('PROFILE_IMG' => $this->user->img('icon_user_profile', 'READ_PROFILE'), 'SEARCH_IMG' => $this->user->img('icon_user_search', 'SEARCH_USER_POSTS'), 'PM_IMG' => $this->user->img('icon_contact_pm', 'SEND_PRIVATE_MESSAGE'), 'EMAIL_IMG' => $this->user->img('icon_contact_email', 'SEND_EMAIL'), 'WWW_IMG' => $this->user->img('icon_contact_www', 'VISIT_WEBSITE'), 'ICQ_IMG' => $this->user->img('icon_contact_icq', 'ICQ'), 'AIM_IMG' => $this->user->img('icon_contact_aim', 'AIM'), 'MSN_IMG' => $this->user->img('icon_contact_msnm', 'MSNM'), 'YIM_IMG' => $this->user->img('icon_contact_yahoo', 'YIM'), 'JABBER_IMG' => $this->user->img('icon_contact_jabber', 'JABBER')));
     }
     if ($assign_post_buttons) {
         $this->template->assign_vars(array('QUOTE_IMG' => $this->user->img('icon_post_quote', 'REPLY_WITH_QUOTE'), 'EDIT_IMG' => $this->user->img('icon_post_edit', 'EDIT_POST'), 'DELETE_IMG' => $this->user->img('icon_post_delete', 'DELETE_POST'), 'INFO_IMG' => $this->user->img('icon_post_info', 'VIEW_INFO'), 'REPORT_IMG' => $this->user->img('icon_post_report', 'REPORT_POST'), 'WARN_IMG' => $this->user->img('icon_user_warn', 'WARN_USER')));
     }
 }
开发者ID:phpbbireland,项目名称:portal,代码行数:11,代码来源:main.php

示例10: image

 /**
  * Generate markup for the given solved indicator image.
  *
  * @param string $type One of "head", "list", or "post".
  * @param string $alt Language code for title and alternative text.
  * @param string $url Optional link to solved post.
  *
  * @return string HTML markup for image.
  */
 public function image($type, $alt = '', $url = '')
 {
     $title = '';
     $markup = $this->user->img('icon_solved_' . $type, $alt);
     if (!empty($alt)) {
         $alt = $this->user->lang($alt);
         $title = ' title="' . htmlspecialchars($alt, ENT_QUOTES, 'UTF-8') . '"';
     }
     if (!empty($url)) {
         $markup = sprintf('<a href="%s"%s>%s</a>', htmlspecialchars($url, ENT_QUOTES, 'UTF-8'), $title, $markup);
     }
     return $markup;
 }
开发者ID:tierra,项目名称:topicsolved,代码行数:22,代码来源:topicsolved.php

示例11: output_thanks

 public function output_thanks($poster_id, &$postrow, $row, $topic_data, $forum_id)
 {
     if (!empty($postrow)) {
         $thanks_text = $this->get_thanks_text($row['post_id']);
         $thank_mode = $this->get_thanks_link($row['post_id']);
         $already_thanked = $this->already_thanked($row['post_id'], $this->user->data['user_id']);
         $l_poster_receive_count = isset($this->poster_list_count[$poster_id]['R']) && $this->poster_list_count[$poster_id]['R'] ? $this->user->lang('THANKS', (int) $this->poster_list_count[$poster_id]['R']) : '';
         $l_poster_give_count = isset($this->poster_list_count[$poster_id]['G']) && $this->poster_list_count[$poster_id]['G'] ? $this->user->lang('THANKS', (int) $this->poster_list_count[$poster_id]['G']) : '';
         // Correctly form URLs
         $u_receive_count_url = $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller_user', array('mode' => 'givens', 'author_id' => $poster_id, 'give' => 'false', 'tslash' => ''));
         $u_give_count_url = $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller_user', array('mode' => 'givens', 'author_id' => $poster_id, 'give' => 'true', 'tslash' => ''));
         $postrow = array_merge($postrow, $thanks_text, array('COND' => $already_thanked ? true : false, 'THANKS' => $this->get_thanks($row['post_id']), 'THANK_MODE' => $thank_mode, 'THANKS_LINK' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $forum_id . '&amp;p=' . $row['post_id'] . '&amp;' . $thank_mode . '=' . $row['post_id'] . '&amp;to_id=' . $poster_id . '&amp;from_id=' . $this->user->data['user_id']), 'THANK_TEXT' => $this->user->lang['THANK_TEXT_1'], 'THANK_TEXT_2' => $this->get_thanks_number($row['post_id']) != 1 ? sprintf($this->user->lang['THANK_TEXT_2PL'], $this->get_thanks_number($row['post_id'])) : $this->user->lang['THANK_TEXT_2'], 'THANKS_FROM' => $this->user->lang['THANK_FROM'], 'POSTER_RECEIVE_COUNT' => $l_poster_receive_count, 'POSTER_GIVE_COUNT' => $l_poster_give_count, 'POSTER_RECEIVE_COUNT_LINK' => $u_receive_count_url, 'POSTER_GIVE_COUNT_LINK' => $u_give_count_url, 'S_IS_OWN_POST' => $this->user->data['user_id'] == $poster_id ? true : false, 'S_POST_ANONYMOUS' => $poster_id == ANONYMOUS ? true : false, 'THANK_IMG' => $already_thanked ? $this->user->img('removethanks', $this->user->lang['REMOVE_THANKS'] . get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : $this->user->img('thankposts', $this->user->lang['THANK_POST'] . get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])), 'DELETE_IMG' => $this->user->img('icon_post_delete', $this->user->lang['CLEAR_LIST_THANKS']), 'THANKS_POSTLIST_VIEW' => isset($this->config['thanks_postlist_view']) ? $this->config['thanks_postlist_view'] : false, 'THANKS_COUNTERS_VIEW' => isset($this->config['thanks_counters_view']) ? $this->config['thanks_counters_view'] : false, 'S_ALREADY_THANKED' => $already_thanked, 'S_REMOVE_THANKS' => isset($this->config['remove_thanks']) ? $this->config['remove_thanks'] : false, 'S_FIRST_POST_ONLY' => isset($this->config['thanks_only_first_post']) ? $this->config['thanks_only_first_post'] : false, 'POST_REPUT' => $this->get_thanks_number($row['post_id']) != 0 ? round($this->get_thanks_number($row['post_id']) / ($this->max_post_thanks / 100), $this->config['thanks_number_digits']) . '%' : '', 'S_THANKS_POST_REPUT_VIEW' => isset($this->config['thanks_post_reput_view']) ? (bool) $this->config['thanks_post_reput_view'] : false, 'S_THANKS_REPUT_GRAPHIC' => isset($this->config['thanks_reput_graphic']) ? $this->config['thanks_reput_graphic'] : false, 'THANKS_REPUT_HEIGHT' => isset($this->config['thanks_reput_height']) ? sprintf('%dpx', $this->config['thanks_reput_height']) : false, 'THANKS_REPUT_GRAPHIC_WIDTH' => isset($this->config['thanks_reput_level']) ? isset($this->config['thanks_reput_height']) ? sprintf('%dpx', $this->config['thanks_reput_level'] * $this->config['thanks_reput_height']) : false : false, 'THANKS_REPUT_IMAGE' => isset($this->config['thanks_reput_image']) ? $this->phpbb_root_path . $this->config['thanks_reput_image'] : '', 'THANKS_REPUT_IMAGE_BACK' => isset($this->config['thanks_reput_image_back']) ? $this->phpbb_root_path . $this->config['thanks_reput_image_back'] : '', 'S_GLOBAL_POST_THANKS' => $topic_data['topic_type'] == POST_GLOBAL ? isset($this->config['thanks_global_post']) ? !$this->config['thanks_global_post'] : true : false, 'U_CLEAR_LIST_THANKS_POST' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $forum_id . '&amp;p=' . $row['post_id'] . '&amp;list_thanks=post'), 'S_MOD_THANKS' => $this->auth->acl_get('m_thanks'), 'S_ONLY_TOPICSTART' => $topic_data['topic_first_post_id'] == $row['post_id'] ? true : false));
     }
 }
开发者ID:borgesjoaquim,项目名称:thanks_for_posts,代码行数:14,代码来源:helper.php

示例12: get_topic_tpl_row

 /**
  * Get topic template row.
  *
  * @param array $row
  * @return array
  */
 protected function get_topic_tpl_row($row)
 {
     $topic = new \titania_topic();
     $topic->__set_array($row);
     $additional_unread_fields = array(array('type' => TITANIA_SUPPORT, 'id' => 0), array('type' => TITANIA_SUPPORT, 'parent_match' => true), array('type' => TITANIA_QUEUE_DISCUSSION, 'id' => 0, 'type_match' => true));
     $topic->additional_unread_fields = array_merge($topic->additional_unread_fields, $additional_unread_fields);
     $subscription_target = '';
     $type_lang = array(TITANIA_QUEUE_DISCUSSION => 'SUBSCRIPTION_QUEUE_VALIDATION', TITANIA_QUEUE => 'SUBSCRIPTION_QUEUE', TITANIA_SUPPORT => 'SUBSCRIPTION_SUPPORT_TOPIC');
     if (isset($type_lang[$row['topic_type']])) {
         $subscription_target = $this->user->lang($type_lang[$row['topic_type']]);
     }
     // Tracking check
     $last_read_mark = $this->tracking->get_track(TITANIA_TOPIC, $topic->topic_id, true);
     $last_read_mark = max($last_read_mark, $this->tracking->find_last_read_mark($topic->additional_unread_fields, $topic->topic_type, $topic->parent_id));
     $topic->unread = $topic->topic_last_post_time > $last_read_mark;
     // Get the folder image
     $topic->topic_folder_img($folder_img, $folder_alt);
     return array('FOLDER_STYLE' => $folder_img, 'LAST_POST_IMG' => $this->user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'SUBSCRIPTION_AUTHOR_FULL' => \users_overlord::get_user($row['topic_first_post_user_id'], '_full'), 'SUBSCRIPTION_ID' => $row['topic_id'], 'SUBSCRIPTION_LAST_AUTHOR_FULL' => \users_overlord::get_user($row['topic_last_post_user_id'], '_full'), 'SUBSCRIPTION_LAST_TIME' => $this->user->format_date($row['topic_last_post_time']), 'SUBSCRIPTION_TIME' => $this->user->format_date($row['topic_time']), 'SUBSCRIPTION_TARGET' => $subscription_target, 'SUBSCRIPTION_TITLE' => censor_text($row['topic_subject']), 'SUBSCRIPTION_TYPE' => $row['watch_object_type'], 'U_VIEW_SUBSCRIPTION' => $this->get_real_url($topic->get_url()), 'U_VIEW_LAST_POST' => $this->get_real_url($topic->get_url(false, array('p' => $topic->topic_last_post_id, '#' => 'p' . $topic->topic_last_post_id))), 'S_ACCESS_TEAMS' => $row['topic_access'] == access::TEAM_LEVEL || $row['topic_type'] == TITANIA_QUEUE, 'S_ACCESS_AUTHORS' => $row['topic_access'] == access::AUTHOR_LEVEL, 'S_TOPIC' => true);
 }
开发者ID:Sajaki,项目名称:customisation-db,代码行数:25,代码来源:subscriptions.php

示例13: display

 /**
  * {@inheritdoc}
  */
 public function display(array $bdata, $edit_mode = false)
 {
     $this->user->add_lang('viewtopic');
     $this->settings = $bdata['settings'];
     if (!($topic_data = $this->_get_topic_data())) {
         return array('title' => '', 'content' => '');
     }
     $forum_id = (int) $topic_data['forum_id'];
     $topic_id = (int) $topic_data['topic_id'];
     $viewtopic_url = append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "f={$forum_id}&amp;t={$topic_id}");
     $cur_voted_id = $this->_get_users_votes($topic_id);
     $s_can_vote = $this->_user_can_vote($forum_id, $topic_data, $cur_voted_id);
     $poll_total = $poll_most = 0;
     $poll_info = $this->_get_poll_info($topic_data, $poll_total, $poll_most);
     $poll_info = $this->_parse_poll($topic_data, $poll_info);
     $poll_end = $topic_data['poll_length'] + $topic_data['poll_start'];
     $this->_build_poll_options($cur_voted_id, $poll_info, $poll_total, $poll_most);
     $this->ptemplate->assign_vars(array('POLL_QUESTION' => $topic_data['poll_title'], 'TOTAL_VOTES' => $poll_total, 'POLL_LEFT_CAP_IMG' => $this->user->img('poll_left'), 'POLL_RIGHT_CAP_IMG' => $this->user->img('poll_right'), 'L_MAX_VOTES' => $this->user->lang('MAX_OPTIONS_SELECT', (int) $topic_data['poll_max_options']), 'L_POLL_LENGTH' => $this->_get_poll_length_lang($topic_data['poll_length'], $poll_end), 'S_CAN_VOTE' => $s_can_vote, 'S_DISPLAY_RESULTS' => $this->_show_results($s_can_vote, $cur_voted_id), 'S_IS_MULTI_CHOICE' => $this->_poll_is_multiple_choice($topic_data['poll_max_options']), 'S_POLL_ACTION' => $viewtopic_url, 'S_FORM_TOKEN' => $this->sitemaker->get_form_key('posting'), 'U_VIEW_RESULTS' => $viewtopic_url . '&amp;view=viewpoll'));
     return array('title' => 'POLL', 'content' => $this->ptemplate->render_view('blitze/sitemaker', 'blocks/forum_poll.html', 'forum_poll_block'));
 }
开发者ID:BogusCurry,项目名称:phpBB-ext-sitemaker,代码行数:23,代码来源:forum_poll.php

示例14: show_tag

 /**
  * Shows a list of topics that have the given $tags assigned
  *
  * @param $tags tags seperated by comma (",")
  * @param $mode the mode indicates whether all tags (AND, default) or any tag (OR) should be assigned to the resulting topics
  * @param casesensitive wether to search case-sensitive (true) or -insensitive (false, default)
  */
 public function show_tag($tags, $mode, $casesensitive)
 {
     // validate mode
     // default == AND
     $mode = $mode == 'OR' ? 'OR' : 'AND';
     $tags = explode(',', urldecode($tags));
     // remove possible duplicates
     $tags = array_unique($tags);
     $all_tags = $this->tags_manager->split_valid_tags($tags);
     if (sizeof($all_tags['invalid']) > 0) {
         $this->template->assign_var('RH_TOPICTAGS_SEARCH_IGNORED_TAGS', $this->user->lang('RH_TOPICTAGS_SEARCH_IGNORED_TAGS', join(', ', $all_tags['invalid'])));
     }
     $tags = $all_tags['valid'];
     $tags_string = join(', ', $tags);
     $this->template->assign_var('RH_TOPICTAGS_SEARCH_HEADER', $this->user->lang('RH_TOPICTAGS_SEARCH_HEADER_' . $mode, $tags_string));
     if (empty($tags)) {
         // no valid tags
         $this->template->assign_var('NO_TOPICS_FOR_TAG', $this->user->lang('RH_TOPICTAGS_NO_TOPICS_FOR_NO_TAG'));
         return $this->helper->render('show_tag.html', $this->user->lang('RH_TOPICTAGS_TAG_SEARCH'));
     }
     $topics_count = $this->tags_manager->count_topics_by_tags($tags, $mode, $casesensitive);
     if ($topics_count <= 0) {
         $this->template->assign_var('NO_TOPICS_FOR_TAG', $this->user->lang('RH_TOPICTAGS_NO_TOPICS_FOR_TAG_' . $mode, $tags_string));
     } else {
         $pagination = $this->pagination;
         $start = $this->request->variable('start', 0);
         $limit = $this->config['topics_per_page'];
         $start = $pagination->validate_start($start, $limit, $topics_count);
         $topics = $this->tags_manager->get_topics_by_tags($tags, $start, $limit, $mode, $casesensitive);
         $base_url = $this->helper->route('robertheim_topictags_show_tag_controller', array('tags' => urlencode($tags_string)));
         $base_url = append_sid($base_url);
         $pagination->generate_template_pagination($base_url, 'pagination', 'start', $topics_count, $limit, $start);
         $this->user->add_lang('viewforum');
         $this->template->assign_vars(array('TOTAL_TOPICS' => $this->user->lang('VIEW_FORUM_TOPICS', $topics_count), 'NEWEST_POST_IMG' => $this->user->img('icon_topic_newest', 'VIEW_NEWEST_POST'), 'LAST_POST_IMG' => $this->user->img('icon_topic_latest', 'VIEW_LATEST_POST'), 'REPORTED_IMG' => $this->user->img('icon_topic_reported', 'TOPIC_REPORTED'), 'UNAPPROVED_IMG' => $this->user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'), 'DELETED_IMG' => $this->user->img('icon_topic_deleted', 'TOPIC_DELETED'), 'POLL_IMG' => $this->user->img('icon_topic_poll', 'TOPIC_POLL'), 'S_TOPIC_ICONS' => true));
         $this->display_topics($topics);
     }
     // else
     return $this->helper->render('show_tag.html', $this->user->lang('RH_TOPICTAGS_TAG_SEARCH'));
 }
开发者ID:NuLeaf,项目名称:phpbb-ext-tags,代码行数:46,代码来源:main.php

示例15: add_header_quicklinks

 public function add_header_quicklinks($event)
 {
     $u_thankslist = $this->controller_helper->route('gfksx_ThanksForPosts_thankslist_controller', array('tslash' => ''));
     $u_toplist = $this->controller_helper->route('gfksx_ThanksForPosts_toplist_controller', array('tslash' => ''));
     $this->template->assign_vars(array('U_THANKS_LIST' => $u_thankslist, 'U_REPUT_TOPLIST' => $u_toplist, 'S_DISPLAY_THANKSLIST' => $this->auth->acl_get('u_viewthanks'), 'S_DISPLAY_TOPLIST' => $this->auth->acl_get('u_viewtoplist'), 'MINI_THANKS_IMG' => $this->user->img('icon_mini_thanks', $this->user->lang['GRATITUDES']), 'MINI_TOPLIST_IMG' => $this->user->img('icon_mini_toplist', $this->user->lang['TOPLIST'])));
 }
开发者ID:nerestaren,项目名称:thanks_for_posts,代码行数:6,代码来源:listener.php


注:本文中的phpbb\user::img方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。