В новой версии настроенное поле decscription отображается некорректно. Хотя слова оно обрезает вроде правильно, но косяк в том, что поле выводится само собой, т.е. не по-порядку, кроме того, название поля отсутствует, хотя соответствующая галочка для его скрытия не стоит. Может кто-то уже успел починить себе этот баг? Помогите пожалуйста мне. Код поля: Код (PHP): class mFieldType_coredesc extends mFieldType { var $name = 'link_desc'; function parseValue($value) { $params['maxChars'] = intval($this->getParam('maxChars',3000)); $params['stripAllTagsBeforeSave'] = $this->getParam('stripAllTagsBeforeSave',0); $params['allowedTags'] = $this->getParam('allowedTags','u,b,i,a,ul,li,pre,blockquote,strong,em'); if($params['stripAllTagsBeforeSave']) { $value = $this->stripTags($value,$params['allowedTags']); } if($params['maxChars'] > 0) { $value = JString::substr( $value, 0, $params['maxChars']); } return $value; } function getInputHTML() { global $mtconf; if( ($this->inBackEnd() AND $mtconf->get('use_wysiwyg_editor_in_admin')) || (!$this->inBackEnd() AND $mtconf->get('use_wysiwyg_editor')) ) { $editor = &JFactory::getEditor(); $html = $editor->display( $this->getInputFieldName(1), $this->getValue() , '100%', '250', '75', '25', array('pagebreak', 'readmore') ); } else { $html = '<textarea class="inputbox" name="' . $this->getInputFieldName(1) . '" style="width:95%;height:' . $this->getSize() . 'px">' . htmlspecialchars($this->getValue()) . '</textarea>'; } return $html; } function getSearchHTML() { return '<input class="inputbox" type="text" name="' . $this->getName() . '" size="30" />'; } function getOutput($view=1) { $params['parseUrl'] = $this->getParam('parseUrl',1); $params['summaryChars'] = $this->getParam('summaryChars',255); $params['stripSummaryTags'] = $this->getParam('stripSummaryTags',1); $params['stripDetailsTags'] = $this->getParam('stripDetailsTags',1); $params['parseMambots'] = $this->getParam('parseMambots',0); $params['allowedTags'] = $this->getParam('allowedTags','u,b,i,a,ul,li,pre,blockquote,strong,em'); $params['showReadMore'] = $this->getParam('showReadMore',0); $params['whenReadMore'] = $this->getParam('whenReadMore',0); $params['txtReadMore'] = $this->getParam('txtReadMore',JTEXT::_( 'Read More...' )); $html = $this->getValue(); $output = ''; // Details view if($view == 1) { global $mtconf; $output = $html; if($params['stripDetailsTags']) { $output = $this->stripTags($output,$params['allowedTags']); } if($params['parseUrl']) { $regex = '/http:\/\/(.*?)(\s|$)/i'; $output = preg_replace_callback( $regex, array($this,'linkcreator'), $output ); } if (!$mtconf->get('use_wysiwyg_editor') && $params['stripDetailsTags'] && !in_array('br',explode(',',$params['allowedTags'])) && !in_array('p',explode(',',$params['allowedTags'])) ) { $output = nl2br(trim($output)); } if($params['parseMambots']) { $this->parseMambots($output); } // Summary view } else { $html = preg_replace('@{[\/\!]*?[^<>]*?}@si', '', $html); if($params['stripSummaryTags']) { $html = strip_tags( $html ); } if($params['summaryChars'] > 0) { $trimmed_desc = trim(JString::substr($html,0,$params['summaryChars'])); } else { $trimmed_desc = ''; } if($params['stripSummaryTags']) { $html = htmlspecialchars( $html ); $trimmed_desc = htmlspecialchars( $trimmed_desc ); } if (JString::strlen($html) > $params['summaryChars']) { $output .= $trimmed_desc; $output .= ' <b>...</b>'; } else { $output = $html; } if( $params['showReadMore'] && ($params['whenReadMore'] == 1 || ($params['whenReadMore'] == 0 && JString::strlen($html) > $params['summaryChars'])) ) { if(!empty($trimmed_desc)) { $output .= '<br />'; } $output .= ' <a href="' . JRoute::_('index.php?option=com_mtree&task=viewlink&link_id=' . $this->getLinkId()) . '" class="readon">' . $params['txtReadMore'] . '</a>'; } } return $output; } }