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


PHP JUserHelper::getProfile方法代码示例

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


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

示例1: exportDaytime

 public function exportDaytime()
 {
     $app = JFactory::getApplication();
     $modelCalendar = new EstivoleModelCalendar();
     $modelDaytime = new EstivoleModelDaytime();
     $modelServices = new EstivoleModelServices();
     $daytimeid = $app->input->get('daytime_id');
     $daytime = $modelDaytime->getDaytime($daytimeid);
     $calendar = $modelCalendar->getItem($daytime->calendar_id);
     $this->services = $modelServices->getServicesByDaytime($daytime->daytime_day);
     // Create new PHPExcel object
     $objPHPExcel = new PHPExcel();
     // Set document properties
     $objPHPExcel->getProperties()->setCreator("Estivale Open Air")->setLastModifiedBy("Estivole")->setTitle("Export Estivole")->setSubject("Export des tranches horaires Estivole");
     // Add some data
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue("A1", "Plan de travail Estivale Open Air - Calendrier " . $calendar->name);
     // // Miscellaneous glyphs, UTF-8
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue("A2", date('d-m-Y', strtotime($daytime->daytime_day)));
     // Rename worksheet
     $objPHPExcel->getActiveSheet()->setTitle("Export");
     // Set active sheet index to the first sheet, so Excel opens this as the first sheet
     $objPHPExcel->setActiveSheetIndex(0);
     $cellCounter = 4;
     // Add data
     for ($i = 0; $i < count($this->services); $i++) {
         $objPHPExcel->getActiveSheet()->setCellValue("A" . $cellCounter, $this->services[$i]->service_name);
         $this->daytimes = $modelDaytime->listItemsForExport($this->services[$i]->service_id);
         foreach ($this->daytimes as $daytime) {
             $userId = $daytime->user_id;
             $userProfileEstivole = EstivoleHelpersUser::getProfileEstivole($userId);
             $userProfile = JUserHelper::getProfile($userId);
             $user = JFactory::getUser($userId);
             $objPHPExcel->getActiveSheet()->setCellValue("A" . ($cellCounter + 1), $userProfileEstivole->profilestivole['lastname'] . ' ' . $userProfileEstivole->profilestivole['firstname'])->setCellValueExplicit("B" . ($cellCounter + 1), $userProfile->profile['phone'], PHPExcel_Cell_DataType::TYPE_STRING)->setCellValue("C" . ($cellCounter + 1), $user->email)->setCellValue("D" . ($cellCounter + 1), date('H:i', strtotime($daytime->daytime_hour_start)))->setCellValue("E" . ($cellCounter + 1), date('H:i', strtotime($daytime->daytime_hour_end)));
             $cellCounter++;
         }
         $cellCounter = $cellCounter + 2;
     }
     // Redirect output to a client’s web browser (Excel2007)
     header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
     header("Content-Disposition: attachment;filename=\"01simple.xlsx\"");
     header("Cache-Control: max-age=0");
     // If you"re serving to IE 9, then the following may be needed
     header("Cache-Control: max-age=1");
     // If you"re serving to IE over SSL, then the following may be needed
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
     // always modified
     header("Cache-Control: cache, must-revalidate");
     // HTTP/1.1
     header("Pragma: public");
     // HTTP/1.0
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007");
     $objWriter->save("php://output");
     exit;
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:56,代码来源:daytime.php

示例2: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $model = new EstivoleModelMember();
     $this->state = $this->get('State');
     $this->member = $this->get('Item');
     $this->form = $this->get('Form');
     $userId = $this->member->user_id;
     if ($userId != '') {
         $this->user = JFactory::getUser($userId);
     } else {
         $this->user = null;
     }
     $this->userProfile = JUserHelper::getProfile($userId);
     $this->userProfilEstivole = EstivoleHelpersUser::getProfilEstivole($userId);
     if ($this->member->member_id != null) {
         $modelCalendars = new EstivoleModelCalendars();
         $modelDaytime = new EstivoleModelDaytime();
         $this->calendars = $modelCalendars->listItems();
         for ($i = 0; $i < count($this->calendars); $i++) {
             $this->calendars[$i]->member_daytimes = $modelDaytime->getMemberDaytimes($this->member->member_id, $this->calendars[$i]->calendar_id);
         }
     }
     $this->addToolbar();
     //display
     return parent::display($tpl);
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:27,代码来源:view.html.php

示例3: getItem

 function getItem()
 {
     $profile = JFactory::getUser($this->_user_id);
     $userDetails = JUserHelper::getProfile($this->_user_id);
     $profile->details = isset($userDetails->profile) ? $userDetails->profile : array();
     $profile->isMine = JFactory::getUser()->id == $profile->id ? TRUE : FALSE;
     return $profile;
 }
开发者ID:redbluesquare,项目名称:com_ddcpss,代码行数:8,代码来源:profile.php

示例4: init

 /**
  * When an application is loaded on the frontend,
  * load the language files from the app folder too
  *
  * @param  AppEvent 	$event The event triggered
  */
 public static function init($event)
 {
     $storeuser = $event->getSubject();
     $app = $storeuser->app;
     $storeuser->set('password', null);
     $profile = JUserHelper::getProfile($storeuser->id);
     $profile = $app->parameter->create($profile->get('profile'));
     $storeuser->params = $app->parameter->create($profile->get('params'));
     $storeuser->elements = $app->parameter->create($profile->get('elements'));
 }
开发者ID:camigreen,项目名称:ttop,代码行数:16,代码来源:storeuser.php

示例5: exportMembersShirts

 public function exportMembersShirts()
 {
     $app = JFactory::getApplication();
     $service_id = $app->input->get('service_id', null);
     $model = new EstivoleModelMembers();
     $modelDaytime = new EstivoleModelDaytime();
     $modelService = new EstivoleModelService();
     $service = $modelService->getItem($service_id);
     $service_name = $service->service_name != '' ? $service->service_name : 'Tous les membres';
     $this->members = $model->getTotalItemsForExport();
     for ($i = 0; $i < count($this->members); $i++) {
         $this->members[$i]->member_daytimes = $modelDaytime->getMemberDaytimes($this->members[$i]->member_id, $this->calendars[0]->calendar_id);
     }
     // Create new PHPExcel object
     $objPHPExcel = new PHPExcel();
     // Set document properties
     $objPHPExcel->getProperties()->setCreator("Estivale Open Air")->setLastModifiedBy("Estivole")->setTitle("Export Estivole")->setSubject("Export des bénévoles Estivole");
     // Add some data
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue("A1", "Plan de travail Estivale Open Air - Bénévoles");
     // $this->state	= $this->get('State');
     // $this->filter_services	= $this->state->get('filter.services_members');
     $objPHPExcel->getActiveSheet()->setCellValue("A2", "Export membres \"" . $service_name . "\"");
     // // Miscellaneous glyphs, UTF-8
     $objPHPExcel->getActiveSheet()->setCellValue("A4", "Nom")->setCellValue("B4", "Email")->setCellValue("C4", "Téléphone")->setCellValue("D4", "Nbre t-shirts")->setCellValue("E4", "Taille t-shirts");
     // Rename worksheet
     $objPHPExcel->getActiveSheet()->setTitle("Export");
     $cellCounter = 5;
     // Add data
     for ($i = 0; $i < count($this->members); $i++) {
         $userId = $this->members[$i]->user_id;
         $userProfileEstivole = EstivoleHelpersUser::getProfileEstivole($userId);
         $userProfile = JUserHelper::getProfile($userId);
         $user = JFactory::getUser($userId);
         $objPHPExcel->getActiveSheet()->setCellValue("A" . ($cellCounter + 1), $userProfileEstivole->profilestivole['lastname'] . ' ' . $userProfileEstivole->profilestivole['firstname'])->setCellValue("B" . ($cellCounter + 1), $user->email)->setCellValueExplicit("C" . ($cellCounter + 1), $userProfile->profile['phone'], PHPExcel_Cell_DataType::TYPE_STRING)->setCellValue("D" . ($cellCounter + 1), round(count($this->members[$i]->member_daytimes) / 2))->setCellValue("E" . ($cellCounter + 1), $userProfileEstivole->profilestivole['tshirtsize']);
         $cellCounter++;
     }
     // Redirect output to a client’s web browser (Excel2007)
     header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
     header("Content-Disposition: attachment;filename=\"01simple.xlsx\"");
     header("Cache-Control: max-age=0");
     // If you"re serving to IE 9, then the following may be needed
     header("Cache-Control: max-age=1");
     // If you"re serving to IE over SSL, then the following may be needed
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
     // always modified
     header("Cache-Control: cache, must-revalidate");
     // HTTP/1.1
     header("Pragma: public");
     // HTTP/1.0
     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007");
     $objWriter->save("php://output");
     exit;
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:55,代码来源:members.php

示例6: getItem

 function getItem()
 {
     $profile = JFactory::getUser($this->_user_id);
     $userDetails = JUserHelper::getProfile($this->_user_id);
     $profile->details = isset($userDetails->profile) ? $userDetails->profile : array();
     $libraryModel = new LendrModelsLibrary();
     $libraryModel->set('_user_id', $this->_user_id);
     $profile->library = $libraryModel->getItem();
     $waitlistModel = new LendrModelsWaitlist();
     $waitlistModel->set('_waitlist', TRUE);
     $profile->waitlist = $waitlistModel->getItem();
     $wishlistModel = new LendrModelsWishlist();
     $profile->wishlist = $wishlistModel->listItems();
     $profile->isMine = JFactory::getUser()->id == $profile->id ? TRUE : FALSE;
     return $profile;
 }
开发者ID:rrgarcia-tiempodev,项目名称:lendr,代码行数:16,代码来源:profile.php

示例7: _postPayment

 function _postPayment($data)
 {
     $orderpayment_id = JRequest::getVar('orderpayment_id');
     $offline_payment_method = JRequest::getVar('offline_payment_method');
     $formatted = array('offline_payment_method' => $offline_payment_method);
     $nw_uname = JRequest::getVar('nw_username');
     $nw_uemail = JRequest::getVar('nw_useremail');
     $nw_uphone = JRequest::getVar('nw_userphone');
     JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_j2store' . DS . 'tables');
     $orderpayment = JTable::getInstance('Orders', 'Table');
     $orderpayment->load($orderpayment_id);
     $orderpayment->transaction_details = '訂單完成,等待付款!';
     $orderpayment->transaction_status = '本次交易使用第三方線上金流模組。';
     $orderpayment->order_state = 'Pending';
     $orderpayment->order_state_id = 4;
     // PENDING 4
     if ($orderpayment->save()) {
         JLoader::register('J2StoreHelperCart', JPATH_SITE . DS . 'components' . DS . 'com_j2store' . DS . 'helpers' . DS . 'cart.php');
         J2StoreHelperCart::removeOrderItems($orderpayment->id);
     } else {
         $errors[] = $orderpayment->getError();
     }
     $user = JFactory::getUser();
     if ($user->id > 0) {
         $userprofile = JUserHelper::getProfile($user->id);
         $vars = new JObject();
         $vars->user_name = $user->name;
         $vars->user_email = $user->email;
     } else {
         $vars->user_name = $nw_uname;
         $vars->user_email = $nw_uemail;
         $vars->user_phone = $nw_uphone;
     }
     $vars->orderpayment_id = $orderpayment->id;
     $vars->ezship_email = $this->params->get('ezmail');
     $vars->ret_url = JURI::base() . 'index.php/component/nicepayment';
     $vars->orderpayment_amount = ceil($orderpayment->orderpayment_amount);
     $vars->paymethod = $offline_payment_method;
     $pay2go_message = '';
     $pay2go_message = $this->Pay2go_MPG($orderpayment->orderpayment_amount, $orderpayment->id);
     require_once JPATH_SITE . DS . 'components' . DS . 'com_j2store' . DS . 'helpers' . DS . 'orders.php';
     // 寄信錯誤
     // J2StoreOrdersHelper::sendUserEmail($orderpayment->user_id, $orderpayment->order_id, $orderpayment->transaction_status, $orderpayment->order_state, $orderpayment->order_state_id);
     return $pay2go_message;
 }
开发者ID:ForAEdesWeb,项目名称:AEW13,代码行数:45,代码来源:payment_Pay2go_MPG.php

示例8: display

 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $model = new EstivoleModelMember();
     $this->user = JFactory::getUser();
     $userId = $this->user->id;
     $this->userProfile = JUserHelper::getProfile($userId);
     if (!$this->user->guest) {
         $this->state = $this->get('State');
         $this->member = $model->getItem($this->user->id);
         $this->form = $this->get('Form');
         $modelcalendars = new estivolemodelcalendars();
         $modeldaytime = new estivolemodeldaytime();
         $this->calendars = $modelcalendars->listitems();
         for ($i = 0; $i < count($this->calendars); $i++) {
             $this->calendars[$i]->member_daytimes = $modeldaytime->getmemberdaytimes($this->member->member_id, $this->calendars[$i]->calendar_id);
         }
     }
     //display
     return parent::display($tpl);
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:21,代码来源:view.html.php

示例9: getProfile

 /**
  * Helper wrapper method for getProfile
  *
  * @param   integer  $userId  The id of the user.
  *
  * @return  object
  *
  * @see     JUserHelper::getProfile()
  * @since   3.4
  */
 public function getProfile($userId = 0)
 {
     return JUserHelper::getProfile($userId);
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:14,代码来源:helper.php

示例10: defined

/**
 * @package     Joomla.Site
 * @subpackage  com_content
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
// Create shortcuts to some parameters.
$params = $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$profile = JUserHelper::getProfile($this->item->created_by);
$info = $params->get('info_block_position', 0);
JHtml::_('behavior.caption');
$useDefList = $params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date') || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author');
$address = implode(", ", array_filter([JString::trim($this->item->minicck->getFieldValue($this->item->id, 'c_city')), JString::trim($this->item->minicck->getFieldValue($this->item->id, 'c_state')), JString::trim($this->item->minicck->getFieldValue($this->item->id, 'c_street_address')), JString::trim($this->item->minicck->getFieldValue($this->item->id, 'c_country'))]));
?>
<div class="ad-title">
    <h2><?php 
echo $this->escape($this->item->title);
?>
        <span class="ad-page-price">
            <?php 
$url = '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catid)) . '" itemprop="genre">' . $this->item->category_title . '</a>';
?>
            <?php 
echo $url;
开发者ID:Bitcoinsulting,项目名称:website-ads,代码行数:30,代码来源:default.php

示例11: save


//.........这里部分代码省略.........
     			$errors = $model->getErrors();
     
     			// Push up to three validation messages out to the user.
     			for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
     			{
     				if ($errors[$i] instanceof Exception)
     				{
     					$app->enqueueMessage($errors[$i]->getMessage(), 'warning');
     				}
     				else
     				{
     					$app->enqueueMessage($errors[$i], 'warning');
     				}
     			}
     
     			// Save the data in the session.
     			$app->setUserState('com_users.edit.profile.data', $data);
     
     			// Redirect back to the edit screen.
     			$userId = (int) $app->getUserState('com_users.edit.profile.id');
     			$this->setRedirect(JRoute::_('index.php?option=com_users&view=profile&layout=edit&user_id=' . $userId, false));
     
     			return false;
     		}*/
     // Attempt to save the data.
     $return = $model->save($data);
     //T.Trung
     if ($return == false) {
         $result['result'] = 0;
         $result['error'] = "Update fail";
         die(json_encode($result));
     } else {
         $user = JFactory::getUser($user_id);
         $userProfile = JUserHelper::getProfile($user_id);
         $result['result'] = 1;
         $result['error'] = "";
         $result['user_id'] = $user->id;
         $result['name'] = $user->name;
         $result['email'] = $user->email;
         $result['gender'] = $userProfile->profile["gender"];
         $result['dob'] = JHtml::_('date', $userProfile->profile["dob"], 'd-m-Y');
         $result['address'] = $userProfile->profile["address"];
         $result['postal_code'] = $userProfile->profile["postal_code"];
         $result['city'] = $userProfile->profile["city"];
         if ($userProfile->profilepicture["file"]) {
             $result['picture'] = JURI::base() . "media/plg_user_profilepicture/images/original/" . $userProfile->profilepicture["file"];
         } else {
             $result['picture'] = "";
         }
         $db = JFactory::getDBO();
         $db->setQuery("SELECT facebook_id FROM #__users WHERE id = " . $user_id);
         $result['facebook_id'] = $db->loadResult();
         die(json_encode($result));
     }
     //T.Trung end
     // Check for errors.
     if ($return === false) {
         // Save the data in the session.
         $app->setUserState('com_users.edit.profile.data', $data);
         // Redirect back to the edit screen.
         $userId = (int) $app->getUserState('com_users.edit.profile.id');
         $this->setMessage(JText::sprintf('COM_USERS_PROFILE_SAVE_FAILED', $model->getError()), 'warning');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=profile&layout=edit&user_id=' . $userId, false));
         return false;
     }
     // Redirect the user and adjust session state based on the chosen task.
开发者ID:naka211,项目名称:befirstapp,代码行数:67,代码来源:profile.php

示例12: avatar

	/**
	 * Función Gravatar
	 * Nuevo en Jokte v1.2.2
	 * Mejorado Jokte v1.3.4 (soporte imagen del perfil)
	 */
	static function avatar($item, $params)
	{
		// Parámetros globales
		$imgdefault_g = JURI::root().$params->get('avatar_default');
		$imgsize_g = $params->get('avatar_size');
		$tipoavatar = $params->get('show_avatar');
		
		// Position and style
		$position = $params->get('avatar_position');
		$style =''; 
		switch ($position) {			
			case '2':
				$style = 'float:right';
				break;
			default:
				$style = 'float:left';
				break;
		}
		
		// Si imagen del perfil
		switch ($tipoavatar) {
		
		// Si imagen del perfil
		case '1':
		  $profile 	= JUserHelper::getProfile($item->created_by);
          if (isset($profile->profile)) {
		    ($profile->profile['avatar'] == '') ? $imgautor = $imgdefault_g : $imgautor = $profile->profile['avatar'];
            ($profile->profile['website'] != '') ? $link = $profile->profile['website'] : $link = "#" ;
            $title_g = $item->created_by_alias ? $item->created_by_alias : $item->author;
          }
		  break;
		  
		// Si es Gravatar
		case '2':
		  // Correo del autor
		  $autor = JFactory::getUser($item->created_by);
		  $title_g = $item->created_by_alias ? $item->created_by_alias : $item->author;
		
		  // Creo hash
		  $hash = md5(strtolower(trim($autor->email)));
		
		  // Cargo link a Gravatar
		  $str = @file_get_contents( 'http://www.gravatar.com/'.$hash.'.php' );
		  if($str) {
			  $profile = unserialize($str);
			  if (is_array($profile) && isset( $profile['entry'])) {
				  $link = $profile['entry'][0]['profileUrl'];
			  }
			  // Imagen Gravatar o por defecto
			  $imgautor = "http://www.gravatar.com/avatar/avatar.php?gravatar_id=" . $hash."?d=".$imgdefault_g. "&s=" . $imgsize_g;		
		  } 
		  break;
		
		default:
			  $imgautor = $imgdefault_g;
			  $link = "#";
		}

        // Evito errores en parámetros
        if (isset($imgautor)){
            $gravatar = '<div class="gravatar" style="'.$style.'">'.
                '<div class="img_gravatar">'.
                '<a href="'.$link.'" target="_blank"">'.JHtml::_('image', $imgautor, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle')).'</a>'.
                '</div>'.
                '<div class="name_gravatar"><small>';

            if ($params->get('avatar_link')) {
                $gravatar .=' <a href="'.$link.'" target="_blank"">'.$title_g.'</a></small></div></div>';
            } else {
                $gravatar .= $title_g.'</small></div></div>';
            }

            return $gravatar;
        }
	}
开发者ID:networksoft,项目名称:seekerplus2.com,代码行数:80,代码来源:utiles.php

示例13: onBeforeRender

 public function onBeforeRender()
 {
     // Connect to Joomla
     $this->doc = JFactory::getDocument();
     $this->lang = JFactory::getLanguage();
     // Don't run on Joomla backend
     if ($this->app->isAdmin()) {
         return true;
     }
     // Don't execute on RSS feed
     if ($this->app->input->getCmd('format', '') == 'feed') {
         return true;
     }
     // Detecting Active Variables
     $sitename = $this->app->getCfg('sitename');
     $description = $this->doc->getMetaData("description");
     $url = JURI::current();
     $title = htmlspecialchars(str_replace(' - ' . $this->app->getCfg('sitename'), '', $this->doc->getTitle()));
     $menu = $this->app->getMenu();
     // Get Plugin info
     $basicimage = JURI::base() . $this->params->get('basicimage');
     $fbAdmin = $this->params->get('fbadmin');
     $fbAppid = $this->params->get('fbappid');
     $ogtype = 'business.business';
     // Component specific overrides
     if ($this->app->input->get('option') == 'com_content' && $this->app->input->get('view') == 'article') {
         // Get information of current article and set og:type
         $article = JTable::getInstance("content");
         $article->load($this->app->input->get('id'));
         $images = json_decode($article->images);
         $ogtype = 'article';
         // Get profile and user information
         $profile = JUserHelper::getProfile($article->created_by);
         $user = JFactory::getUser($article->created_by);
         $realname = $user->name;
         // If the article has a introtext, use it as description
         if (!empty($article->introtext)) {
             $description = preg_replace('/{[\\s\\S]+?}/', '', trim(htmlspecialchars(strip_tags($article->introtext))));
             $description = preg_replace('/\\s\\s+/', ' ', $description);
         }
         // Set Twitter description
         $descriptiontw = JHtml::_('string.truncate', $description, 140);
         // Set facebook descriptoin
         $descriptionfb = JHtml::_('string.truncate', $description, 300);
         // Set general descripton tag
         $description = JHtml::_('string.truncate', $description, 160);
         $this->doc->setDescription($description);
         // Get canonical url if exist
         foreach ($this->doc->_links as $l => $array) {
             if ($array['relation'] == 'canonical') {
                 $url = $this->doc->_links[$l];
             }
         }
         // Set social image
         if (!empty($images->image_fulltext)) {
             $basicimage = JURI::base() . $images->image_fulltext;
         } elseif (!empty($images->image_intro)) {
             $basicimage = JURI::base() . $images->image_intro;
         } elseif (strpos($article->fulltext, '<img') !== false) {
             // Get img tag from article
             preg_match('/(?<!_)src=([\'"])?(.*?)\\1/', $article->fulltext, $articleimages);
             $basicimage = JURI::base() . $articleimages[2];
         } elseif (strpos($article->introtext, '<img') !== false) {
             // Get img tag from article
             preg_match('/(?<!_)src=([\'"])?(.*?)\\1/', $article->introtext, $articleimages);
             $basicimage = JURI::base() . $articleimages[2];
         }
         // Set publish and modifed time
         $publishedtime = $article->created;
         $modifiedtime = $article->modified;
         // Set Profile information
         $profile_googleplus = $profile->socialmetatags['googleplus'];
         $profile_twitter = $profile->socialmetatags['twitter'];
         $profile_facebook = $profile->socialmetatags['facebook'];
     } else {
         // Fallback
         $descriptiontw = JHtml::_('string.truncate', $description, 140);
         $descriptionfb = JHtml::_('string.truncate', $description, 300);
         $profile_googleplus = $this->params->get('googlepluspublisher');
         $profile_twitter = $this->params->get('twittersite');
     }
     // Set Meta Tags
     $metaproperty = array();
     $metaitemprop = array();
     $metaname = array();
     // Meta Tags for Discoverability
     $metaproperty['place:location:latitude'] = $this->params->get('placelocationlatitude');
     $metaproperty['place:location:longitude'] = $this->params->get('placelocationlongitude');
     $metaproperty['business:contact_data:street_address'] = $this->params->get('businesscontentdatastreetaddress');
     $metaproperty['business:contact_data:locality'] = $this->params->get('businesscontentdatalocality');
     $metaproperty['business:contact_data:postal_code'] = $this->params->get('businesscontentdatapostalcode');
     $metaproperty['business:contact_data:country_name'] = $this->params->get('businesscontentdatacountryname');
     $metaproperty['business:contact_data:email'] = $this->params->get('businesscontentdataemail');
     $metaproperty['business:contact_data:phone_number'] = $this->params->get('businesscontentdataphonenumber');
     $metaproperty['business:contact_data:website'] = $this->params->get('businesscontactdatawebsite');
     // Meta Tags for Google Plus
     $metaitemprop['name'] = $title;
     $metaitemprop['description'] = $description;
     $metaitemprop['image'] = $basicimage;
     if ($this->params->get('googlepluspublisher')) {
//.........这里部分代码省略.........
开发者ID:n9iels,项目名称:pkg_SocialMetaTags,代码行数:101,代码来源:socialmetatags.php

示例14:

        case 1:
            echo '<td>' . JText::_('JOPTION_SELECT_STATUS_OPEN') . '</td>' . "\n";
            break;
        case 2:
            echo '<td>' . JText::_('JOPTION_SELECT_STATUS_ACK') . '</td>' . "\n";
            break;
        case 3:
            echo '<td>' . JText::_('JOPTION_SELECT_STATUS_CLOSED') . '</td>' . "\n";
            break;
    }
    echo '<td>' . $item->reported . '</td>' . "\n";
    echo '<td>' . $item->acknowledged . '</td>' . "\n";
    echo '<td>' . $item->closed . '</td>' . "\n";
    echo '<td>' . $item->username . '</td>' . "\n";
    $issuer =& JFactory::getUser($item->userid);
    $userProfile = JUserHelper::getProfile($item->userid);
    $issuer->address = $userProfile->profile['address1'];
    $issuer->phone = $userProfile->profile['phone'];
    echo '<td>' . $issuer->email . '<br />' . $issuer->address . '<br />' . $issuer->phone . '</td>' . "\n";
    echo '</tr>';
}
?>
        <tr>
                <td colspan="11"><?php 
echo $this->pagination->getListFooter();
?>
</td>
        </tr>
  </tbody>
</table> 
开发者ID:Ayner,项目名称:Improve-my-city,代码行数:30,代码来源:default.php

示例15: printFieldElement

 /**
  * Prints the field
  *
  * @param   object $field       - The field obj
  * @param   bool   $pageone     - The page
  * @param   int    $value       - The value
  * @param   string $field_style - The style
  *
  * @static
  * @return  void
  */
 public static function printFieldElement($field, $pageone = false, $value = -1, $field_style = "default")
 {
     if ($field->type == 'spacer') {
         echo "<tr>";
         echo "<td colspan=\"2\">";
         echo self::getSpacerField($field->style);
         echo "</td>";
         echo "</tr>\n";
     } elseif ($field->type == 'spacertext') {
         echo "<tr>";
         echo "<td colspan=\"2\">";
         echo self::getSpacerTextField($field->field_name, $field->label, $field->style);
         echo "</td>";
         echo "</tr>\n";
     } else {
         echo '<tr>';
         if ($field_style == "small") {
             $size = "100px";
         } else {
             $size = "150px";
         }
         echo '<td class="key" width="' . $size . '">';
         echo '<label for="' . $field->field_name . '" width="100" title="' . JText::_($field->label) . '">';
         echo JText::_($field->label);
         if ($field->required == 1) {
             echo " <span class=\"mat_req\">*</span>";
         }
         echo '</label>';
         echo '</td>';
         echo '<td>';
         if ($field_style == "small") {
             $style = "width: 100px";
         } else {
             // Default
             $style = "width: 250px";
         }
         if (!empty($field->style)) {
             $style = $field->style;
         }
         // Checking required only on page one, should be changed sometime
         if (!$pageone) {
             $field->required = false;
         }
         // Get the value out of mapping
         if ($field->datasource && JFactory::getUser()->id) {
             // Joomla Data mapping
             if ($field->datasource_map != "email" && $field->datasource_map != "username" && $field->datasource_map != "name") {
                 // TODO optimize
                 $field->default = JUserHelper::getProfile()->profile[$field->datasource_map];
             } else {
                 $field->default = JFactory::getUser()->get($field->datasource_map);
             }
         }
         if ($value != -1) {
             $field->default = $value;
         }
         switch ($field->type) {
             case 'textarea':
                 echo self::getTextAreaField($field->field_name, $field->label, $field->default, $style, $field->required);
                 break;
             case 'select':
                 echo self::getSelectField($field->field_name, $field->label, $field->default, $field->values, $style, $field->required);
                 break;
             case 'radio':
                 echo self::getRadioField($field->field_name, $field->label, $field->default, $field->values, $style, $field->required);
                 break;
             case 'checkbox':
                 echo self::getCheckboxField($field->field_name, $field->label, $field->default, $field->values, $style, $field->required);
                 break;
             case 'text':
             default:
                 echo self::getTextField($field->field_name, $field->label, $field->default, $style, $field->required);
                 break;
         }
         echo '</td>';
         echo '</tr>';
     }
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:89,代码来源:util_booking.php


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