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


PHP ellipsize函数代码示例

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


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

示例1: getFirstName

function getFirstName()
{
    if (Yii::app()->user->isGuest) {
        return '';
    } else {
        return ellipsize(ucwords(getUserProfile(Yii::app()->user->id)->getAttribute('first_name')), 15) . (Yii::app()->user->isAdmin() ? '*' : '');
    }
}
开发者ID:mafiu,项目名称:listapp,代码行数:8,代码来源:helpers.php

示例2: test_ellipsize

 public function test_ellipsize()
 {
     $strs = array('0' => array('this is my string' => '… my string', "here's another one" => '…nother one', 'this one is just a bit longer' => '…bit longer', 'short' => 'short'), '.5' => array('this is my string' => 'this …tring', "here's another one" => "here'…r one", 'this one is just a bit longer' => 'this …onger', 'short' => 'short'), '1' => array('this is my string' => 'this is my…', "here's another one" => "here's ano…", 'this one is just a bit longer' => 'this one i…', 'short' => 'short'));
     foreach ($strs as $pos => $s) {
         foreach ($s as $str => $expect) {
             $this->assertEquals($expect, ellipsize($str, 10, $pos));
         }
     }
 }
开发者ID:rishikeshwalawalkar,项目名称:GetARide,代码行数:9,代码来源:text_helper_test.php

示例3: ellipsis

 public function ellipsis($data)
 {
     // Recieve inherited data passed to plugin from parent plugin
     $CI =& get_instance();
     $CI->load->library('parser');
     $CI->load->helper('text');
     $content = $this->content();
     $parsed_content = $CI->parser->parse_string($content, $data, TRUE);
     return ellipsize($parsed_content, $this->attribute('length'));
 }
开发者ID:mamtasingh87,项目名称:bytecode,代码行数:10,代码来源:helper.php

示例4: plot

    public function plot($emptyerror = "") {
        if ($this->isEmpty()) {
            return $emptyerror;
        } else {

            load_js('flot');

            $dataset = '[';
            foreach ($this->data as $name => $value) {
                $name = ellipsize($name, 17);
                $dataset .= '["' . $name . '", ' . $value . "], ";
            }
            if (strlen($dataset) > 1) {
                $dataset = substr($dataset, 0, -2);
            }
            $dataset .=']';

            return '
                
<div class="flot-container" style="max-width: ' . $this->width . 'px; height: ' . $this->height . 'px;">
<p class="flot-title">' . $this->title . '</p>
<div class="flot-placeholder" style="width:100%" id="placeholder' . $this->instanceID . '"></div>
</div>

<script type="text/javascript">

    function doPlot' . $this->instanceID . '(data) {
        $.plot("#placeholder' . $this->instanceID . '", [ data ], {
            series: {
                bars: {
                    show: true,
                    barWidth: 0.8,
                    align: "center"
                }
            } ,
            xaxis: {
                mode: "categories",
                labelAngle: -45,
                tickLength: 0
            }
        });
    }
    
    $(function() {
        var data = ' . $dataset . ';
        doPlot' . $this->instanceID . '(data);
        window.onresize = function(event) {
            doPlot' . $this->instanceID . '(data);
        }
    });
</script>';
        }
    }
开发者ID:nikosv,项目名称:openeclass,代码行数:53,代码来源:plotter.php

示例5: edit

 public function edit($content_id)
 {
     $content = $this->content_model->get($content_id);
     if ($content === FALSE) {
         $this->postal->add('There is no content to edit.', 'error');
         redirect('admin/contents/index', 'refresh');
     }
     $this->data['content'] = $content;
     $this->data['parents'] = $this->content_model->get_parents_list($content->content_type, $content->id);
     $this->data['slugs'] = $this->slug_model->where(array('content_type' => $content->content_type, 'content_id' => $content->id))->get_all();
     $rules = $this->content_model->rules;
     $this->form_validation->set_rules($rules['update']);
     if ($this->form_validation->run() === FALSE) {
         $this->render('admin/contents/edit_view');
     } else {
         $content_id = $this->input->post('content_id');
         $content = $this->content_model->get($content_id);
         if ($content !== FALSE) {
             $parent_id = $this->input->post('parent_id');
             $title = $this->input->post('title');
             $short_title = $this->input->post('short_title');
             $slug = url_title(convert_accented_characters($this->input->post('slug')), '-', TRUE);
             $order = $this->input->post('order');
             $text = $this->input->post('content');
             $teaser = strlen($this->input->post('teaser')) > 0 ? $this->input->post('teaser') : substr($text, 0, strpos($text, '<!--more-->'));
             $page_title = strlen($this->input->post('page_title')) > 0 ? $this->input->post('page_title') : $title;
             $page_description = strlen($this->input->post('page_description')) > 0 ? $this->input->post('page_description') : ellipsize($teaser, 160);
             $page_keywords = $this->input->post('page_keywords');
             $published_at = $this->input->post('published_at');
             $update_data = array('title' => $title, 'short_title' => $short_title, 'teaser' => $teaser, 'content' => $text, 'page_title' => $page_title, 'page_description' => $page_description, 'page_keywords' => $page_keywords, 'parent_id' => $parent_id, 'published_at' => $published_at, 'order' => $order);
             if ($this->content_model->update($update_data, $content_id)) {
                 if (strlen($slug) > 0) {
                     $url = $this->_verify_slug($slug);
                     $new_slug = array('content_type' => $content->content_type, 'content_id' => $content->id, 'url' => $url);
                     if ($slug_id = $this->slug_model->insert($new_slug)) {
                         $this->slug_model->where(array('content_type' => $content->content_type, 'id !=' => $slug_id))->update(array('redirect' => $slug_id, 'updated_by' => $this->user_id));
                     }
                 }
                 $this->rat->log('The user edited the content type "' . $content->content_type . '" with the ID: ' . $content->id . ' having "' . $content->title . '" as title.');
                 $this->postal->add('The content was updated successfully.', 'success');
             }
         } else {
             $this->postal->add('There is no content to update.', 'error');
         }
         redirect('admin/contents/index/' . $content->content_type, 'refresh');
     }
 }
开发者ID:NaszvadiG,项目名称:CodeIgniter-single-language-site,代码行数:47,代码来源:Contents.php

示例6: getSidebarMessages

function getSidebarMessages() {
    global $uid, $urlServer, $langFrom, $dateFormatLong, $langDropboxNoMessage, $langMailSubject, $langCourse;

    $message_content = '';

    $mbox = new Mailbox($uid, 0);
    $msgs = $mbox->getInboxMsgs('');

    $msgs = array_filter($msgs, function ($msg) { return !$msg->is_read; });
    if (!count($msgs)) {
        $message_content .= "<li class='list-item no-messages'>" .
                            "<span class='item-wholeline'>" .
                                $langDropboxNoMessage .
                            "</span>" .
                         "</li>";
    } else {
        foreach ($msgs as $message) {
            if ($message->course_id > 0) {
                $course_title = q(ellipsize(course_id_to_title($message->course_id), 30));
            } else {
                $course_title = '';
            }

            $message_date = claro_format_locale_date($dateFormatLong, $message->timestamp);
            $message_content .= "<li class='list-item'>
                            <span class='item-wholeline'>
                                <div class='text-title'>$langFrom: " .
                                    display_user($message->author_id, false, false) . "<br>
                                    $langMailSubject: <a href='{$urlServer}modules/dropbox/index.php?mid=$message->id'>" .
                                        q($message->subject) . "</a>
                                </div>";
                                    if ($course_title) {
                                       $message_content .= "<div class='text-grey'>$langCourse: $course_title</div>"; 
                                    }
                                $message_content .= "<div>$message_date</div>
                                </span>
                            </li>";
        }
    }
    return $message_content;
}
开发者ID:nikosv,项目名称:openeclass,代码行数:41,代码来源:ajax_sidebar.php

示例7: calendar

 function calendar($y = FALSE, $m = FALSE)
 {
     if (!$this->connected) {
         $this->layout = "layouts/public";
     }
     $this->load->library('calendar');
     $e = new Event();
     $y = $y ? $y : date('Y');
     $m = $m ? $m : date('m');
     $events = $e->select('DAY(start) AS day,events.id,title,description,cost')->where('MONTH(start)', $m)->where('YEAR(start)', $y)->include_related('category', array('color'))->get_iterated();
     $this->load->helper('text');
     $ul = array();
     foreach ($events as $e) {
         $ul[$e->day][] = '<span class="label" style="background:' . $e->category_color . ';">' . anchor('events/show/' . $e->id, ellipsize($e->title, 20, 1, '..'), 'id="' . $e->id . '" class="tip" data-toggle="modal" data-original-title="' . $e->title . '"') . '</span>';
     }
     $data = array();
     foreach ($ul as $day => $event) {
         $data[$day] = ul($event, array('class' => 'unstyled sortable'));
     }
     $this->data['calendar'] = $this->calendar->generate($y, $m, $data);
     $c = new Category();
     $this->data['categories'] = $c->get_iterated();
 }
开发者ID:ricardocasares,项目名称:Eventor,代码行数:23,代码来源:events.php

示例8: wiki_action_details

 /**
  * display action details in wiki
  * @global type $langTitle
  * @global type $langDescription
  * @param type $details
  * @return string
  */
 private function wiki_action_details($details)
 {
     global $langTitle, $langDescription;
     $details = unserialize($details);
     $content = "{$langTitle} &laquo" . q($details['title']) . "&raquo";
     if (!empty($details['description'])) {
         $content .= "&nbsp;&mdash;&nbsp; {$langDescription} &laquo" . q(ellipsize($details['description'], 100)) . "&raquo";
     }
     return $content;
 }
开发者ID:kostastzo,项目名称:openeclass,代码行数:17,代码来源:log.php

示例9: CONVERT

                        <div class='col-sm-10'>
                            $sections_table
                        </div>                
                    </div>                
                </div>
            </div>";

        $q = Database::get()->queryArray("SELECT id, public_id, title FROM ebook_section
                           WHERE ebook_id = ?d
                           ORDER BY CONVERT(public_id, UNSIGNED), public_id", $info->id);
        $sections = array('' => '---');
        foreach ($q as $section) {
            $sid = $section->id;
            $qsid = q($section->public_id);
            $qstitle = q($section->title);
            $sections[$sid] = $qsid . '. ' . ellipsize($section->title, 25);
        }
        $pageName = $langEBookPages;
        $tool_content .= action_bar(array(
                            array('title' => $langNewEBookPage,
                              'url' => "new.php?course=$course_code&ebook_id=$ebook_id&amp;from=ebookEdit",
                              'icon' => 'fa-plus-circle',
                              'button-class' => 'btn-success',
                              'level' => 'primary-label'),            
                            array('title' => $langFileAdmin,
                                  'url' => "document.php?course=$course_code&amp;ebook_id=$ebook_id",
                                  'icon' => 'fa-hdd-o',                          
                                  'level' => 'primary-label')            
                        ));      
        // Form #3 - edit subsection file assignment
        $q = Database::get()->queryArray("SELECT ebook_section.id AS sid,
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:edit.php

示例10: _format_get

 function _format_get(&$data)
 {
     // Add some date formats.
     if (isset($data[$this->table . 'UpdatedAt'])) {
         $data['DateFormat1'] = date('n/j/Y', strtotime($data[$this->table . 'UpdatedAt']));
     }
     // Make a smaller file name.
     $this->load->helper('text');
     if (isset($data['CMS_MediaFile'])) {
         $data['FileEllipse'] = ellipsize($data['CMS_MediaFile'], 32, 0.5);
     }
     switch ($data['CMS_MediaStore']) {
         case 'rackspace-cloud-files':
             $data['url'] = $this->data['cms']['cp_media_rackspace_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['sslurl'] = $this->data['cms']['cp_media_rackspace_ssl_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['thumburl'] = '';
             $data['thumbsslurl'] = '';
             // If image build a thumbnail
             if ($data['CMS_MediaIsImage']) {
                 $data['thumburl'] = $this->data['cms']['cp_media_rackspace_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
                 $data['thumbsslurl'] = $this->data['cms']['cp_media_rackspace_ssl_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
             } else {
                 if ($data['CMS_MediaType'] == 'video') {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/v-ico.png';
                 } else {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/doc-ico.png';
                 }
             }
             break;
         case 'amazon-web-services-s3':
             $data['url'] = $this->data['cms']['cp_media_amazon_s3_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['sslurl'] = $this->data['cms']['cp_media_amazon_s3_ssl_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['thumburl'] = '';
             $data['thumbsslurl'] = '';
             // If image build a thumbnail
             if ($data['CMS_MediaIsImage']) {
                 $data['thumburl'] = $this->data['cms']['cp_media_amazon_s3_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
                 $data['thumbsslurl'] = $this->data['cms']['cp_media_amazon_s3_ssl_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
             } else {
                 if ($data['CMS_MediaType'] == 'video') {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/v-ico.png';
                 } else {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/doc-ico.png';
                 }
             }
             break;
         case 'local-files':
             $data['url'] = $this->data['cms']['cp_media_local_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['sslurl'] = $this->data['cms']['cp_media_local_ssl_url'] . $data['CMS_MediaPath'] . $data['CMS_MediaFile'];
             $data['thumburl'] = '';
             $data['thumbsslurl'] = '';
             // If image build a thumbnail
             if ($data['CMS_MediaIsImage']) {
                 $data['thumburl'] = $this->data['cms']['cp_media_local_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
                 $data['thumbsslurl'] = $this->data['cms']['cp_media_local_ssl_url'] . $data['CMS_MediaPathThumb'] . $data['CMS_MediaFileThumb'];
             } else {
                 if ($data['CMS_MediaType'] == 'video') {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/v-ico.png';
                 } else {
                     $data['thumburl'] = $data['thumbsslurl'] = $this->data['cms']['assets_base'] . '/img/doc-ico.png';
                 }
             }
             break;
     }
     return $data;
 }
开发者ID:cloudmanic,项目名称:cloudmanic-cms,代码行数:66,代码来源:cms_media_model.php

示例11: browse


//.........这里部分代码省略.........
         // If token exist, test if token is set in params, add it to defaultSearch
         if ($sTokenSearch = Yii::app()->request->getQuery('token')) {
             $defaultSearch['token'] = $sTokenSearch;
         }
     }
     // All other columns are based on the questions.
     // An array to control unicity of $code (EM code)
     $aCodes = array();
     foreach ($fields as $fielddetails) {
         if (in_array($fielddetails['fieldname'], $aSpecificColumns)) {
             continue;
         }
         // no headers for time data
         if ($fielddetails['type'] == 'interview_time') {
             continue;
         }
         if ($fielddetails['type'] == 'page_time') {
             continue;
         }
         if ($fielddetails['type'] == 'answer_time') {
             continue;
         }
         $question = $fielddetails['question'];
         if ($fielddetails['type'] == "|") {
             $fnames = array();
             $code = viewHelper::getFieldCode($fielddetails, array('LEMcompat' => true));
             // This must be unique ......
             if ($fielddetails['aid'] !== 'filecount') {
                 $qidattributes = getQuestionAttributeValues($fielddetails['qid']);
                 for ($i = 0; $i < $qidattributes['max_num_of_files']; $i++) {
                     if ($qidattributes['show_title'] == 1) {
                         $fnames[] = array($code . '_' . $i . '_title', "File " . ($i + 1) . " - " . $fielddetails['question'] . "(Title)", "type" => "|", "metadata" => "title", "index" => $i);
                     }
                     if ($qidattributes['show_comment'] == 1) {
                         $fnames[] = array($code . '_' . $i . '_comment', "File " . ($i + 1) . " - " . $fielddetails['question'] . "(Comment)", "type" => "|", "metadata" => "comment", "index" => $i);
                     }
                     $fnames[] = array($code . '_' . $i . '_name', "File " . ($i + 1) . " - " . $fielddetails['question'] . "(File name)", "type" => "|", "metadata" => "name", "index" => $i);
                     $fnames[] = array($code . '_' . $i . '_size', "File " . ($i + 1) . " - " . $fielddetails['question'] . "(File size)", "type" => "|", "metadata" => "size", "index" => $i);
                 }
             } else {
                 $fnames[] = array($code . '_count', "File count");
             }
             $bHidden = false;
             if (isset($_SESSION['survey_' . $iSurveyId]['HiddenFields'])) {
                 $bHidden = in_array($fielddetails['fieldname'], $_SESSION['survey_' . $iSurveyId]['HiddenFields']);
             }
             foreach ($fnames as $aFileInfoField) {
                 $column_model[] = array('name' => $aFileInfoField[0], 'index' => $aFileInfoField[0], 'sortable' => false, 'width' => '150', 'align' => 'left', 'editable' => false, 'search' => false, 'hidden' => $bHidden, 'title' => $aFileInfoField[1]);
             }
             continue;
         }
         // TODO: upload question type have more than one column (see before)
         // Construction of clean name and title
         $code = viewHelper::getFieldCode($fielddetails, array('LEMcompat' => true));
         // This must be unique ......
         //fix unicity of $code
         if (isset($aCodes[$code])) {
             $aCodes[$code]++;
             $code = "{$code}-{$aCodes[$code]}";
         } else {
             $aCodes[$code] = 0;
         }
         $text = viewHelper::getFieldText($fielddetails);
         $textabb = viewHelper::getFieldText($fielddetails, array('abbreviated' => 10));
         $bHidden = false;
         if (isset($_SESSION['survey_' . $iSurveyId]['HiddenFields'])) {
             $bHidden = in_array($fielddetails['fieldname'], $_SESSION['survey_' . $iSurveyId]['HiddenFields']);
         }
         $column_model[] = array('name' => $code, 'index' => $fielddetails['fieldname'], 'sorttype' => 'string', 'sortable' => true, 'width' => '200', 'align' => 'left', 'editable' => false, 'hidden' => (bool) $bHidden, 'title' => $text);
     }
     $column_model_txt = ls_json_encode($column_model);
     $column_names = array();
     foreach ($column_model as $column) {
         if (isset($column['title'])) {
             $column_names[] = "<strong class='qcode'>{$column['name']}</strong> <span class='separator hidden'>:</span> <span class='questiontext'>" . ellipsize($column['title'], 30, 0.6, "...") . "</span>";
         } elseif (isset($column['label'])) {
             $column_names[] = $column['label'];
         } else {
             $column_names[] = $column['name'];
         }
     }
     $aData['sortorder'] = Yii::app()->request->getQuery('order', 'asc');
     $aData['limit'] = Yii::app()->request->getQuery('limit', 25);
     $aData['page'] = intval(Yii::app()->request->getQuery('start', 0)) + 1;
     $aData['issuperadmin'] = Permission::model()->hasGlobalPermission('superadmin');
     $aData['surveyid'] = $iSurveyId;
     $aData['column_model_txt'] = $column_model_txt;
     $aData['column_names_txt'] = ls_json_encode($column_names);
     $aData['hasUpload'] = hasFileUploadQuestion($iSurveyId);
     $aData['jsonBaseUrl'] = App()->createUrl('/admin/responses', array('surveyid' => $iSurveyId, 'browselang' => $sBrowseLanguage));
     $aData['jsonUrl'] = App()->createUrl('/admin/responses', array('sa' => 'getResponses_json', 'surveyid' => $iSurveyId, 'browselang' => $sBrowseLanguage, 'statfilter' => App()->request->getQuery('statfilter', 0)));
     $aData['jsonActionUrl'] = App()->createUrl('/admin/responses', array('sa' => 'actionResponses', 'surveyid' => $iSurveyId, 'browselang' => $sBrowseLanguage));
     $aData['defaultSearch'] = json_encode($defaultSearch);
     $aViewUrls = array();
     if (App()->request->getQuery('statfilter')) {
         $aViewUrls[] = 'filterListResponses_view';
     }
     $aViewUrls[] = 'listResponses_view';
     $this->_renderWrappedTemplate('responses', $aViewUrls, $aData);
 }
开发者ID:BertHankes,项目名称:LimeSurvey,代码行数:101,代码来源:responses.php

示例12: getExtendedData

 public function getExtendedData($colName, $sLanguage, $base64jsonFieldMap)
 {
     $oFieldMap = json_decode(base64_decode($base64jsonFieldMap));
     $value = $this->{$colName};
     $sFullValue = strip_tags(getExtendedAnswer(self::$sid, $oFieldMap->fieldname, $value, $sLanguage));
     if (strlen($sFullValue) > 50) {
         $sElipsizedValue = ellipsize($sFullValue, $this->ellipsize_question_value);
         $sValue = '<span data-toggle="tooltip" data-placement="left" title="' . quoteText($sFullValue) . '">' . $sElipsizedValue . '</span>';
     } else {
         $sValue = $sFullValue;
     }
     // Upload question
     if ($oFieldMap->type == '|' && strpos($oFieldMap->fieldname, 'filecount') === false) {
         $sSurveyEntry = "<table class='table table-condensed upload-question'><tr>";
         $aQuestionAttributes = getQuestionAttributeValues($oFieldMap->qid);
         $aFilesInfo = json_decode_ls($this->{$colName});
         for ($iFileIndex = 0; $iFileIndex < $aQuestionAttributes['max_num_of_files']; $iFileIndex++) {
             $sSurveyEntry .= '<tr>';
             if (isset($aFilesInfo[$iFileIndex])) {
                 $sSurveyEntry .= '<td>' . CHtml::link(rawurldecode($aFilesInfo[$iFileIndex]['name']), App()->createUrl("/admin/responses", array("sa" => "actionDownloadfile", "surveyid" => self::$sid, "iResponseId" => $this->id, "sFileName" => $aFilesInfo[$iFileIndex]['name']))) . '</td>';
                 $sSurveyEntry .= '<td>' . sprintf('%s Mb', round($aFilesInfo[$iFileIndex]['size'] / 1000, 2)) . '</td>';
                 if ($aQuestionAttributes['show_title']) {
                     if (!isset($aFilesInfo[$iFileIndex]['title'])) {
                         $aFilesInfo[$iFileIndex]['title'] = '';
                     }
                     $sSurveyEntry .= '<td>' . htmlspecialchars($aFilesInfo[$iFileIndex]['title'], ENT_QUOTES, 'UTF-8') . '</td>';
                 }
                 if ($aQuestionAttributes['show_comment']) {
                     if (!isset($aFilesInfo[$iFileIndex]['comment'])) {
                         $aFilesInfo[$iFileIndex]['comment'] = '';
                     }
                     $sSurveyEntry .= '<td>' . htmlspecialchars($aFilesInfo[$iFileIndex]['comment'], ENT_QUOTES, 'UTF-8') . '</td>';
                 }
             }
             $sSurveyEntry .= '</tr>';
         }
         $sSurveyEntry .= '</table>';
         $sValue = $sSurveyEntry;
     }
     return $sValue;
 }
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:41,代码来源:SurveyDynamic.php

示例13: draw


//.........这里部分代码省略.........
    $t->set_var('TOOL_NAME', $toolName);
    if ($is_editor) {
        $t->set_var('ACTIVATE_MODULE', $mod_activation);
    }
    if (!$t->get_var('LANG_SELECT')) {
        if ($menuTypeID != 2) {
            $t->set_var('LANG_SELECT', lang_selections());
            $t->set_var('LANG_SELECT_TITLE', "title='{$langChooseLang}'");
        } else {
            $t->set_var('LANG_SELECT', '');
        }
    }
    // breadcrumb and page title
    if (!$is_embedonce and !$is_mobile and $current_module_dir != '/') {
        $t->set_block('mainBlock', 'breadCrumbLinkBlock', 'breadCrumbLink');
        $t->set_block('mainBlock', 'breadCrumbEntryBlock', 'breadCrumbEntry');
        // Breadcrumb first entry (home / portfolio)
        if ($session->status != USER_GUEST) {
            if (isset($_SESSION['uid'])) {
                $t->set_var('BREAD_TEXT', '<span class="fa fa-home"></span> ' . $langPortfolio);
                $t->set_var('BREAD_HREF', $urlAppend . 'main/portfolio.php');
            } else {
                $t->set_var('BREAD_TEXT', $langHomePage);
                $t->set_var('BREAD_HREF', $urlAppend);
            }
            if (isset($require_current_course) or $pageName) {
                $t->parse('breadCrumbEntry', 'breadCrumbLinkBlock', true);
            } else {
                $t->parse('breadCrumbEntry', 'breadCrumbEntryBlock', true);
            }
        }
        // Breadcrumb course home entry
        if (isset($course_code)) {
            $t->set_var('BREAD_TEXT', q(ellipsize($currentCourseName, 48)));
            if ($pageName) {
                $t->set_var('BREAD_HREF', $urlAppend . 'courses/' . $course_code . '/');
                $t->parse('breadCrumbEntry', 'breadCrumbLinkBlock', true);
            } else {
                $t->parse('breadCrumbEntry', 'breadCrumbEntryBlock', true);
            }
            $pageTitle .= " | " . ellipsize($currentCourseName, 32);
        }
        foreach ($navigation as $step) {
            $t->set_var('BREAD_TEXT', q($step['name']));
            if (isset($step['url'])) {
                $t->set_var('BREAD_HREF', $step['url']);
                $t->parse('breadCrumbEntry', 'breadCrumbLinkBlock', true);
            } else {
                $t->parse('breadCrumbEntry', 'breadCrumbEntryBlock', true);
            }
        }
        if ($pageName) {
            $t->set_var('BREAD_TEXT', q($pageName));
            $t->parse('breadCrumbEntry', 'breadCrumbEntryBlock', true);
        }
        if ($pageName) {
            $pageTitle .= " | " . $pageName;
        }
    } else {
        if (!$is_embedonce) {
            $t->set_block('mainBlock', 'breadCrumbs', 'delete');
        }
    }
    //END breadcrumb --------------------------------
    $t->set_var('PAGE_TITLE', q($pageTitle));
    if (isset($course_code)) {
开发者ID:nikosv,项目名称:openeclass,代码行数:67,代码来源:baseTheme.php

示例14: base_url

			<td width="40"><img src="<?php 
        echo base_url();
        ?>
/uploads/teams/<?php 
        echo $logo;
        ?>
" alt="<?php 
        echo $team->id;
        ?>
" width="45" height="45" /></td>
			<td><?php 
        echo $team->name;
        ?>
</td>
			<td><?php 
        echo ellipsize($team->description, 70);
        ?>
</td>
			<td class="action">
				<a class="action-icon" href="#">Action</a>
                <ul class="action-list" style="display: none;">
                    <li><a class="confirm-delete" href="<?php 
        echo site_url('admin/teams/delete/' . $team->id);
        ?>
"><i class="icon-trash icon-large"></i></a></li>
                    <li><a href="<?php 
        echo site_url('admin/teams/edit/' . $team->id);
        ?>
"><i class="icon-edit icon-large"></i></a></li>
                </ul>
			</td>
开发者ID:karlomikus,项目名称:CometCI,代码行数:31,代码来源:main.php

示例15: foreach

 <div class="table-responsive">
     <div role="grid" class="dataTables_wrapper form-inline" id="dataTables-example_wrapper">
         <table id="youaudit_package" class="table table-striped table-bordered table-hover" width="100%" cellspacing="0">
             <thead>
                 <tr>
                     <th>Package name</th>
                     <th>Number Of Asset</th>
                     <th>Enable Package</th>
                     <th>Actions</th>
                 </tr>
             </thead>
             <tbody id="Master_Customer_body">
                 <?php foreach ($packages as $package) {
                     ?>
                     <tr>
                         <td><?php echo ellipsize($package->name, 50); ?></td>
                         <td><?php echo $package->item_limit; ?></td>
                         <td><?php
                             if ($package->enable == 1) {
                                 echo 'Yes';
                             } else {
                                 echo 'No';
                             }
                             ?></td>
                         <td><span class="action-w"><a data-toggle="modal" id="edit_adminuser_id_<?php echo $package->id; ?>" href="#edit_package" title="Edit" data_packagename="<?php echo $package->name; ?>" data_itemlimit="<?php echo $package->item_limit; ?>" data_enable="<?php echo $package->enable; ?>" data_adminuser_id="<?php echo $package->id; ?>" class="edit"><i class="glyphicon glyphicon-edit franchises-i"></i></a>Edit</span></td>
                     </tr>
                 <?php } ?>
             </tbody>
         </table>
     </div>
     <!-- /.table-responsive -->
开发者ID:brijendratiwari,项目名称:youaudit,代码行数:31,代码来源:packagelist.php


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