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


PHP Jtext类代码示例

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


在下文中一共展示了Jtext类的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: postMessage

 public static function postMessage($params, $data)
 {
     $attachment = array('message' => $data['message']);
     $message = array();
     if (!class_exists('TwitterOAuth')) {
         require_once dirname(__FILE__) . '/elements/twitter/twitteroauth.php';
     }
     $user = $params->params->get('groupid');
     $checked = 0;
     $log = '';
     $publish = 1;
     if (isset($user->checked)) {
         $checked = 1;
         $twitter = unserialize($params->params->get('access_token'));
         $connection = new TwitterOAuth($params->params->get('app_appid'), $params->params->get('app_secret'), $twitter['oauth_token'], $twitter['oauth_token_secret']);
         $parameters = array('status' => $attachment['message']);
         $status = $connection->post('statuses/update', $parameters);
         if (isset($status->errors)) {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . $status->errors[0]->message . ' <br/>';
             $publish = 0;
         } else {
             $log = Jtext::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE') . ' <a href="https://twitter.com/' . $user->screen_name . '" target="_blank" style="text-decoration: underline;">' . $user->name . '</a>  - ' . JTEXT::_('PUBLISHED_TWITTER_PROFILE_SENDMESSAGE_SUCCESSFULL') . '<br/>';
             $publish = 1;
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'twitter';
     return $message;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:31,代码来源:twitterprofile.php

示例3: pagination_list_footer

function pagination_list_footer($list)
{
    static $instancetest = 0;

    // Initialise variables.
    $lang = JFactory::getLanguage();
    $html = "<div class=\"list-footer\">\n";

    //$html .= "\n<div class=\"limit\">".JText::_('JGLOBAL_DISPLAY_NUM').$list['limitfield']."</div>";

    $html .= $list['pageslinks'];
    $html .= "<span>".Jtext::_('TPL_MINIMA_TOTAL')." ".$list['total']." ".Jtext::_('TPL_MINIMA_ITEMS')."</span>";

    //$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";

    //$html .= "\n<input id=\"limit\" type=\"hidden\" name=\"limit\" value=\"15\" />";

    if ($instancetest == 0) {
        $html .= "\n<input type=\"hidden\" name=\"" . $list['prefix'] . "limitstart\" value=\"".$list['limitstart']."\" />";
    }

    $instancetest = 1;

    $html .= "\n</div>";

    return $html;
}
开发者ID:ronildo,项目名称:minima,代码行数:27,代码来源:pagination.php

示例4: delete

 /**
  * Method to delete rows.
  *
  * @param   array  &$pks  An array of item ids.
  *
  * @return  boolean  Returns true on success, false on failure.
  */
 public function delete(&$pks)
 {
     $pks = (array) $pks;
     $user = JFactory::getUser();
     $table = $this->getTable();
     // Iterate the items to delete each one.
     foreach ($pks as $pk) {
         if ($table->load($pk)) {
             // Access checks.
             if (!$user->authorise('core.delete', 'com_templates')) {
                 throw new Exception(JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
             }
             // You should not delete a default style
             if ($table->home != '0') {
                 JError::raiseWarning(SOME_ERROR_NUMBER, Jtext::_('COM_TEMPLATES_STYLE_CANNOT_DELETE_DEFAULT_STYLE'));
                 return false;
             }
             if (!$table->delete($pk)) {
                 $this->setError($table->getError());
                 return false;
             }
         } else {
             $this->setError($table->getError());
             return false;
         }
     }
     // Clean cache
     $this->cleanCache();
     return true;
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:37,代码来源:style.php

示例5: check

 function check()
 {
     if (empty($this->submit_key)) {
         $this->setError(Jtext::_('COM_REDFORM_PAYMENT_TABLE_SUBMIT_KEY_IS_REQUIRED'));
         return false;
     }
     return true;
 }
开发者ID:jaanusnurmoja,项目名称:redjoomla,代码行数:8,代码来源:payments.php

示例6: renderSubmenu

 public function renderSubmenu($vName = null)
 {
     if (is_null($vName)) {
         $vName = $this->input->getCmd('view', 'cpanel');
     }
     $this->input->set('view', $vName);
     parent::renderSubmenu();
     $toolbar = FOFToolbar::getAnInstance($this->input->getCmd('option', 'com_db8locate'), $this->config);
     $toolbar->appendLink(Jtext::_('COM_DB8LOCATE_SUBMENU_CATEGORIES'), 'index.php?option=com_categories&extension=com_db8locate', $vName == 'categories');
 }
开发者ID:dark452,项目名称:db8locate,代码行数:10,代码来源:toolbar.php

示例7: postMessage

 public static function postMessage($params, $data)
 {
     $attachment = array('comment' => $data['message'], 'content' => array('title' => $data['name'], 'description' => $data['description'], 'submittedUrl' => $data['link'], 'submitted-image-url' => $data['picture']), 'visibility' => array('code' => 'anyone'));
     $body = $attachment;
     $newArray = array('title' => $body['comment'], 'summary' => '', 'content' => $body['content']);
     $body = $newArray;
     $message = array();
     $groupid = $params->params->get('groupid');
     $access_token = $params->params->get('access_token');
     $log = '';
     $publish = 1;
     $checked = 0;
     foreach ($groupid as $key => $linkedID) {
         $id = $linkedID->id;
         if (isset($linkedID->checked)) {
             $checked = 1;
             $config = array('oauth2_access_token' => $access_token, 'format' => 'json');
             $urlInfo = parse_url('http://api.linkedin.com/v1/groups/' . $id . '/posts?');
             if (isset($urlInfo['query'])) {
                 $query = parse_str($urlInfo['query']);
                 $config = array_merge($config, $query);
             }
             $url = 'https://api.linkedin.com' . $urlInfo['path'] . '?' . http_build_query($config);
             if (!is_string($body)) {
                 $body = json_encode($body);
             }
             $ch = curl_init();
             curl_setopt($ch, CURLOPT_URL, $url);
             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
             curl_setopt($ch, CURLOPT_POST, true);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
             curl_setopt($ch, CURLOPT_HEADER, 0);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
             $go = curl_exec($ch);
             $page = json_decode($go);
             if (isset($page->message)) {
                 $log .= Jtext::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE') . ' <a href="http://www.linkedin.com/groups/Fan-torres-5162538?home=&gid=' . $id . '" target="_blank" style="text-decoration: underline;">' . $linkedID->name . '</a>  - ' . $page->message . ' <br/>';
                 $publish = 0;
             } else {
                 $log .= Jtext::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE') . ' <a href="http://www.linkedin.com/groups/Fan-torres-5162538?home=&gid=' . $id . '" style="text-decoration: underline;" target="_blank">' . $linkedID->name . '</a> - ' . JTEXT::_('PUBLISHED_LINKEDIN_GROUPS_SENDMESSAGE_SUCCESSFULL') . '<br/>';
                 $publish = 1;
             }
             curl_close($ch);
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'linkedin';
     return $message;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:53,代码来源:linkedingroup.php

示例8: duplicate

 /**
  * Method to clone existing Ingredients
  *
  * @return void
  */
 public function duplicate()
 {
     // Check for request forgeries
     Jsession::checkToken() or jexit(JText::_("JINVALID_TOKEN"));
     // Get id(s)
     $pks = $this->input->post->get("cid", array(), "array");
     try {
         if (empty($pks)) {
             throw new Exception(JText::_("COM_AKRECIPES_NO_ELEMENT_SELECTED"));
         }
         ArrayHelper::toInteger($pks);
         $model = $this->getModel();
         $model->duplicate($pks);
         $this->setMessage(Jtext::_("COM_AKRECIPES_ITEMS_SUCCESS_DUPLICATED"));
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), "warning");
     }
     $this->setRedirect("index.php?option=com_akrecipes&view=ingredients");
 }
开发者ID:rutvikd,项目名称:ak-recipes,代码行数:24,代码来源:ingredients.php

示例9: threads

 public function threads($thread, $createNew = true)
 {
     $html = $this->_template->getHelper('html');
     $options = array();
     $entities = $this->getService('repos://site/forums.thread')->getQuery()->where('parent_id', '=', $thread->parent->id)->order('last_comment_on', 'DESC')->limit('20')->fetchSet();
     $parameters = array();
     if ($createNew) {
         $options[] = JText::_('COM-FORUMS-POST-CREATE-NEW-THREAD');
         $parameters['selected'] = $thread->id;
     } else {
         $options[] = JText::_('COM-FORUMS-THREAD-SELECT-THREAD');
     }
     $options[-1] = Jtext::_('COM-FORUMS-POST-SPECIFY-THREAD');
     foreach ($entities as $entity) {
         $options[$entity->id] = $entity->title;
     }
     $parameters['options'] = $options;
     return $html->select('tid', $parameters)->class('input-xlarge');
 }
开发者ID:NicholasJohn16,项目名称:forums,代码行数:19,代码来源:helper.php

示例10: addMenuSelection

    protected function addMenuSelection()
    {
        require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
        $canDo = MaximenuckHelper::getActions($this->state->get('filter.parent_id'));
        $menushtml = '';
        // Add a batch button
        if ($canDo->get('core.edit')) {
            $menushtml .= '<div id="toolbar-menu" class="btn-wrapper">';
            foreach ($this->get('Menus') as $menu) {
                $active = $menu->menutype == JFactory::getApplication()->input->get('menutype') ? ' active' : '';
                $menushtml .= '<a href="index.php?option=com_maximenuck&view=migration&menutype=' . $menu->menutype . '"><button class="btn btn-small btn-primary' . $active . '">
						<i class="icon-list-view"></i>
						' . $menu->title . '</button></a>';
            }
        } else {
            $menushtml = Jtext::_('COM_MENUMANAGERCK_NOT_HAVE_RIGHT_TO_EDIT');
        }
        return $menushtml;
    }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:19,代码来源:view.html.php

示例11: duplicate

 /**
  * Method to clone existing Categories
  *
  * @return void
  */
 public function duplicate()
 {
     // Check for request forgeries
     Jsession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     // Get id(s)
     $pks = $this->input->post->get('cid', array(), 'array');
     try {
         if (empty($pks)) {
             throw new Exception(JText::_('COM_VOCAB_NO_ELEMENT_SELECTED'));
         }
         ArrayHelper::toInteger($pks);
         $model = $this->getModel();
         $model->duplicate($pks);
         $this->setMessage(Jtext::_('COM_VOCAB_ITEMS_SUCCESS_DUPLICATED'));
     } catch (Exception $e) {
         JFactory::getApplication()->enqueueMessage($e->getMessage(), 'warning');
     }
     $this->setRedirect('index.php?option=com_vocab&view=categories');
 }
开发者ID:brianteeman,项目名称:cam,代码行数:24,代码来源:categories.php

示例12: 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

示例13: getInput

 protected function getInput()
 {
     if ($this->value != '') {
         $avatar = '<img src="' . JURI::root() . 'images/bt_socialconnect/avatar/' . $this->value . '"/>';
         $html = '<div class=\'imageupload\'>';
         $html .= '<span class="editlinktip hasTip" title="' . htmlspecialchars($avatar) . '">';
         $html .= '<img src=' . JURI::root() . 'images/bt_socialconnect/avatar/' . $this->value . '   style="height:30px"  />';
         $html .= '</span>';
         $html .= '<input type="file" name="upload_image"  class="inputbox" size="22"/>';
         $html .= '</div>';
         $html .= '<div class="clr"></div>';
         $html .= '<label></label>';
         $html .= '<input type="checkbox" class="textbook" name="jform[default_values]" value="">' . Jtext::_('COM_BT_SOCIALCONNECT_DELETE_IMAGE');
         $html .= '<div class="clr"></div>';
     } else {
         $html = '<div class=\'inputupload\'>';
         $html .= '<input type="file" name="upload_image" style="width:230px"  class="inputbox" size="30"/>';
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:21,代码来源:uploadimage.php

示例14: PaymentResponseReceived

 /**
  * ResponseReceived()
  * From the payment page, the user returns to the shop. The order email is sent, and the cart emptied.
  *
  * @author Valerie Isaksen
  *
  */
 function PaymentResponseReceived()
 {
     if (!class_exists('vmPSPlugin')) {
         require JPATH_VM_PLUGINS . DS . 'vmpsplugin.php';
     }
     JPluginHelper::importPlugin('vmpayment');
     $return_context = "";
     $dispatcher = JDispatcher::getInstance();
     $html = "";
     $paymentResponse = Jtext::_('COM_VIRTUEMART_CART_THANKYOU');
     $returnValues = $dispatcher->trigger('plgVmOnPaymentResponseReceived', array('html' => &$html, &$paymentResponse));
     // 	JRequest::setVar('paymentResponse', Jtext::_('COM_VIRTUEMART_CART_THANKYOU'));
     // 	JRequest::setVar('paymentResponseHtml', $html);
     $view = $this->getView('pluginresponse', 'html');
     $layoutName = JRequest::getVar('layout', 'default');
     $view->setLayout($layoutName);
     $view->assignRef('paymentResponse', $paymentResponse);
     $view->assignRef('paymentResponseHtml', $html);
     // Display it all
     $view->display();
 }
开发者ID:joselapria,项目名称:virtuemart,代码行数:28,代码来源:pluginresponse.php

示例15: postMessage

 public static function postMessage($params, $data)
 {
     $attachment = array('access_token' => $data['access_token'], 'message' => $data['message'], 'name' => $data['name'], 'link' => $data['link'], 'description' => $data['description'], 'picture' => $data['picture']);
     $message = array();
     $fbpages = $params->params->get('groupid');
     $log = '';
     $publish = 1;
     $checked = 0;
     foreach ($fbpages as $key => $pages) {
         $id = $pages->id;
         //Replace accesstoken to fanpage
         $attachment['access_token'] = $pages->access_token;
         if (isset($pages->checked)) {
             $checked = 1;
             $url = "https://graph.facebook.com/{$id}/feed";
             $ch = curl_init();
             curl_setopt($ch, CURLOPT_URL, $url);
             curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
             curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
             curl_setopt($ch, CURLOPT_POST, true);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
             curl_setopt($ch, CURLOPT_HEADER, 0);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
             $go = curl_exec($ch);
             $page = json_decode($go);
             if (isset($page->error)) {
                 $log .= Jtext::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE') . ' <a href="https://www.facebook.com/' . $id . '" target="_blank" style="text-decoration: underline;">' . $pages->name . '</a>  - ' . $page->error->message . ' <br/>';
                 $publish = 0;
             } else {
                 $log .= Jtext::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE') . ' <a href="https://www.facebook.com/' . $id . '" target="_blank" style="text-decoration: underline;">' . $pages->name . '</a>  - ' . JTEXT::_('PUBLISHED_FACEBOOK_PAGES_SENDMESSAGE_SUCCESSFULL') . '<br/>';
             }
             curl_close($ch);
         }
     }
     $message['log'] = $log;
     $message['publish'] = $publish;
     $message['checked'] = $checked;
     $message['type'] = 'facebook';
     return $message;
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:40,代码来源:facebookpage.php


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