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


PHP Jtext::sprintf方法代码示例

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


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

示例1: canDelete

 /**
  * @todo check/fix! // 30-07-2015
  * move to model/controller
  */
 public function canDelete($id)
 {
     // cannot be deleted if assigned to games
     $query = ' SELECT COUNT(id) FROM #__joomleague_match_player ' . ' WHERE teamplayer_id = ' . $this->getDbo()->Quote($id) . ' GROUP BY teamplayer_id ';
     $this->getDbo()->setQuery($query, 0, 1);
     $res = $this->getDbo()->loadResult();
     if ($res) {
         $this->setError(Jtext::sprintf('PLAYER ASSIGNED TO %d GAMES', $res));
         return false;
     }
     // cannot be deleted if has events
     $query = ' SELECT COUNT(id) FROM #__joomleague_match_event ' . ' WHERE teamplayer_id = ' . $this->getDbo()->Quote($id) . ' GROUP BY teamplayer_id ';
     $this->getDbo()->setQuery($query, 0, 1);
     $res = $this->getDbo()->loadResult();
     if ($res) {
         $this->setError(JText::sprintf('%d EVENTS ASSIGNED TO PLAYER', $res));
         return false;
     }
     // cannot be deleted if has stats
     $query = ' SELECT COUNT(id) FROM #__joomleague_match_statistic ' . ' WHERE teamplayer_id = ' . $this->getDbo()->Quote($id) . ' GROUP BY teamplayer_id ';
     $this->getDbo()->setQuery($query, 0, 1);
     $res = $this->getDbo()->loadResult();
     if ($res) {
         $this->setError(JText::sprintf('%d STATS ASSIGNED TO PLAYER', $res));
         return false;
     }
     return true;
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:32,代码来源:teamplayer.php

示例2: canDelete

 function canDelete($id)
 {
     // the staff cannot be deleted if assigned to games
     $query = ' SELECT COUNT(id) FROM #__joomleague_match_staff ' . ' WHERE team_staff_id = ' . $this->getDbo()->Quote($id) . ' GROUP BY team_staff_id ';
     $this->getDbo()->setQuery($query, 0, 1);
     $res = $this->getDbo()->loadResult();
     if ($res) {
         $this->setError(Jtext::sprintf('STAFF ASSIGNED TO %d GAMES', $res));
         return false;
     }
     // the staff cannot be deleted if has stats
     $query = ' SELECT COUNT(id) FROM #__joomleague_match_staff_statistic ' . ' WHERE team_staff_id = ' . $this->getDbo()->Quote($id) . ' GROUP BY team_staff_id ';
     $this->getDbo()->setQuery($query, 0, 1);
     $res = $this->getDbo()->loadResult();
     if ($res) {
         $this->setError(JText::sprintf('%d STATS ASSIGNED TO STAFF', $res));
         return false;
     }
     return true;
 }
开发者ID:santas156,项目名称:joomleague-2-komplettpaket,代码行数:20,代码来源:teamstaff.php

示例3: saveassign

 /**
  * save assigned individuals
  *
  * @return bool
  *
  * @throws Exception
  */
 public function saveassign()
 {
     $project_id = $this->input->getInt('project_id', 0);
     $cid = $this->input->get('cid', '', 'array');
     $numbers = $this->input->get('number', '', 'array');
     $team_id = $this->input->get('team_id', '', 'array');
     JArrayHelper::toInteger($cid);
     JArrayHelper::toInteger($team_id);
     if (count($cid) < 1) {
         throw new Exception(JText::_('COM_TRACKS_Select_an_individual_to_assign'), 500);
     }
     $rows = array();
     foreach ($cid as $k => $id) {
         $row = new stdclass();
         $row->individual_id = $cid[$k];
         $row->team_id = $team_id[$k];
         $row->number = $numbers[$k];
         $row->project_id = $project_id;
         $rows[] = $row;
     }
     $msg = '';
     $model = $this->getModel('projectindividuals');
     $model->setState('project_id', $project_id);
     $assigned = $model->assign($rows);
     if ($assigned === false) {
         $msg = $model->getError(true);
         $link = 'index.php?option=com_tracks&view=individuals';
         $this->setRedirect($link, $msg);
     } else {
         $msg = Jtext::sprintf('COM_TRACKS_D_INDIVIDUALS_ADDED_TO_PROJECT', $assigned);
         $app = JFactory::getApplication();
         $option = $app->input->getCmd('option', 'com_tracks');
         $app->setUserState($option . 'project', $project_id);
         $link = 'index.php?option=com_tracks&view=projectindividuals';
         $this->setRedirect($link, $msg);
     }
     return true;
 }
开发者ID:julienV,项目名称:Joomla-Tracks,代码行数:45,代码来源:individual.php

示例4: _handleResponse


//.........这里部分代码省略.........
             $authorizeNetResponse['fax'] = $response_array[22];
             $authorizeNetResponse['email_address'] = $response_array[23];
             $authorizeNetResponse['ship_to_first_name'] = $response_array[24];
             $authorizeNetResponse['ship_to_last_name'] = $response_array[25];
             $authorizeNetResponse['ship_to_company'] = $response_array[26];
             $authorizeNetResponse['ship_to_address'] = $response_array[27];
             $authorizeNetResponse['ship_to_city'] = $response_array[28];
             $authorizeNetResponse['ship_to_state'] = $response_array[29];
             $authorizeNetResponse['ship_to_zip_code'] = $response_array[30];
             $authorizeNetResponse['ship_to_country'] = $response_array[31];
             $authorizeNetResponse['tax'] = $response_array[32];
             $authorizeNetResponse['duty'] = $response_array[33];
             $authorizeNetResponse['freight'] = $response_array[34];
             $authorizeNetResponse['tax_exempt'] = $response_array[35];
             $authorizeNetResponse['purchase_order_number'] = $response_array[36];
             $authorizeNetResponse['md5_hash'] = $response_array[37];
             $authorizeNetResponse['card_code_response'] = $response_array[38];
             $authorizeNetResponse['cavv_response'] = $response_array[39];
             //// cardholder_authentication_verification_response
             $authorizeNetResponse['account_number'] = $response_array[50];
             $authorizeNetResponse['card_type'] = $response_array[51];
             $authorizeNetResponse['split_tender_id'] = $response_array[52];
             $authorizeNetResponse['requested_amount'] = $response_array[53];
             $authorizeNetResponse['balance_on_card'] = $response_array[54];
         }
         /*
          * check the amount is the same as the amount sent
          */
         /* SUBCODE?? */
         $this->approved = $authorizeNetResponse['response_code'] == self::APPROVED;
         $this->declined = $authorizeNetResponse['response_code'] == self::DECLINED;
         $this->error = $authorizeNetResponse['response_code'] == self::ERROR;
         $this->held = $authorizeNetResponse['response_code'] == self::HELD;
         // Set custom fields: not used yet: could put the return context
         /*
          if ($count = count($custom_fields)) {
          $custom_fields_response = array_slice($response_array, -$count, $count);
          $i = 0;
          foreach ($custom_fields as $key => $value) {
          $this->$key = $custom_fields_response[$i];
          $i++;
          }
          }
         */
         $virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($authorizeNetResponse['invoice_number']);
         if (!$virtuemart_order_id) {
             $this->approved = FALSE;
             $this->error = TRUE;
             $this->logInfo(JText::sprintf('VMPAYMENT_AUTHORIZENET_NO_ORDER_NUMBER', $authorizeNetResponse['invoice_number']), 'ERROR');
             //$this->sendEmailToVendorAndAdmins(JText::sprintf('VMPAYMENT_AUTHORIZENET_NO_ORDER_NUMBER', $authorizeNetResponse['invoice_number']), JText::sprintf('VMPAYMENT_AUTHORIZENET_ERROR_WHILE_PROCESSING_PAYMENT', $authorizeNetResponse['invoice_number']));
             $html = Jtext::sprintf('VMPAYMENT_AUTHORIZENET_ERROR', $authorizeNetResponse['response_reason_text'], $authorizeNetResponse['response_code']) . "<br />";
             $this->logInfo($html, 'PAYMENT DECLINED');
             return $html;
         }
         if ($this->error or $this->declined) {
             // Prepare data that should be stored in the database
             $dbValues['authorizenet_response_response_code'] = $authorizeNetResponse['response_code'];
             $dbValues['authorizenet_response_response_subcode'] = $authorizeNetResponse['response_subcode'];
             $dbValues['authorizenet_response_response_reason_code'] = $authorizeNetResponse['response_reason_code'];
             $dbValues['authorizenet_response_response_reason_text'] = $authorizeNetResponse['response_reason_text'];
             //$this->storePSPluginInternalData($dbValues, 'id', true);
             $html = Jtext::sprintf('VMPAYMENT_AUTHORIZENET_ERROR', $authorizeNetResponse['response_reason_text'], $authorizeNetResponse['response_code']) . "<br />";
             $this->logInfo($html, 'PAYMENT DECLINED');
             return $html;
         }
     } else {
         $this->approved = FALSE;
         $this->error = TRUE;
         $this->logInfo(JText::_('VMPAYMENT_AUTHORIZENET_CONNECTING_ERROR'), 'ERROR');
         $this->sendEmailToVendorAndAdmins(JText::_('VMPAYMENT_AUTHORIZENET_ERROR_EMAIL_SUBJECT'), JText::_('VMPAYMENT_AUTHORIZENET_CONNECTING_ERROR'));
         return JText::_('VMPAYMENT_AUTHORIZENET_CONNECTING_ERROR');
     }
     // Prep
     // get all know columns of the table
     $db = JFactory::getDBO();
     $query = 'SHOW COLUMNS FROM `' . $this->_tablename . '` ';
     $db->setQuery($query);
     $columns = $db->loadResultArray(0);
     foreach ($authorizeNetResponse as $key => $value) {
         $table_key = 'authorizenet_response_' . $key;
         if (in_array($table_key, $columns)) {
             $response_fields[$table_key] = $value;
         }
     }
     $response_fields['virtuemart_order_id'] = $virtuemart_order_id;
     $response_fields['invoice_number'] = $authorizeNetResponse['invoice_number'];
     $response_fields['authorizeresponse_raw'] = $response;
     $this->storePSPluginInternalData($response_fields, 'virtuemart_order_id', TRUE);
     $currencyModel = VmModel::getModel('Currency');
     $currency = $currencyModel->getCurrency($order['details']['BT']->user_currency_id);
     $html = '<table class="adminlist">' . "\n";
     $html .= $this->getHtmlRow('AUTHORIZENET_PAYMENT_NAME', $payment_name);
     $html .= $this->getHtmlRow('AUTHORIZENET_ORDER_NUMBER', $authorizeNetResponse['invoice_number']);
     $html .= $this->getHtmlRow('AUTHORIZENET_AMOUNT', $authorizeNetResponse['amount'] . ' ' . $currency->currency_name);
     //$html .= $this->getHtmlRow('AUTHORIZENET_RESPONSE_AUTHORIZATION_CODE', $authorizeNetResponse['authorization_code']);
     $html .= $this->getHtmlRow('AUTHORIZENET_RESPONSE_TRANSACTION_ID', $authorizeNetResponse['transaction_id']);
     $html .= '</table>' . "\n";
     $this->logInfo(JText::_('VMPAYMENT_AUTHORIZENET_ORDER_NUMBER') . " " . $authorizeNetResponse['invoice_number'] . ' payment approved', 'message');
     return $html;
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:101,代码来源:authorizenet.php

示例5: plgVmConfirmedOrder

 function plgVmConfirmedOrder($cart, $order)
 {
     if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {
         return NULL;
         // Another method was selected, do nothing
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return false;
     }
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     $sessionKlarnaData = $this->getKlarnaSessionData();
     try {
         $result = KlarnaHandler::addTransaction($method, $order, $sessionKlarnaData->KLARNA_DATA['pclass']);
     } catch (Exception $e) {
         $log = $e->getMessage();
         vmError($e->getMessage() . ' #' . $e->getCode());
         //KlarnaHandler::redirectPaymentMethod('error', $e->getMessage() . ' #' . $e->getCode());
     }
     //vmdebug('addTransaction result', $result);
     // Delete all Klarna data
     //unset($sessionKlarnaData->KLARNA_DATA, $_SESSION['SSN_ADDR']);
     $shipTo = KlarnaHandler::getShipToAddress($cart);
     $modelOrder = VmModel::getModel('orders');
     if ($result['status_code'] == KlarnaFlags::DENIED) {
         $order['customer_notified'] = 0;
         $order['order_status'] = $method->status_denied;
         $order['comments'] = JText::sprintf('VMPAYMENT_KLARNA_PAYMENT_KLARNA_STATUS_DENIED');
         if ($method->delete_order) {
             $order['comments'] .= "<br />" . $result['status_text'];
         }
         $modelOrder->updateStatusForOneOrder($order['details']['BT']->virtuemart_order_id, $order, true);
         vmdebug('addTransaction remove order?', $method->delete_order);
         if ($method->delete_order) {
             $modelOrder->remove(array('virtuemart_order_id' => $order['details']['BT']->virtuemart_order_id));
         } else {
             $dbValues['order_number'] = $order['details']['BT']->order_number;
             $dbValues['payment_name'] = $this->renderKlarnaPluginName($method, $order['details']['BT']->virtuemart_country_id, $shipTo, $order['details']['BT']->order_total);
             $dbValues['virtuemart_paymentmethod_id'] = $order['details']['BT']->virtuemart_paymentmethod_id;
             $dbValues['order_payment'] = $order['details']['BT']->order_payment;
             $dbValues['klarna_pclass'] = $sessionKlarnaData->KLARNA_DATA['PCLASS'];
             $dbValues['klarna_log'] = $log;
             $dbValues['klarna_status_code'] = $result['status_code'];
             $dbValues['klarna_status_text'] = $result['status_text'];
             $this->storePSPluginInternalData($dbValues);
         }
         $app = JFactory::getApplication();
         $app->enqueueMessage($result['status_text']);
         $app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&task=editpayment'), JText::_('COM_VIRTUEMART_CART_ORDERDONE_DATA_NOT_VALID'));
     } else {
         $invoiceno = $result[1];
         if ($invoiceno && is_numeric($invoiceno)) {
             //Get address id used for this order.
             $country = $sessionKlarnaData->KLARNA_DATA['country'];
             // $lang = KlarnaHandler::getLanguageForCountry($method, KlarnaHandler::convertToThreeLetterCode($country));
             // $d['order_payment_name'] = $kLang->fetch('MODULE_INVOICE_TEXT_TITLE', $lang);
             // Add a note in the log
             $log = Jtext::sprintf('VMPAYMENT_KLARNA_INVOICE_CREATED_SUCCESSFULLY', $invoiceno);
             // Prepare data that should be stored in the database
             $dbValues['order_number'] = $order['details']['BT']->order_number;
             $dbValues['payment_name'] = $this->renderKlarnaPluginName($method, $order['details']['BT']->virtuemart_country_id, $shipTo, $order['details']['BT']->order_total);
             $dbValues['virtuemart_paymentmethod_id'] = $order['details']['BT']->virtuemart_paymentmethod_id;
             $dbValues['order_payment'] = $order['details']['BT']->order_payment;
             $dbValues['order_payment_tax'] = $order['details']['BT']->order_payment_tax;
             $dbValues['klarna_pclass'] = $sessionKlarnaData->KLARNA_DATA['pclass'];
             $dbValues['klarna_invoice_no'] = $invoiceno;
             $dbValues['klarna_log'] = $log;
             $dbValues['klarna_eid'] = $result['eid'];
             $dbValues['klarna_status_code'] = $result['status_code'];
             $dbValues['klarna_status_text'] = $result['status_text'];
             $this->storePSPluginInternalData($dbValues);
             /*
              * Klarna's order status
              *  Integer - 1,2 or 3.
              *  1 = OK: KlarnaFlags::ACCEPTED
              *  2 = Pending: KlarnaFlags::PENDING
              *  3 = Denied: KlarnaFlags::DENIED
              */
             if ($result['status_code'] == KlarnaFlags::PENDING) {
                 /* if Klarna's order status is pending: add it in the history */
                 /* The order is under manual review and will be accepted or denied at a later stage.
                    Use cronjob with checkOrderStatus() or visit Klarna Online to check to see if the status has changed.
                    You should still show it to the customer as it was accepted, to avoid further attempts to fraud. */
                 $order['order_status'] = $method->status_pending;
             } else {
                 $order['order_status'] = $method->status_success;
             }
             $order['customer_notified'] = 1;
             $order['comments'] = $log;
             $modelOrder->updateStatusForOneOrder($order['details']['BT']->virtuemart_order_id, $order, true);
             $html = $this->renderByLayout('orderdone', array('payment_name' => $dbValues['payment_name'], 'klarna_invoiceno' => $invoiceno));
             $session = JFactory::getSession();
             $session->clear('Klarna', 'vm');
             //We delete the old stuff
             $cart->emptyCart();
             JRequest::setVar('html', $html);
             return true;
         } else {
             vmError('Error with invoice number');
//.........这里部分代码省略.........
开发者ID:joselapria,项目名称:virtuemart,代码行数:101,代码来源:klarna.php

示例6:

fieldset select,
fieldset img,
fieldset button {
    float: none;
    margin: 5px 5px 5px 0;
    width: auto;
}
</style>
<div id="editcell">
	<fieldset class="adminform">
		<legend><?php 
echo JText::sprintf('COM_JOOMLEAGUE_ADMIN_MATCHES_TITLE2', '<i>' . $this->roundws->name . '</i>', '<i>' . $this->projectws->name . '</i>');
?>
</legend>
		<p class="note"><?php 
echo Jtext::sprintf('COM_JOOMLEAGUE_ADMIN_MATCHES_ALL_TIMES_IN_S_TZ', $this->projectws->timezone);
?>
</p>
		<?php 
echo $this->loadTemplate('roundselect');
?>
		<!-- Start games list -->
		<form action="<?php 
echo $this->request_url;
?>
" method="post" id='adminForm'>
			<?php 
$colspan = $this->projectws->allow_add_time ? 16 : 15;
?>
			<table class="adminlist table table-striped">
				<thead>
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:31,代码来源:default_matches.php

示例7: defined

/**
 * @package	HikaShop for Joomla!
 * @version	2.3.5
 * @author	hikashop.com
 * @copyright	(C) 2010-2015 HIKARI SOFTWARE. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_product_waitlist_<?php 
echo JRequest::getInt('cid');
?>
_page" class="hikashop_product_waitlist_page">
	<div class="hikashop_product_waitlist_title"><?php 
$url = '<a href="' . $this->product_url . '">' . $this->product->product_name . '</a>';
echo Jtext::sprintf('WAITLIST_FOR_PRODUCT', $url);
?>
</div>
	<fieldset>
		<div class="toolbar" id="toolbar" style="float: right;">
			<button class="btn" type="button" onclick="submitform('add_waitlist');"><img src="<?php 
echo HIKASHOP_IMAGES;
?>
ok.png"/><?php 
echo JText::_('OK');
?>
</button>
			<button class="btn" type="button" onclick="history.back();"><img src="<?php 
echo HIKASHOP_IMAGES;
?>
cancel.png"/><?php 
开发者ID:jhener79,项目名称:vlakc,代码行数:31,代码来源:waitlist.php

示例8: plgVmOnUpdateOrderPayment

	/**
	 * Save updated order data to the method specific table
	 *
	 * @param array $order Form data
	 * @return mixed, True on success, false on failures (the rest of the save-process will be
	 * skipped!), or null when this method is not actived.

	 */
	public function plgVmOnUpdateOrderPayment (&$order, $old_order_status) {

		if (!$this->selectedThisByMethodId ($order->virtuemart_paymentmethod_id)) {
			return NULL; // Another method was selected, do nothing
		}

		if (!($method = $this->getVmPluginMethod ($order->virtuemart_paymentmethod_id))) {
			return NULL; // Another method was selected, do nothing
		}
		if (!($payments = $this->_getKlarnaInternalData ($order->virtuemart_order_id))) {
			vmError (JText::sprintf ('VMPAYMENT_KLARNA_ERROR_NO_DATA', $order->virtuemart_order_id));
			return NULL;
		}

		if (!($invNo = $this->_getKlarnaInvoiceNo ($payments))) {
			return NULL;
		}
		// to activate the order
		if ($order->order_status == $method->status_shipped) {
			$country = $this->getCountryCodeByOrderId ($order->virtuemart_order_id);
			$klarna_vm = new Klarna_virtuemart();
			$cData = KlarnaHandler::countryData ($method, $country);
			/*
		   * The activateInvoice function is used to activate a passive invoice.
		   * Please note that this function call cannot activate an invoice created in test mode.
		   * It is however possible to manually activate that type of invoices.
		   */
			$force_emailInvoice = FALSE;
			$klarna_vm->config ($cData['eid'], $cData['secret'], $cData['country_code'], NULL, $cData['currency_code'], KlarnaHandler::getKlarnaMode ($method, $cData['country_code_3']));

			try {
				//You can specify a new pclass ID if the customer wanted to change it before you activate.

				 $klarna_vm->activateInvoice ($invNo);
				$invoice_url=$this->getInvoice($invNo, $invoice_url);

				//The url points to a PDF file for the invoice.
				//Invoice activated, proceed accordingly.
			}
			catch (Exception $e) {
				$log = $e->getMessage () . " (#" . $e->getCode () . ")";
				if ($e->getCode () != 8111) { // (invoice_not_passive_or_frozen)
					$this->_updateKlarnaInternalData ($order, $log);
					VmError ($e->getMessage () . " (#" . $e->getCode () . ")");
					return FALSE;
				} else {
					$force_emailInvoice = TRUE;
				}
			}

			$emailInvoice = $this->emailInvoice ($method, $klarna_vm, $invNo, $force_emailInvoice);
			$dbValues['order_number'] = $order->order_number;
			$dbValues['virtuemart_order_id'] = $order->virtuemart_order_id;
			$dbValues['virtuemart_paymentmethod_id'] = $order->virtuemart_paymentmethod_id;
			$dbValues['klarna_invoice_no'] = $invNo;
			$dbValues['klarna_log'] = Jtext::sprintf ('VMPAYMENT_KLARNA_ACTIVATE_INVOICE', $invNo);
			if ($emailInvoice) {
				$dbValues['klarna_log'] .= "<br />" . Jtext::sprintf ('VMPAYMENT_KLARNA_EMAIL_INVOICE', $invNo);
			} else {
				$dbValues['klarna_log'] .= "<br />" . Jtext::_ ('VMPAYMENT_KLARNA_EMAIL_INVOICE_NOT_SENT');
			}
			$dbValues['klarna_eid'] = $cData['eid'];
			//$dbValues['klarna_status_code'] = KLARNA_INVOICE_ACTIVE; // Invoice is active
			//$dbValues['klarna_status_text'] = '';
			$dbValues['klarna_pdf_invoice'] = $invoice_url;

			$this->storePSPluginInternalData ($dbValues);
			return TRUE;
		}
		return NULL;
	}
开发者ID:sergy444,项目名称:joomla,代码行数:79,代码来源:klarna.php

示例9: count

    $ownerUrl = CUrlHelper::userLink($act->actor);
    $target = CFactory::getUser($video->creator);
    $targetName = $user->getDisplayName();
    $targetUrl = CUrlHelper::userLink($video->creator);
    if (count($users) > 1) {
        if (count($users) == 2) {
            $activityString = JText::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OTHERS_VIDEO_TWO', CUrlHelper::userLink($user->id), $user->getDisplayName(), CUrlHelper::userLink($users[count($users) - 1]), CFactory::getUser($users[count($users) - 1])->getDisplayName(), $targetUrl, $target->getDisplayName(), $url);
        } else {
            $activityString = JText::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OTHERS_VIDEO_MORE', CUrlHelper::userLink($user->id), $user->getDisplayName(), 'onclick="joms.api.streamShowOthers(' . $act->id . ');return false;"', count($users) - 1, $targetUrl, $target->getDisplayName(), $url);
        }
    } else {
        $activityString = Jtext::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OTHERS_VIDEO', $ownerUrl, $targetName, $targetUrl, $target->getDisplayName(), $url);
    }
} else {
    //user comment on his own photo
    $activityString = Jtext::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OWN_VIDEO', CUrlHelper::userLink($user->id), $user->getDisplayName(), $url);
}
$isVideoModal = $config->get('video_mode') == 1;
if ($video->type === 'file') {
    $storage = CStorage::getStorage($video->storage);
    $path = $storage->getURI($video->path);
} else {
    $path = $video->path;
}
?>

<div class="joms-stream__header">
    <div class= "joms-avatar--stream">
        <a href="<?php 
echo CUrlHelper::userLink($user->id);
?>
开发者ID:Jougito,项目名称:DynWeb,代码行数:31,代码来源:comment.php

示例10:

} else {
    $createdTime = $date->format($config->get('profileDateFormat'));
}
$photo_info = $photo->getInfo();
$photo_size = $photo_info['size'];
//generate activity based on the photo owner
if ($photo->creator != $act->actor) {
    //if user a commented on user b photo, we need to pass in the user info
    $ownerUrl = CUrlHelper::userLink($act->actor);
    $target = CFactory::getUser($photo->creator);
    $targetName = $user->getDisplayName();
    $targetUrl = CUrlHelper::userLink($photo->creator);
    $activityString = Jtext::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OTHERS_PHOTO', $ownerUrl, $targetName, $targetUrl, $target->getDisplayName(), $url);
} else {
    //user comment on his own photo
    $activityString = Jtext::sprintf('COM_COMMUNITY_ACTIVITIES_COMMENT_OWN_PHOTO', $url, $user->getDisplayName(), $url);
}
?>
<div class="joms-stream-avatar">
	<a href="<?php 
echo CUrlHelper::userLink($user->id);
?>
">
		<img class="img-responsive joms-radius-rounded" data-author="<?php 
echo $user->id;
?>
" src="<?php 
echo $user->getThumbAvatar();
?>
">
	</a>
开发者ID:SMARTRESPONSOR,项目名称:SMARTRESPONSOR,代码行数:31,代码来源:activities.photos.comment.php

示例11: install

 function install()
 {
     $extDir = JPATH_ROOT . '/components/com_sef/sef_ext';
     $db = $this->parent->getDBO();
     $this->manifest =& $this->parent->getManifest();
     $xml = $this->manifest;
     $name = (string) $xml->name;
     $name = JFilterInput::getInstance()->clean($name, 'string');
     $this->set('name', $name);
     $description = (string) $xml->description;
     if (is_a($description, 'JSimpleXMLElement')) {
         $this->parent->set('message', JText::_($description));
     } else {
         $this->parent->set('message', '');
     }
     if (count($xml->files->children())) {
         foreach ($xml->files->children() as $file) {
             if ((string) $file->attributes()->sef_ext) {
                 $element = (string) $file->attributes()->sef_ext;
                 if (substr($element, 0, 13) != 'ext_joomsef4_') {
                     $element = 'ext_joomsef4_' . $element;
                 }
                 $this->set('element', $element);
                 break;
             }
         }
     }
     if (!empty($element)) {
         $this->parent->setPath('extension_root', $extDir);
     } else {
         $this->parent->abort(JText::sprintf('COM_SEF_INSTALLER_ABORT_SEFEXT_INSTALL_NO_FILE', JText::_('JLIB_INSTALLER_' . $this->route)));
         return false;
     }
     $this->route = 'install';
     $query = "SELECT extension_id, state, params \n";
     $query .= "FROM #__extensions \n";
     $query .= "WHERE type=" . $db->quote('sef_ext') . " \n";
     $query .= "AND element=" . $db->quote($element);
     $db->setQuery($query);
     $ext_o = $db->loadObject();
     if (!is_null($ext_o)) {
         $id = $ext_o->extension_id;
     } else {
         $id = null;
     }
     if (file_exists($this->parent->getPath('extension_root')) && (!$this->parent->isOverwrite() || $this->parent->isUpgrade())) {
         if ($this->parent->isUpgrade() || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update') || is_a($xml->update, 'SimpleXMLElement'))) {
             $this->parent->setOverwrite(true);
             $this->parent->setUpgrade(true);
             if ($id && $ext_o->state != -2) {
                 $this->route = 'update';
             }
         } else {
             if (!$this->parent->isOverwrite()) {
                 $this->parent->abort(JText::sprintf('COM_SEF_INSTALLER_ABORT_SEFEXT_INSTALL_DIRECTORY', JText::_('JLIB_INSTALLER_' . $this->route), $this->parent->getPath('extension_root')));
             }
         }
     }
     if ((string) $xml->scriptfile) {
         $script = (string) $xml->scriptfile;
         $script_file = $this->parent->getPath('source') . '/' . $script;
         if (is_file($script_file)) {
             include_once $script_file;
             $class = $element . 'InstallerScript';
             if (class_exists($class)) {
                 $this->parent->manifestClass = new $class($this);
                 $this->set('manifest_script', $script);
             }
         }
     }
     ob_start();
     ob_implicit_flush(false);
     if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'preflight')) {
         if ($this->parent->manifestClass->preflight($this->route, $this) === false) {
             $this->parent->abort(JText::_('COM_SEF_INSTALLER_ABORT_SEF_INSTALL_CUSTOM_INSTALL_FAILURE'));
             return false;
         }
     }
     $msg = ob_get_contents();
     ob_end_clean();
     if (!file_exists($this->parent->getPath('extension_root'))) {
         if (JFolder::create($this->parent->getPath('extension_root'))) {
             $this->parent->abort(JText::sprintf('COM_SEF_INSTALLER_ABORT_SEF_INSTALL_CREATE_DIRECTORY', $this->parent->getPath('extension_root')));
             return false;
         }
     }
     $this->old_files = null;
     if ($this->route == 'update') {
         $old = null;
         $tmp = new JInstaller();
         $option = str_replace('ext_joomsef4_', 'com_', $this->get('element'));
         $tmp_manifest = $tmp->isManifest($this->parent->getPath('extension_root') . '/' . $option . '.xml');
         if ($tmp_manifest) {
             $this->old_files = $tmp_manifest->files;
         }
     }
     if (!$this->parent->parseFiles($xml->files, -1, $this->old_files)) {
         $this->parent->abort();
         return false;
     }
//.........这里部分代码省略.........
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:101,代码来源:sef_ext.php

示例12: fixdates

 /**
  * batch convert project dates to utc
  * 
  * this is for converting former projects
  */
 public function fixdates()
 {
     $cid = JRequest::getVar('cid', array(), 'post', 'array');
     JArrayHelper::toInteger($cid);
     $msg = array();
     $type = 'message';
     if (!$cid) {
         $this->setRedirect('index.php?option=com_joomleague&view=projects&task=project.display', '', $type);
         return;
     }
     foreach ($cid as $project_id) {
         $model = $this->getModel("project");
         if (!($res = $model->utc_fix_dates($project_id))) {
             $msg[] = $model->getError();
             $type = 'error';
         } else {
             $msg[] = Jtext::sprintf('COM_JOOMLEAGUE_ADMIN_PROJECTS_SUCCESSULLY_CONVERTED_PROJECT_D', $project_id);
         }
     }
     $this->setRedirect('index.php?option=com_joomleague&view=projects&task=project.display', implode($msg, "<br/>"), $type);
 }
开发者ID:Heart1010,项目名称:JoomLeague,代码行数:26,代码来源:project.php

示例13: elseif

            echo JText::sprintf('MOD_VMCOUPONSREPORT_INVALID_TEXT');
        }
        $expiration_date = null;
    } elseif ($item->amounttype == 1) {
        echo JText::sprintf('MOD_VMCOUPONSREPORT_USER_LABEL_AMOUNT', $item->awd_amount);
        $todays_date = date("Y-m-d H:i:s");
        $today = strtotime($todays_date);
        $expiration_date = $item->validity;
        $couponname = $item->name;
        echo Jtext::sprintf('mod_VMCouponsReport_COUPON_CODE');
        echo $couponname;
        if ($expiration_date > $today && $item->remain_use > 0) {
            ?>
 <strong> <?php 
            echo "<br>";
            echo Jtext::sprintf('MOD_VMCOUPONSREPORT_VALIDITY_TEXT');
            echo date('d-m-Y H:i:s', $item->validity);
            ?>
 </strong> <?php 
        } else {
            echo JText::sprintf('MOD_VMCOUPONSREPORT_INVALID_TEXT');
        }
        $expiration_date = null;
    }
    ?>
    </li>
    <?php 
}
?>
</ul>
开发者ID:alesconti,项目名称:FF_2015,代码行数:30,代码来源:default.php

示例14: updateFrom20

 /**
  * method to update the database structure from a 2.0 version
  * 
  */
 public function updateFrom20()
 {
     $db =& JFactory::getDbo();
     $dbDriver = strtolower($db->name);
     if ($dbDriver == 'mysqli') {
         $dbDriver = 'mysql';
     } elseif ($dbDriver == 'sqlsrv') {
         $dbDriver = 'sqlazure';
     }
     $basepath = JPATH_ADMINISTRATOR . '/components/com_redevent/sql/updates/' . $dbDriver;
     $files = str_replace('.sql', '', JFolder::files($basepath, '\\.sql$'));
     usort($files, 'version_compare');
     if (!count($files)) {
         return false;
     }
     // equivalent version
     $version = '2.5.b.3.0';
     // We have a version!
     foreach ($files as $file) {
         if (version_compare($file, $version) > 0) {
             $buffer = file_get_contents($basepath . '/' . $file . '.sql');
             // Graceful exit and rollback if read not successful
             if ($buffer === false) {
                 JError::raiseWarning(1, JText::_('JLIB_INSTALLER_ERROR_SQL_READBUFFER'));
                 return false;
             }
             // Create an array of queries from the sql file
             $queries = JInstallerHelper::splitSql($buffer);
             if (count($queries) == 0) {
                 // No queries to process
                 continue;
             }
             // Process each query in the $queries array (split out of sql file).
             foreach ($queries as $query) {
                 $query = trim($query);
                 if ($query != '' && $query[0] != '#') {
                     $db->setQuery($query);
                     if (!$db->query()) {
                         JError::raiseWarning(1, JText::sprintf('JLIB_INSTALLER_ERROR_SQL_ERROR', $db->stderr(true)));
                         return false;
                     }
                 }
             }
             echo Jtext::sprintf('COM_REDEVENT_UPDATED_DB_TO', $file) . '<br/>';
         }
     }
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:51,代码来源:install.redevent.php

示例15: void

    ?>
</td>
				<td><?php 
    echo $row->course_code . '-' . $row->xref . '-' . $row->attendee_id;
    ?>
</td>
				<td><?php 
    echo $row->name;
    ?>
</td>
				<td>
				  <?php 
    if (!$row->confirmed) {
        echo JHTML::link('javascript: void(0);', JHTML::_('image', 'admin/publish_x.png', JText::_('JNO'), null, true), array('onclick' => 'return listItemTask(\'cb' . $i . '\', \'confirmattendees\');', 'class' => 'hasTip', 'title' => Jtext::_('COM_REDEVENT_REGISTRATION_NOT_ACTIVATED') . '::' . Jtext::_('COM_REDEVENT_CLICK_TO_ACTIVATE')));
    } else {
        $tip = Jtext::_('COM_REDEVENT_REGISTRATION_ACTIVATED') . '::' . Jtext::sprintf('COM_REDEVENT_REGISTRATION_ACTIVATED_ON_S', JHTML::Date($row->confirmdate, JText::_('DATE_FORMAT_LC2')));
        echo JHTML::link('javascript: void(0);', JHTML::_('image', 'admin/tick.png', JText::_('JYES'), null, true), array('onclick' => 'return listItemTask(\'cb' . $i . '\', \'unconfirmattendees\');', 'class' => 'hasTip', 'title' => $tip));
    }
    ?>
				</td>
				<td>
					<?php 
    if (!$row->maxattendees) {
        // no waiting list
        ?>
					<?php 
        echo '-';
        ?>
					
          <?php 
    } else {
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:31,代码来源:default.php


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