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


PHP construct_phrase函数代码示例

本文整理汇总了PHP中construct_phrase函数的典型用法代码示例。如果您正苦于以下问题:PHP construct_phrase函数的具体用法?PHP construct_phrase怎么用?PHP construct_phrase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: print_move_prune_rows

function print_move_prune_rows($permcheck = '')
{
    global $vbphrase;
    print_description_row($vbphrase['date_options'], 0, 2, 'thead', 'center');
    print_input_row($vbphrase['original_post_date_is_at_least_xx_days_ago'], 'thread[originaldaysolder]', 0, 1, 5);
    print_input_row($vbphrase['original_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[originaldaysnewer]', 0, 1, 5);
    print_input_row($vbphrase['last_post_date_is_at_least_xx_days_ago'], 'thread[lastdaysolder]', 0, 1, 5);
    print_input_row($vbphrase['last_post_date_is_at_most_xx_days_ago'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '0') . '</dfn>', 'thread[lastdaysnewer]', 0, 1, 5);
    print_description_row($vbphrase['view_options'], 0, 2, 'thead', 'center');
    print_input_row($vbphrase['thread_has_at_least_xx_replies'], 'thread[repliesleast]', 0, 1, 5);
    print_input_row($vbphrase['thread_has_at_most_xx_replies'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[repliesmost]', -1, 1, 5);
    print_input_row($vbphrase['thread_has_at_least_xx_views'], 'thread[viewsleast]', 0, 1, 5);
    print_input_row($vbphrase['thread_has_at_most_xx_views'] . '<dfn>' . construct_phrase($vbphrase['note_leave_x_specify_no_limit'], '-1') . '</dfn>', 'thread[viewsmost]', -1, 1, 5);
    print_description_row($vbphrase['status_options'], 0, 2, 'thead', 'center');
    print_yes_no_other_row($vbphrase['thread_is_sticky'], 'thread[issticky]', $vbphrase['either'], 0);
    $state = array('visible' => $vbphrase['visible'], 'moderation' => $vbphrase['awaiting_moderation'], 'deleted' => $vbphrase['deleted'], 'any' => $vbphrase['any']);
    print_radio_row($vbphrase['thread_state'], 'thread[state]', $state, 'any');
    $status = array('open' => $vbphrase['open'], 'closed' => $vbphrase['closed'], 'redirect' => $vbphrase['redirect'], 'not_redirect' => $vbphrase['not_redirect'], 'any' => $vbphrase['any']);
    print_radio_row($vbphrase['thread_status'], 'thread[status]', $status, 'not_redirect');
    print_description_row($vbphrase['other_options'], 0, 2, 'thead', 'center');
    print_input_row($vbphrase['username'], 'thread[posteduser]');
    print_input_row($vbphrase['title'], 'thread[titlecontains]');
    print_moderator_forum_chooser('thread[forumid]', -1, $vbphrase['all_forums'], $vbphrase['forum'], true, false, true, $permcheck);
    print_yes_no_row($vbphrase['include_child_forums'], 'thread[subforums]');
    if ($prefix_options = construct_prefix_options(0, '', true, true)) {
        print_label_row($vbphrase['prefix'], '<select name="thread[prefixid]" class="bginput">' . $prefix_options . '</select>', '', 'top', 'prefixid');
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:28,代码来源:thread.php

示例2: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $commentinfo =& $this->content['album_picturecomment'][$activity['contentid']];
     $albuminfo =& $this->content['album'][$commentinfo['albumid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($commentinfo['pagetext']);
     $commentinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $userinfo = $this->fetchUser($activity['userid'], $commentinfo['postusername']);
     $userinfo2 = $this->fetchUser($albuminfo['userid']);
     if ($fetchphrase) {
         if ($userinfo['userid']) {
             $phrase = construct_phrase($this->vbphrase['x_commented_on_a_photo_in_album_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']);
         } else {
             $phrase = construct_phrase($this->vbphrase['guest_x_commented_on_a_photo_in_album_y'], $userinfo['username'], fetch_seo_url('member', $userinfo2), $userinfo2['username'], vB::$vbulletin->session->vars['sessionurl'], $albuminfo['albumid'], $albuminfo['title']);
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('userinfo2', $userinfo2);
         $templater->register('activity', $activity);
         $templater->register('commentinfo', $commentinfo);
         $templater->register('albuminfo', $albuminfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:comment.php

示例3: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $messageinfo =& $this->content['visitormessage'][$activity['contentid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $userinfo2 =& $this->content['user'][$messageinfo['userid']];
     $messageinfo['preview'] = strip_quotes($messageinfo['pagetext']);
     $messageinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($messageinfo['preview'], false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $userinfo = $this->fetchUser($activity['userid'], $messageinfo['postusername']);
     if ($fetchphrase) {
         if ($userinfo['userid']) {
             $phrase = construct_phrase($this->vbphrase['x_created_a_visitormessage_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
         } else {
             $phrase = construct_phrase($this->vbphrase['guest_x_created_a_visitormessage_y_in_z'], $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('userinfo2', $userinfo2);
         $templater->register('linkinfo', array('vmid' => $messageinfo['vmid']));
         $templater->register('linkinfo2', array('tab' => 'visitor_messaging'));
         $templater->register('activity', $activity);
         $templater->register('messageinfo', $messageinfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:visitormessage.php

示例4: showItem

 function showItem()
 {
     global $vbulletin, $vbphrase, $itembit_right_column;
     $showvalues = false;
     $this->getExtraInfo();
     if ($this->data['status'] == KBANK_ITEM_ENABLED) {
         if ($this->itemtypedata['options']['postbg']) {
             if ($this->data['options']['postbg']) {
                 $postbg_url = $this->data['options']['postbg'];
                 $postbgs = explode("\r\n", $this->itemtypedata['options']['postbg_list']);
                 $postbg_name = '';
                 foreach ($postbgs as $postbg) {
                     $tmp = explode(':', $postbg);
                     if ($tmp[0] == $postbg_url and isset($tmp[1])) {
                         $postbg_name = $tmp[1];
                     }
                 }
                 if ($postbg_name == '') {
                     $postbg_name = basename($postbg_url);
                 }
                 $postbg_position = $this->itemtype->options['postbg_positions'][$this->data['options']['postbg_position']];
                 $itembit_right_column .= construct_phrase($vbphrase['kbank_itemshow_customize_postdisplay_postbg'], $postbg_url, $postbg_name, $postbg_position);
             }
         }
     }
     return parent::showItem();
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:customize_postdisplay.kbank.php

示例5: showItem

 function showItem()
 {
     global $vbulletin, $vbphrase, $itembit_right_column;
     $this->getExtraInfo();
     if ($this->data['status'] == KBANK_ITEM_ENABLED) {
         $itembit_right_column .= construct_phrase($vbphrase['kbank_announce_show_link'], $this->data['options']['url'], $vbulletin->kbankBBCodeParser->parse($this->data['options']['text'], 'nonforum'));
     }
     return parent::showItem();
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:9,代码来源:announce.kbank.php

示例6: fetch_announcement_permission_error_phrase

/**
* Returns the phrase name for an error message
*
* @param	integer	Magic error number
*
* @return	string
*/
function fetch_announcement_permission_error_phrase($errno)
{
    global $vbphrase;
    switch ($errno) {
        case 1:
            return 'you_do_not_have_permission_global';
            break;
        case 2:
            return 'you_do_not_have_permission_forum';
            break;
        default:
            return construct_phrase($vbphrase['unknown_error'], $errno);
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:21,代码来源:adminfunctions_announcement.php

示例7: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $groupinfo =& $this->content['socialgroup'][$activity['contentid']];
     $userinfo =& $this->content['user'][$activity['userid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     if ($fetchphrase) {
         return array('phrase' => construct_phrase($this->vbphrase['x_created_a_group_y'], fetch_seo_url('member', $userinfo), $userinfo['username'], vB::$vbulletin->session->vars['sessionurl'], $groupinfo['groupid'], $groupinfo['name']), 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('groupinfo', $groupinfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:16,代码来源:group.php

示例8: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $userinfo =& $this->content['user'][$activity['userid']];
     $bloginfo =& $this->content['blog'][$activity['contentid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($bloginfo['pagetext']);
     $bloginfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     if ($fetchphrase) {
         return array('phrase' => construct_phrase($this->vbphrase['x_created_a_blog_entry_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('entry', $bloginfo), $bloginfo['title'], fetch_seo_url('blog', $bloginfo), $bloginfo['blog_title']), 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('bloginfo', $bloginfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:entry.php

示例9: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     global $show;
     $postinfo =& $this->content['post'][$activity['contentid']];
     $threadinfo =& $this->content['thread'][$postinfo['threadid']];
     $foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']];
     $threadinfo['prefix_plain_html'] = htmlspecialchars_uni($this->vbphrase["prefix_{$threadinfo['prefixid']}_title_plain"]);
     $threadinfo['prefix_rich'] = $this->vbphrase["prefix_{$threadinfo['prefixid']}_title_rich"];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($postinfo['pagetext']);
     $postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $forumperms = fetch_permissions($threadinfo['forumid']);
     $show['threadcontent'] = $forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'] ? true : false;
     $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
     if ($fetchphrase) {
         if ($threadinfo['pollid']) {
             if ($userinfo['userid']) {
                 $phrase = construct_phrase($this->vbphrase['x_replied_to_a_poll_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             } else {
                 $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_poll_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             }
         } else {
             if ($userinfo['userid']) {
                 $phrase = construct_phrase($this->vbphrase['x_replied_to_a_thread_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             } else {
                 $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_thread_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             }
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('threadinfo', $threadinfo);
         $templater->register('postinfo', $postinfo);
         $templater->register('pageinfo', array('p' => $postinfo['postid']));
         $templater->register('foruminfo', $foruminfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:post.php

示例10: construct_pagenavigation

function construct_pagenavigation($pagenumber, $perpage, $results, $address)
{
    global $vbphrase;
    $pagenav = '<li><a style="background:-moz-linear-gradient(center top , rgb(0, 0, 0) 5%, rgb(125, 125, 125) 100%) repeat scroll 0% 0% red;background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #000000), color-stop(1, #7D7D7D) );"><span>' . $pagenumber . '</span></a></li>';
    if ($pagenumber - 1 > 0) {
        $pagenav = '<li><a href="' . $address . '&page=' . ($pagenumber - 1) . '" class="active"><span>' . ($pagenumber - 1) . '</span></a></li>' . $pagenav;
    }
    if ($pagenumber - 2 > 0) {
        $pagenav = '<li><a href="' . $address . '&page=' . ($pagenumber - 2) . '" class="active"><span>' . ($pagenumber - 2) . '</span></a></li>' . $pagenav;
    }
    if ($pagenumber + 1 <= ceil($results / $perpage)) {
        $pagenav = $pagenav . '<li><a href="' . $address . '&page=' . ($pagenumber + 1) . '" class="active"><span>' . ($pagenumber + 1) . '</span></a></li>';
    }
    if ($pagenumber + 2 <= ceil($results / $perpage)) {
        $pagenav = $pagenav . '<li><a href="' . $address . '&page=' . ($pagenumber + 2) . '" class="active"><span>' . ($pagenumber + 2) . '</span></a></li>';
    }
    $pagenav = '<ul>
              <li><a><span>' . construct_phrase($vbphrase['page_x_of_y'], $pagenumber, ceil($results / $perpage)) . '</span></a></li>
              <li><a href="' . $address . '&page=1" class="active"><span>' . $vbphrase['first'] . '</span></a></li>
              ' . $pagenav . '
              <li><a href="' . $address . '&page=' . ceil($results / $perpage) . '" class="active"><span>' . $vbphrase['last'] . '</span></a></li>
              </ul>';
    return $pagenav;
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:24,代码来源:function.php

示例11: import_dependencies

 /**
  * Import System Dependencies
  *
  */
 public function import_dependencies($dependencylist = null)
 {
     // get system version info
     $system_versions = array('php' => PHP_VERSION, 'vbulletin' => $this->registry->options['templateversion'], 'products' => fetch_product_list(true));
     $mysql_version = $this->db->query_first("SELECT VERSION() AS version");
     $system_versions['mysql'] = $mysql_version['version'];
     if ($dependencylist) {
         $this->productobj['dependencies']['dependency'] = $dependencylist;
     }
     // ############## import dependencies
     if (is_array($this->productobj['dependencies']['dependency'])) {
         $dependencies =& $this->productobj['dependencies']['dependency'];
         if (!isset($dependencies[0])) {
             $dependencies = array($dependencies);
         }
         $dependency_errors = array();
         $ignore_dependency_errors = array();
         // let's check the dependencies
         foreach ($dependencies as $dependency) {
             // if we get an error, we haven't met this dependency
             // if we go through without a problem, we have automatically met
             // all dependencies for this "class" (mysql, php, vb, a specific product, etc)
             $this_dependency_met = true;
             // build a phrase for the version compats -- will look like (minver / maxver)
             if ($dependency['minversion']) {
                 $compatible_phrase = construct_phrase($this->vbphrase['compatible_starting_with_x'], htmlspecialchars_uni($dependency['minversion']));
             } else {
                 $compatible_phrase = '';
             }
             if ($dependency['maxversion']) {
                 $incompatible_phrase = construct_phrase($this->vbphrase['incompatible_with_x_and_greater'], htmlspecialchars_uni($dependency['maxversion']));
             } else {
                 $incompatible_phrase = '';
             }
             if ($compatible_phrase or $incompatible_phrase) {
                 $required_version_info = "({$compatible_phrase}";
                 if ($compatible_phrase and $incompatible_phrase) {
                     $required_version_info .= ' / ';
                 }
                 $required_version_info .= "{$incompatible_phrase})";
             }
             // grab the appropriate installed version string
             if ($dependency['dependencytype'] == 'product') {
                 // group dependencies into types -- individual products get their own group
                 $dependency_type_key = "product-{$dependency['parentproductid']}";
                 // undocumented feature -- you can put a producttitle attribute in a dependency so the id isn't displayed
                 $parent_product_title = !empty($dependency['producttitle']) ? $dependency['producttitle'] : $dependency['parentproductid'];
                 $parent_product = $system_versions['products']["{$dependency['parentproductid']}"];
                 if (!$parent_product) {
                     // required product is not installed
                     $dependency_errors["{$dependency_type_key}"] = construct_phrase($this->vbphrase['product_x_must_be_installed'], htmlspecialchars_uni($parent_product_title), $required_version_info);
                     continue;
                     // can't do version checks if the product isn't installed
                 } else {
                     if ($parent_product['active'] == 0) {
                         // product is installed, but inactive
                         $dependency_errors["{$dependency_type_key}-inactive"] = construct_phrase($this->vbphrase['product_x_must_be_activated'], htmlspecialchars_uni($parent_product_title));
                         $this_dependency_met = false;
                         // allow version checks to continue
                     }
                 }
                 $sys_version_str = $parent_product['version'];
                 $version_incompatible_phrase = 'product_incompatible_version_x_product_y';
             } else {
                 $dependency_type_key = $dependency['dependencytype'];
                 $parent_product_title = '';
                 $sys_version_str = $system_versions["{$dependency['dependencytype']}"];
                 $version_incompatible_phrase = 'product_incompatible_version_x_' . $dependency['dependencytype'];
             }
             // if no version string, we are trying to do an unsupported dep check
             if ($sys_version_str == '') {
                 continue;
             }
             $sys_version = fetch_version_array($sys_version_str);
             // error if installed version < minversion
             if ($dependency['minversion']) {
                 $dep_version = fetch_version_array($dependency['minversion']);
                 for ($i = 0; $i <= 5; $i++) {
                     if ($sys_version["{$i}"] < $dep_version["{$i}"]) {
                         // installed version is too old
                         $dependency_errors["{$dependency_type_key}"] = construct_phrase($this->vbphrase["{$version_incompatible_phrase}"], htmlspecialchars_uni($sys_version_str), $required_version_info, $parent_product_title);
                         $this_dependency_met = false;
                         break;
                     } else {
                         if ($sys_version["{$i}"] > $dep_version["{$i}"]) {
                             break;
                         }
                     }
                 }
             }
             // error if installed version >= maxversion
             if ($dependency['maxversion']) {
                 $dep_version = fetch_version_array($dependency['maxversion']);
                 $all_equal = true;
                 for ($i = 0; $i <= 5; $i++) {
                     if ($sys_version["{$i}"] > $dep_version["{$i}"]) {
//.........这里部分代码省略.........
开发者ID:0hyeah,项目名称:yurivn,代码行数:101,代码来源:class_upgrade_product.php

示例12: ______handle_bbcode_img


//.........这里部分代码省略.........
					if (isset($settings['alignment']))
					{
						switch ($settings['alignment'])
						{
							case 'left':
								$align_class = 'align_left';
								break;
							case 'center':
								$align_class = 'align_center';
								break;
							case 'right':
								$align_class = 'align_right';
								break;
							case '0':
							default:
								// no special css class for none
								$align_class = '';
								break;
						}
					}

					// get the proper css classes for the size setting
					if (isset($settings['size']))
					{
						switch ($settings['size'])
						{
							case 'thumbnail':
								$size_class = 'size_thumbnail';
								break;
							case 'medium':
								$size_class = 'size_medium';
								break;
							case 'large':
								$size_class = 'size_large';
								break;
							case 'fullsize':
								$size_class = 'size_fullsize';
								break;
							default:
								// no special css class for none
								$size_class = '';
								break;
						}
					}

					// get the image caption if there is one
					if ( isset($settings['caption']) AND $settings['caption']!='' )
					{
						$caption_tag = '<p class="caption '.$size_class.'">'.$settings['caption'].'</p>';
					}

					// get the title, which we will use for the alt attribute (this may change)
					if (isset($settings['title']))
					{
						$title_text = $settings['title'];
					}

					// get the description, which we will use for the title attribute (this may change)
					if (isset($settings['description']))
					{
						$description_text = $settings['description'];
					}

					// get the inline styles
					if (isset($settings['styles']))
					{
						$styles = $settings['styles'];
					}

					$search[] = '#\[attach=config\](' . $attachmentid . ')\[/attach\]#i';

					// TODO, uncomment this line, when we want to add the captions back in
					// we still need to prevent the caption text from being saved as part of the article
					//$replace[] = "<span><img class=\"previewthumb $align_class $size_class\" style=\"$styles\" src=\"{$vbulletin->options['bburl']}/attachment.php?attachmentid=$attachmentid&amp;stc=1\" class=\"previewthumb\" alt=\"$description_text\" title=\"$title_text\" />$caption_tag</span>";
					$img_url = "{$vbulletin->options['bburl']}/attachment.php?attachmentid=$attachmentid&amp;stc=1";
					$replace[] = "<a id=\"attachment$attachmentid\" rel=\"Lightbox_$contentid\" href=\"$img_url\"><img class=\"previewthumb $align_class $size_class\" style=\"$styles\" src=\"$img_url\" alt=\"$description_text\" title=\"$title_text\" /></a>";
				}
				else
				{
					$align = $matches[1][$key];
					$search[] = '#\[attach' . (!empty($align) ? '=' . $align : '') . '\](' . $attachmentid . ')\[/attach\]#i';
					$replace[] = "<img src=\"{$this->registry->options['bburl']}/attachment.php?{$this->registry->session->vars['sessionurl']}attachmentid=\\1&amp;d=$attachment[dateline]\" border=\"0\" alt=\""
						. construct_phrase($vbphrase['image_x_y_z'], $attachment['filename'], $attachment['counter'], $attachment['filesize'])
						. "\" " . (!empty($align) ? " style=\"float: $align\"" : '') . " />";
				}
			}
			$bbcode = preg_replace($search, $replace, $bbcode);
		}

		if ($has_img_code == 1 OR $has_img_code == 3)
		{
			if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages']))
			{
				// do [img]xxx[/img]
				$bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode);
			}
		}

		return $bbcode;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:html.php

示例13: print_stop_message

    if (empty($vbulletin->GPC['amount'])) {
        print_stop_message('please_complete_required_fields');
    }
    if (empty($vbulletin->GPC['infractionbanid'])) {
        $db->query_write("INSERT INTO " . TABLE_PREFIX . "infractionban (amount) VALUES (0)");
        $vbulletin->GPC['infractionbanid'] = $db->insert_id();
    }
    $db->query_write("\n\t\tUPDATE " . TABLE_PREFIX . "infractionban\n\t\tSET amount = " . $vbulletin->GPC['amount'] . ",\n\t\t\tmethod = '" . $db->escape_string($vbulletin->GPC['method']) . "',\n\t\t\tusergroupid = " . $vbulletin->GPC['usergroupid'] . ",\n\t\t\tbanusergroupid = " . $vbulletin->GPC['banusergroupid'] . ",\n\t\t\tperiod = '" . $db->escape_string($vbulletin->GPC['period']) . "'\n\t\tWHERE infractionbanid = " . $vbulletin->GPC['infractionbanid'] . "\n\t");
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('saved_automatic_ban_successfully');
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'removebangroup') {
    print_form_header('admininfraction', 'killbangroup');
    construct_hidden_code('infractionbanid', $vbulletin->GPC['infractionbanid']);
    print_table_header(construct_phrase($vbphrase['confirm_deletion_x'], $vbphrase['automatic_ban']));
    print_description_row($vbphrase['are_you_sure_you_want_to_delete_this_automatic_ban']);
    print_submit_row($vbphrase['yes'], '', 2, $vbphrase['no']);
}
// ###################### Start Kill #######################
if ($_POST['do'] == 'killbangroup') {
    $db->query_write("DELETE FROM " . TABLE_PREFIX . "infractionban WHERE infractionbanid = " . $vbulletin->GPC['infractionbanid']);
    define('CP_REDIRECT', 'admininfraction.php?do=modify');
    print_stop_message('deleted_automatic_ban_successfully');
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:39, Wed May 30th 2012
|| # CVS: $RCSfile$ - $Revision: 39862 $
|| ####################################################################
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:admininfraction.php

示例14: array

		{
			case 'edit': window.location = "usertitle.php?<?php 
    echo vB::getCurrentSession()->get('sessionurl_js');
    ?>
do=edit&usertitleid=" + usertitleid; break;
			case 'kill': window.location = "usertitle.php?<?php 
    echo vB::getCurrentSession()->get('sessionurl_js');
    ?>
do=remove&usertitleid=" + usertitleid; break;
			default: return false; break;
		}
	}
	</script>
	<?php 
    $options = array('edit' => $vbphrase['edit'], 'kill' => $vbphrase['delete']);
    print_form_header('usertitle', 'add');
    print_table_header($vbphrase['user_title_manager_gcpuser'], 3);
    print_description_row('<p>' . construct_phrase($vbphrase['it_is_recommended_that_you_update_user_titles'], vB::getCurrentSession()->get('sessionurl')) . '</p>', 0, 3);
    print_cells_row(array($vbphrase['user_title_guser'], $vbphrase['minimum_posts'], $vbphrase['controls']), 1);
    foreach ($usertitles as $usertitle) {
        print_cells_row(array('<b>' . $usertitle['title'] . '</b>', $usertitle['minposts'], "\n\t<select name=\"u{$usertitle['usertitleid']}\" onchange=\"js_usergroup_jump({$usertitle['usertitleid']}, this);\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_usergroup_jump({$usertitle['usertitleid']}, this.form.u{$usertitle['usertitleid']});\" />\n\t"));
    }
    print_submit_row($vbphrase['add_new_user_title_gcpuser'], 0, 3);
}
print_cp_footer();
/*=========================================================================*\
|| #######################################################################
|| # Downloaded: 15:45, Tue Sep 8th 2015
|| # CVS: $RCSfile$ - $Revision: 83432 $
|| #######################################################################
\*=========================================================================*/
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:usertitle.php

示例15: print_description_row

		{
			els[i].checked = toggle.checked;
		}

	}
	// -->
	</script>
	<?php 
    if (!$prefixsets) {
        print_description_row($vbphrase['no_prefix_sets_defined_click_create'], false, 3, '', 'center');
    } else {
        // display existing sets
        foreach ($prefixsets as $prefixset) {
            print_cells_row(array('<input id="' . $prefixset['prefixsetid'] . '" type="checkbox" onclick="selectprefixes(\'' . $prefixset['prefixsetid'] . '\')" />' . '<label for="' . $prefixset['prefixsetid'] . '">' . htmlspecialchars_uni($vbphrase["prefixset_{$prefixset['prefixsetid']}_title"]) . '</label>', '<input type="text" size="3" class="bginput" name="prefixset_order[' . $prefixset['prefixsetid'] . ']" value="' . $prefixset['displayorder'] . '" />', '<div class="normal">' . construct_link_code($vbphrase['add_prefix'], "prefix.php?do=addprefix&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['edit'], "prefix.php?do=editset&amp;prefixsetid={$prefixset['prefixsetid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteset&amp;prefixsetid={$prefixset['prefixsetid']}") . '</div>'), 1);
            if (!$prefixset['prefixes']) {
                print_description_row(construct_phrase($vbphrase['no_prefixes_defined_click_create'], $prefixset['prefixsetid']), false, 3, '', 'center');
            } else {
                foreach ($prefixset['prefixes'] as $prefix) {
                    print_cells_row(array('<label for="' . $prefixset['prefixsetid'] . '_' . $prefix['prefixid'] . '">' . '<input type="checkbox" name="prefixids[' . $prefix["prefixid"] . ']" id="' . $prefixset['prefixsetid'] . '_' . $prefix['prefixid'] . '" class="' . $prefixset['prefixsetid'] . '" />' . htmlspecialchars_uni($vbphrase["prefix_{$prefix['prefixid']}_title_plain"]) . '</label>', '<input type="text" size="3" class="bginput" name="prefix_order[' . $prefix['prefixid'] . ']" value="' . $prefix['displayorder'] . '" />', '<div class="smallfont">' . construct_link_code($vbphrase['edit'], "prefix.php?do=editprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['delete'], "prefix.php?do=deleteprefix&amp;prefixid={$prefix['prefixid']}") . construct_link_code($vbphrase['edit_permissions'], "prefix.php?do=permissions&amp;prefixid={$prefix['prefixid']}") . '</div>'));
                }
            }
        }
    }
    print_cells_row(array('<input type="image" style="width: 1px; height: 1px;" src="' . $vbulletin->options['cleargifurl'] . '" />' . '<input class="button" type="submit" name="dopermissionsmultiple" value="' . $vbphrase['edit_selected_prefix_permissions'] . '" />', '<input class="button" type="submit" value="' . $vbphrase['save_display_order'] . '" />', '<input class="button" type="button" onclick="window.location = \'prefix.php?do=addset\';" value="' . $vbphrase['add_prefix_set'] . '" />'), false, 'tfoot');
    print_table_footer();
}
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 23:48, Wed Mar 24th 2010
|| # CVS: $RCSfile$ - $Revision: 32878 $
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:prefix.php


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