<?php
/**
* @package Joomla.Site
* @subpackage Templates.beez5
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$templateparams =$app->getTemplate(true)->params;
if (!$templateparams->get('html5', 0))
{
require JPATH_BASE.'/components/com_content/views/category/tmpl/default.php';
//evtl. ersetzen durch JPATH_COMPONENT.'/views/...'
} else {
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$pageClass = $this->params->get('pageclass_sfx');
?>
<section class="category-list<?php echo $this->pageclass_sfx;?>">
<?php if ($this->params->get('show_page_heading', 1)) : ?>
<?php if ($this->params->get('show_page_heading', 1) and ($this->params->get('show_category_title') or $this->params->get('page_subheading'))) : ?>
<hgroup>
<?php endif; ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->params->get('show_category_title') or $this->params->get('page_subheading')) : ?>
<h2>
<?php echo $this->escape($this->params->get('page_subheading')); ?>
<?php if ($this->params->get('show_category_title'))
{
echo '<span class="subheading-category">'.$this->category->title.'</span>';
}
?>
</h2>
<?php if ($this->params->get('show_page_heading', 1) and ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading'))) : ?>
</hgroup>
<?php endif; ?>
<?php endif; ?>
<?php
/**
* @package Joomla.Site
* @subpackage Templates.beez5
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
<?php // Code to add a link to submit an article. ?>
<?php if ($this->category->getParams()->get('access-create')) : ?>
<?php echo JHtml::_('icon.create', $this->category, $this->category->params); ?>
<?php endif; ?>
<?php
$js = "if(!window.jQuery)
document.write(unescape('<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js\">%3C/script%3E'));";
JFactory::getDocument()->addScriptDeclaration($js);
?>
<?php
$menu = & JSite::getMenu();
/**
* @package Joomla.Site
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/* The following line loads the MooTools JavaScript Library */
JHtml::_('behavior.framework', true);
/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
?>
<?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->_charset ?>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
<head>
<?php
/**
* @package Joomla.Site
* @subpackage Templates.beez5
* @copyright Copyright (C) 2005 - 2009 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// no direct access
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$templateparams =$app->getTemplate(true)->params;
if ($templateparams->get('html5')!=1)
{
require JPATH_BASE.'/components/com_content/views/category/tmpl/blog.php';
//evtl. ersetzen durch JPATH_COMPONENT.'/views/...'
} else {
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
$cparams = JComponentHelper::getParams('com_media');
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
?>
<section class="blog<?php echo $this->pageclass_sfx;?>">
<?php if ($this->params->get('show_page_heading')!=0 or $this->params->get('show_category_title')): ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
<?php if ($this->params->get('show_category_title'))
{
Fatal error: Cannot redeclare maxsite_str_word() (previously declared in /home/stplast/web-studio.biz.ua/upgrade/jupgrade/templates/apogey25/html/com_content/category/blog_item.php:24) in /home/stplast/web-studio.biz.ua/upgrade/jupgrade/templates/apogey25/html/com_content/category/blog_item.php on line 29
---------- Добавлено 18.03.2013 в 16:37 ----------
sdaprel: вы сначала выборку ссылок на картинки делайте, потом чистите intro от тегов, и уже только после этого обрезайте лишний текст. Формат текста и картинок осуществляется стилями.
К слову обрезка строки с помощью substr не позволяет осуществить контроль за целостностью слов.
Более того он не всегда корректно работает с utf8, если в строке будут как латиница так и кириллица, то в конце обрезанной строки появятся крокозябры.
А подробнее не скажите как именно...
Как правельно код построить в blog_item.php
---------- Добавлено 18.03.2013 в 15:27 ----------
Вот щас как я сделал но теперь кракозябры появляются upgrade.web-studio.biz.ua/jupgrade/novosti/
---------- Добавлено 18.03.2013 в 15:29 ----------
Так касперыч блокирует...как открыть? Или отключить его?
Обычно каспреский говорит на какой файл он ругается.
В том то и дело не говорит на что то конкректное...
Вот
/administrator/index.php Запрещено: HEUR:Trojan.Script.Generic 12.05.2013 16:05:36
imgad?id=CICAgIDQtfD6mQEQ2AUYWjIIsQ_cBMCu5OA Упаковано: Swf2Swc 12.05.2013 15:41:54
Что то откуда то подгружается
Гдето скрытый фрейм но где не пойму

---------- Post added 12-05-2013 at 16:12 ----------
---------- Post added 12-05-2013 at 16:14 ----------
ai-bolit.php сканировать не получается сервер падает
Спасибо большое,очень выручили...
defaul.php
default_article.php
index.php шаблона
/html/com_content/category/
blog.php
blog_item.php
<?php defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
?>
<div class="article-item">
<h2> <a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>">
<?php echo $this->escape($this->item->title); ?></a>
</h2>
<?
$date= explode(" ",$this->item->created);
$date= explode("-",$date[0]);
$date= $date[2].".".$date[1].".".$date[0];
echo $date; ?>
<div class="img_box">
<?php echo substr($this->item->introtext, 0, 580).'...';?>
<?php // to do not that elegant would be nice to group the params ?>
</div>
<div class="item-separator"></div>
Что так и не подскажите, как правельно сделать?
нет у тебя функция maxsite_str_word объявлена два раза в 24 и 29 строка.
одну нужно убрать.
Я же скопировал тот код что вы дали
Да только при вставке его выводится ошибка
Fatal error: Cannot redeclare maxsite_str_word() (previously declared in /home/stplast/web-studio.biz.ua/upgrade/jupgrade/templates/apogey25/html/com_content/category/blog_item.php:24) in /home/stplast/web-studio.biz.ua/upgrade/jupgrade/templates/apogey25/html/com_content/category/blog_item.php on line 29
29 строка---------- Добавлено 18.03.2013 в 16:37 ----------
Ругается на
вы сначала выборку ссылок на картинки делайте, потом чистите intro от тегов, и уже только после этого обрезайте лишний текст. Формат текста и картинок осуществляется стилями.
К слову обрезка строки с помощью substr не позволяет осуществить контроль за целостностью слов.
Более того он не всегда корректно работает с utf8, если в строке будут как латиница так и кириллица, то в конце обрезанной строки появятся крокозябры.
А подробнее не скажите как именно...
Как правельно код построить в blog_item.php
---------- Добавлено 18.03.2013 в 15:27 ----------
Вот щас как я сделал но теперь кракозябры появляются upgrade.web-studio.biz.ua/jupgrade/novosti/
---------- Добавлено 18.03.2013 в 15:29 ----------
А если вставляю в item_blog.php этот код
function maxsite_str_word($text, $counttext = 10, $sep = ' ') {, то не че не выводится$words = split($sep, $text);
if ( count($words) > $counttext )
$text = join($sep, array_slice($words, 0, $counttext));
return $text;
}
Подскажите плиз как же правельно всетаки сделать...
Ну с помощью css тоже не ахти получается...кривовато