当前位置: 首页>>代码示例>>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;未经允许,请勿转载。