當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BBCode::width方法代碼示例

本文整理匯總了PHP中BBCode::width方法的典型用法代碼示例。如果您正苦於以下問題:PHP BBCode::width方法的具體用法?PHP BBCode::width怎麽用?PHP BBCode::width使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BBCode的用法示例。


在下文中一共展示了BBCode::width方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: comment


//.........這裏部分代碼省略.........
             //$i = 0; $i < $wh; $i++
             $ssorthex = '';
             if (is_array($mmm)) {
                 foreach ($mmm as $num1 => $val) {
                     $ssorthex = $ssorthex . $val;
                 }
                 //$mmm as $num1 => $val
             }
             //is_array($mmm)
             if ($this->data['sorting'] != 'asc') {
                 $resa[$num]['sorthex'] = $ssorthex;
             } else {
                 $resa[$num]['sorthex'] = $kkk;
             }
             $resa[$num]['hsort'] = $kkk;
         }
         //$results as $num => $res1
         $results = NULL;
         $results = $resa;
         uasort($results, 'sdesc');
         $i = 0;
         foreach ($results as $num => $result) {
             if (!isset($result['date_available'])) {
                 $result['date_available'] = $result['date_added'];
             }
             if ($this->rdate($this->language->get('text_date')) == $this->rdate($this->language->get('text_date'), strtotime($result['date_available']))) {
                 $date_str = $this->language->get('text_today');
             } else {
                 $date_str = $this->language->get('text_date');
             }
             $date_added = $this->rdate($date_str . $this->language->get('text_hours'), strtotime($result['date_added']));
             $text = strip_tags($result['text']);
             if ($this->data['visual_editor']) {
                 if (isset($this->data['blog_design']['bbwidth']) && $this->data['blog_design']['bbwidth'] != '') {
                     BBCode::$width = $this->data['blog_design']['bbwidth'];
                 }
                 //isset($this->data['blog_design']['bbwidth']) && $this->data['blog_design']['bbwidth'] != ''
                 $text = BBCode::parse($text);
             }
             //$this->data['visual_editor']
             $this->data['comments'][] = array('comment_id' => $result['comment_id'], 'sorthex' => $result['sorthex'], 'customer_id' => $result['customer_id'], 'customer' => $customer_id, 'customer_delta' => $result['customer_delta'], 'level' => strlen($result['sorthex']) / 4 - 1, 'parent_id' => $result['parent_id'], 'author' => $result['author'], 'text' => $text, 'rating' => (int) $result['rating'], 'hsort' => $result['hsort'], 'myarray' => $mmm, 'delta' => $result['delta'], 'rate_count' => $result['rate_count'], 'rate_count_plus' => $result['rate_count_plus'], 'rate_count_minus' => $result['rate_count_minus'], 'settings_blog' => $this->data['blog_design'], 'comments' => sprintf($this->language->get('text_comments'), (int) $comment_total), 'date_added' => $date_added, 'date_available' => $result['date_available']);
             $i++;
         }
         //$results as $num => $result
     }
     //count($results) > 0
     if (!function_exists('compare')) {
         function compare($a, $b)
         {
             if ($a['comment_id'] > $b['comment_id']) {
                 return 1;
             }
             if ($b['comment_id'] > $a['comment_id']) {
                 return -1;
             }
             return 0;
         }
     }
     //!function_exists('compare')
     if (!function_exists('compared')) {
         function compared($a, $b)
         {
             if ($a['comment_id'] > $b['comment_id']) {
                 return -1;
             }
             if ($b['comment_id'] > $a['comment_id']) {
開發者ID:archweb,項目名稱:nprotein,代碼行數:67,代碼來源:record.php


注:本文中的BBCode::width方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。