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


PHP UserProfile::getEditProfileNav方法代码示例

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


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

示例1: displayCustomForm

    /**
     * Displays the form for editing custom (site-specific) information
     * @return $form Mixed: HTML output
     */
    function displayCustomForm()
    {
        global $wgRequest, $wgUser, $wgOut;
        $dbr = wfGetDB(DB_MASTER);
        $s = $dbr->selectRow('user_profile', array('up_custom_1', 'up_custom_2', 'up_custom_3', 'up_custom_4', 'up_custom_5'), array('up_user_id' => $wgUser->getID()), __METHOD__);
        if ($s !== false) {
            $custom1 = $s->up_custom_1;
            $custom2 = $s->up_custom_2;
            $custom3 = $s->up_custom_3;
            $custom4 = $s->up_custom_4;
        }
        $wgOut->setHTMLTitle(wfMsg('pagetitle', wfMsg('user-profile-tidbits-title')));
        $form = '<h1>' . wfMsg('user-profile-tidbits-title') . '</h1>';
        $form .= UserProfile::getEditProfileNav(wfMsg('user-profile-section-custom'));
        $form .= '<form action="" method="post" enctype="multipart/form-data" name="profile">
		 	<div class="profile-info clearfix">
				<div class="profile-update">
					<p class="profile-update-title">' . wfMsgForContent('user-profile-tidbits-title') . '</p>
					<div id="profile-update-custom1">
					<p class="profile-update-unit-left">' . wfMsgForContent('custom-info-field1') . '</p>
					<p class="profile-update-unit">
						<textarea name="custom1" id="fav_moment" rows="3" cols="75">' . (isset($custom1) ? $custom1 : '') . '</textarea>
					</p>
					</div>
					<div class="cleared"></div>
					<div id="profile-update-custom2">
					<p class="profile-update-unit-left">' . wfMsgForContent('custom-info-field2') . '</p>
					<p class="profile-update-unit">
						<textarea name="custom2" id="least_moment" rows="3" cols="75">' . (isset($custom2) ? $custom2 : '') . '</textarea>
					</p>
					</div>
					<div class="cleared"></div>
					<div id="profile-update-custom3">
					<p class="profile-update-unit-left">' . wfMsgForContent('custom-info-field3') . '</p>
					<p class="profile-update-unit">
						<textarea name="custom3" id="fav_athlete" rows="3" cols="75">' . (isset($custom3) ? $custom3 : '') . '</textarea>
					</p>
					</div>
					<div class="cleared"></div>
					<div id="profile-update-custom4">
					<p class="profile-update-unit-left">' . wfMsgForContent('custom-info-field4') . '</p>
					<p class="profile-update-unit">
						<textarea name="custom4" id="least_fav_athlete" rows="3" cols="75">' . (isset($custom4) ? $custom4 : '') . '</textarea>
					</p>
					</div>
					<div class="cleared"></div>
				</div>
			<input type="button" class="site-button" value="' . wfMsg('user-profile-update-button') . '" size="20" onclick="document.profile.submit()" />
			</div>
		</form>';
        return $form;
    }
开发者ID:kghbln,项目名称:semantic-social-profile,代码行数:56,代码来源:SpecialUpdateProfile.php

示例2: getUploadForm

    /**
     * Displays the main upload form, optionally with a highlighted
     * error message up at the top.
     *
     * @param $msg String: error message as HTML
     * @param $sessionKey String: session key in case this is a stashed upload
     * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
     * @return HTML output
     */
    protected function getUploadForm($message = '', $sessionKey = '', $hideIgnoreWarning = false)
    {
        global $wgUseCopyrightUpload;
        if ($message != '') {
            $sub = $this->msg('uploaderror')->plain();
            $this->getOutput()->addHTML("<h2>{$sub}</h2>\n" . "<h4 class='error'>{$message}</h4>\n");
        }
        $ulb = $this->msg('uploadbtn');
        $source = null;
        if ($wgUseCopyrightUpload) {
            $source = "\n\t\t\t\t<td align='right' nowrap='nowrap'>" . $this->msg('filestatus')->plain() . "</td>\n\t\t\t\t<td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . htmlspecialchars($this->mUploadCopyStatus) . "\" size='40' /></td>\n\t\t\t\t</tr><tr>\n\t\t\t\t<td align='right'>" . $this->msg('filesource')->plain() . "</td>\n\t\t\t\t<td><input tabindex='4' type='text' name='wpUploadSource' value=\"" . htmlspecialchars($this->mUploadSource) . "\" style='width:100px' /></td>\n\t\t\t\t";
        }
        $output = '<h1>' . $this->msg('uploadavatar')->plain() . '</h1>';
        $output .= UserProfile::getEditProfileNav($this->msg('user-profile-section-picture')->plain());
        $output .= '<div class="profile-info">';
        if ($this->getAvatar('l') != '') {
            $output .= '<table>
				<tr>
					<td>
						<p class="profile-update-title">' . $this->msg('user-profile-picture-currentimage')->plain() . '</p>
					</td>
				</tr>';
            $output .= '<tr>
					<td>' . $this->getAvatar('l') . '</td>
				</tr>
			</table>';
        }
        $output .= '<form id="upload" method="post" enctype="multipart/form-data" action="">';
        // The following two lines are delicious copypasta from HTMLForm.php,
        // function getHiddenFields() and they are required; wpEditToken is, as
        // of MediaWiki 1.19, checked _unconditionally_ in
        // SpecialUpload::loadRequest() and having the hidden title doesn't
        // hurt either
        // @see https://bugzilla.wikimedia.org/show_bug.cgi?id=30953
        $output .= Html::hidden('wpEditToken', $this->getUser()->getEditToken(), array('id' => 'wpEditToken')) . "\n";
        $output .= Html::hidden('title', $this->getPageTitle()->getPrefixedText()) . "\n";
        $output .= '<table border="0">
				<tr>
					<td>
						<p class="profile-update-title">' . $this->msg('user-profile-picture-choosepicture')->plain() . '</p>
						<p style="margin-bottom:10px;">' . $this->msg('user-profile-picture-picsize')->plain() . '</p>
						<input tabindex="1" type="file" name="wpUploadFile" id="wpUploadFile" size="36"/>
						</td>
				</tr>
				<tr>' . $source . '</tr>
				<tr>
					<td>
						<input tabindex="5" type="submit" name="wpUpload" class="site-button" value="' . $ulb . '" />
					</td>
				</tr>
			</table>
			</form>' . "\n";
        $output .= '</div>';
        return $output;
    }
开发者ID:Reasno,项目名称:SocialProfile,代码行数:64,代码来源:SpecialUploadAvatar.php

示例3: getUploadForm

	/**
	 * Displays the main upload form, optionally with a highlighted
	 * error message up at the top.
	 *
	 * @param $msg String: error message as HTML
	 * @param $sessionKey String: session key in case this is a stashed upload
	 * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
	 * @return HTML output
	 */
	protected function getUploadForm( $message = '', $sessionKey = '', $hideIgnoreWarning = false ) {
		global $wgOut, $wgUser, $wgUseCopyrightUpload;

		if ( $message != '' ) {
			$sub = wfMsg( 'uploaderror' );
			$wgOut->addHTML( "<h2>{$sub}</h2>\n" .
				"<h4 class='error'>{$message}</h4>\n" );
		}
		$sk = $wgUser->getSkin();

		$ulb = wfMsg( 'uploadbtn' );

		$source = null;

		if ( $wgUseCopyrightUpload ) {
			$source = "
				<td align='right' nowrap='nowrap'>" . wfMsg( 'filestatus' ) . ":</td>
				<td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" .
				htmlspecialchars( $this->mUploadCopyStatus ) . "\" size='40' /></td>
				</tr><tr>
				<td align='right'>" . wfMsg( 'filesource' ) . ":</td>
				<td><input tabindex='4' type='text' name='wpUploadSource' value=\"" .
				htmlspecialchars( $this->mUploadSource ) . "\" style='width:100px' /></td>
				";
		}

		$output = '<h1>' . wfMsg( 'uploadavatar' ) . '</h1>';
		$output .= UserProfile::getEditProfileNav( wfMsg( 'user-profile-section-picture' ) );
		$output .= '<div class="profile-info">';

		if ( $this->getAvatar( 'l' ) != '' ) {
			$output .= '<table>
				<tr>
					<td>
						<p class="profile-update-title">' . wfMsg( 'user-profile-picture-currentimage' ) . '</p>
					</td>
				</tr>';
				$output .= '<tr>
					<td>' . $this->getAvatar( 'l' ) . '</td>
				</tr>
			</table>';
		}

		$output .= '<form id="upload" method="post" enctype="multipart/form-data" action="">
			<table border="0">
				<tr>
					<td>
						<p class="profile-update-title">' .
							wfMsg( 'user-profile-picture-choosepicture' ) .
						'</p>
						<p style="margin-bottom:10px;">' .
							wfMsg( 'user-profile-picture-picsize' ) .
						'</p>
						<input tabindex="1" type="file" name="wpUploadFile" id="wpUploadFile" size="36"/>
						</td>
				</tr>
				<tr>' . $source . '</tr>
				<tr>
					<td>
						<input tabindex="5" type="submit" name="wpUpload" class="site-button" value="' . $ulb . '" />
					</td>
				</tr>
			</table>
			</form>' . "\n";

		$output .= '</div>';

		return $output;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:78,代码来源:SpecialUploadAvatar.php

示例4: getUploadForm

    /**
     * Displays the main upload form, optionally with a highlighted
     * error message up at the top.
     *
     * @param $msg String: error message as HTML
     * @param $sessionKey String: session key in case this is a stashed upload
     * @param $hideIgnoreWarning Boolean: whether to hide "ignore warning" check box
     * @return HTML output
     */
    protected function getUploadForm($message = '', $sessionKey = '', $hideIgnoreWarning = false)
    {
        global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest, $wgUseCopyrightUpload;
        $cols = intval($wgUser->getOption('cols'));
        $ew = $wgUser->getOption('editwidth');
        if ($ew) {
            $ew = ' style="width:100%"';
        } else {
            $ew = '';
        }
        if ('' != $message) {
            $sub = wfMsg('uploaderror');
            $wgOut->addHTML("<h2>{$sub}</h2>\n" . "<h4 class='error'>{$message}</h4>\n");
        }
        $sk = $wgUser->getSkin();
        $sourcefilename = wfMsg('sourcefilename');
        $destfilename = wfMsg('destfilename');
        $fd = wfMsg('filedesc');
        $ulb = wfMsg('uploadbtn');
        $iw = wfMsg('ignorewarning');
        $titleObj = SpecialPage::getTitleFor('Upload');
        $action = $titleObj->escapeLocalURL();
        $encDestFile = htmlspecialchars($this->mDesiredDestName);
        $source = null;
        if ($wgUseCopyrightUpload) {
            $source = "\r\n\t\t\t\t<td align='right' nowrap='nowrap'>" . wfMsg('filestatus') . ":</td>\r\n\t\t\t\t<td><input tabindex='3' type='text' name=\"wpUploadCopyStatus\" value=\"" . htmlspecialchars($this->mUploadCopyStatus) . "\" size='40' /></td>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td align='right'>" . wfMsg('filesource') . ":</td>\r\n\t\t\t\t<td><input tabindex='4' type='text' name='wpUploadSource' value=\"" . htmlspecialchars($this->mUploadSource) . "\" style='width:100px' /></td>\r\n\t\t\t\t";
        }
        $watchChecked = $wgUser->getOption('watchdefault') ? 'checked="checked"' : '';
        $output = '<h1>' . wfMsg('uploadavatar') . '</h1>';
        $output .= UserProfile::getEditProfileNav(wfMsg('user-profile-section-picture'));
        $output .= '<div class="profile-info">';
        if ($this->getAvatar('l') != '') {
            $output .= '<table>
				<tr>
					<td>
						<p class="profile-update-title">' . wfMsg('user-profile-picture-currentimage') . '</p>
					</td>
				</tr>';
            $output .= '<tr>
					<td>' . $this->getAvatar('l') . '</td>
				</tr>
			</table>';
        }
        $output .= '<form id="upload" method="post" enctype="multipart/form-data" action="">
			<table border="0">
				<tr>
					<td>
						<p class="profile-update-title">' . wfMsg('user-profile-picture-choosepicture') . '</p>
						<p style="margin-bottom:10px;">' . wfMsg('user-profile-picture-picsize') . '</p>
						<input tabindex="1" type="file" name="wpUploadFile" id="wpUploadFile" size="36"/>
						</td>
				</tr>
				<tr>' . $source . '</tr>
				<tr>
					<td>
						<input tabindex="5" type="submit" name="wpUpload" class="site-button" value="' . $ulb . '" />
					</td>
				</tr>
			</table>
			</form>' . "\n";
        $output .= '</div>';
        return $output;
    }
开发者ID:kghbln,项目名称:semantic-social-profile,代码行数:72,代码来源:SpecialUploadAvatar.php


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