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


PHP CBTxt::th方法代码示例

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


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

示例1: array

	/**
	 * BBcode editor
	 *
	 * @uses $this->pbconfig->EnableRating, $this->pbconfig->ShowTitle, $this->pbconfig->ShowName, $this->pbconfig->ShowEmail, $this->pbconfig->UseLocation, $this->pbconfig->LocationField, $this->pbconfig->UseWebAddress, $this->pbconfig->WebField, $this->pbconfig->AllowBBCode, $this->pbconfig->AllowSmiles, $this->pbconfig->Captcha
	 *
	 * @param  pbProfileBookEntry  $item
	 * @param  string              $idTag
	 * @param  string              $htmlAreaLabel
	 * @param  string              $txtSubmit
	 * @param  UserTable           $curruser
	 * @param  boolean             $required
	 * @return string
	 */
	function _bbeditor( $item, $idTag, $htmlAreaLabel, $txtSubmit, $curruser, $required )
	{
		global $_CB_framework, $ueConfig;

		$myId			=	Application::MyUser()->getUserId();

		$newOrMe		=	( ( $item->posterid == -1 ) || ( $item->posterid == $myId ) );

		$htmltext		=	'<div class="cbpbEditorContainer" id="div' . $idTag . '">';
		
		//get the CB initiatied form action path this is used for all forms
		$base_url		=	$this->_getAbsURLwithParam( array() );
		$htmltext		.=	'<form name="admin' . $idTag . '" id="admin' . $idTag . '" method="post" onsubmit="javascript: return pb_submitForm(this);" action="' . $base_url . "\">\n";
		$htmltext		.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'formaction' .  $this->pbconfig->MainMode[0] ) . '" value="' . ( $item->_pbid ? 'edit' : 'new' ) . "\" />\n";
		if ( $item->_pbid ) {
			$htmltext	.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'id' ) . '" value="' . $item->_pbid . "\" />\n";
		}
		if ( $this->pbconfig->AllowBBCode ) {
			$editor		=	$this->getEditor( $idTag );
		} else {
			$editor		=	null;
		}
		$htmltext		.=	"<table width=\"100%\">\n";
		$locationField	=	null;
		//Check to see if the Location field should be used
		if ( $this->pbconfig->UseLocation ) {
			//Check to see if a registered user is logged in and if the admin has defined a a value for the location field
			if ( $myId && ( $this->pbconfig->LocationField != 0 ) && $newOrMe ) {
				$locationField		=	new FieldTable();
				$locationField->load( $this->pbconfig->LocationField );
				$naLocationField	=	$locationField->name;
				//if they true then display the location value from the users cb profile in read only
				$locationField		=	'<td class="titleCell">' . CBTxt::th( "Location" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'posterlocation' ) . '" value="' . htmlspecialchars( $curruser->$naLocationField ) . '" />' . htmlspecialchars( $curruser->$naLocationField ) . '</td>';
			} else {
				//else display an entry field to capture the location
				$locationField		=	'<td class="titleCell">' . CBTxt::th( "Location" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posterlocation' ) . '" value="' . htmlspecialchars( $item->posterlocation ) . '" /></td>';
			}
		}
		
		$webField					=	null;
		if ( $this->pbconfig->UseWebAddress ) {
			if ( $myId && ( $this->pbconfig->WebField != 0 ) && $newOrMe  ) {
				$webfield			=	new FieldTable();
				$webfield->load( $this->pbconfig->WebField );
				$naWebField			=	$webfield->name;
				$webField			=	'<td class="titleCell">' . CBTxt::th( "Web Address" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'posterurl' ) . '" value="' . $curruser->$naWebField . '" />' . $this->_displayWebAddress( $curruser->$naWebField ) . '</td>';
			} else {
				$webField			=	'<td class="titleCell">' . CBTxt::th( "Web Address" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posterurl' ) . '" value="' . htmlspecialchars( $item->posterurl ) . '" /></td>';
			}
		}
		
		$htmltext				.=	"\n<tr>";
		if ( ! $myId ) {
			$htmltext			.=	'<td class="titleCell">' . CBTxt::th( "Name" )  . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . htmlspecialchars( $item->postername ) . '" /></td>';
			$htmltext			.=	'<td class="titleCell">' . CBTxt::th( "Email" ) . ':<br /><input class="inputbox" type="text" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . htmlspecialchars( $item->posteremail ) . '" /></td>';
		} else {
			$htmlName	=	( $item->postername ? htmlspecialchars( $item->postername ) : getNameFormat( $curruser->name, $curruser->username, $ueConfig['name_format'] ) );
			if ( $this->pbconfig->ShowName ) {
				$htmltext		.=	'<td class="titleCell">' . CBTxt::th( "Name" ) . ':<br /><input type="hidden" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . $htmlName . '" />' . $htmlName . '</td>';
			} else {
				$htmltext		.=	'<td><input type="hidden" name="' . $this->_getPagingParamName( 'postername' ) . '" value="' . $htmlName . '" /></td>';
			}
			if ( $this->pbconfig->ShowEmail ) {
				$htmltext		.=	'<td class="titleCell">' . CBTxt::th( "Email" ) . ':<br />';
				if ( ! $item->posteremail || $myId == $item->posterid || Application::MyUser()->isAuthorizedToPerformActionOnAsset( 'core.manage', 'com_users' ) ) {
					$htmltext	.=	'<input type="hidden" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) ) . '" />' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) );
				} else {
					$htmltext	.=	CBTxt::th( "Hidden" );
				}
			} else {
				if ( ! $item->posteremail || $myId == $item->posterid || Application::MyUser()->isAuthorizedToPerformActionOnAsset( 'core.manage', 'com_users' ) ) {
					$htmltext	.=	'<td><input type="hidden" name="' . $this->_getPagingParamName( 'posteremail' ) . '" value="' . ( $item->posteremail ? htmlspecialchars( $item->posteremail ) : htmlspecialchars( $curruser->email ) ) . '" /></td>';
				}
			}
		}
		$htmltext				.=	'</tr>';
		
		//Check to see if we are displaying the web address or location field. If we are then add a row for them
		if ( $webField != null || $locationField != null ) {
			$htmltext		.=	"\n<tr>" . $locationField . $webField . '</tr>';
		}
		$htmltext			.=	'<tr><td colspan="2">';
		
		//Check to see if the admin has enabled rating for profile entries
		if ( $this->pbconfig->EnableRating && ( $myId != $item->userid ) ) {
			//Yep its enabled so get the ratings HTML/Code
			$htmltext		.=	'<div class="titleCell">' . CBTxt::Th( "User Rating" ) . ':</div>'
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:cb.profilebook.php


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