В случае, если продукту не присвоено изображение при проверке на валидность возникает ошибка в месте вывода изображения «нет картинки»:
/noimage.gif" alt=""00 border="0"
00 — это пустые значения ширины и высоты. Правится в файле:
administrator/components/com_virtuemart/classes/htmlTools.class.php
вместо:
if( $height ) { $height = ' height="'.$height.'"'; }
if( $width ) { $width = ' width="'.$width.'"'; }
добавляем:
if( $height ) {
$height = ' height="'.$height.'"';
}
else {
$height = '';
}
if( $width ) {
$width = ' width="'.$width.'"';
}
else {
$width = '';
}
Для русификации wordpress (например если установка произодилась при помощи Fantastico De Luxe, а вообще на официальном сайте доступна для скачивания русская версия) необходимо из русской сборки скопировать на сервер папку /wp-content/languages/
и в файле wp-config.php
(в корне) изменить стороку:
define ('WPLANG', 'ru_RU');
Дистрибутив Highslide можно скачать на оффициальном сайте http://highslide.com/download.php
1. Папку highslide из архива копируем в папку используемого шаблона Joomla.
2. Подключаем css и js в шаблоне. Для этого в index.php шаблона добавляем:
<script type="text/javascript" src="/templates/<?php echo $mainframe->getTemplate(); ?>/highslide/highslide.js"></script>
<script type="text/javascript" src="/templates/<?php echo $mainframe->getTemplate(); ?>/highslide/highslide.config.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="/templates/<?php echo $mainframe->getTemplate(); ?>/highslide/highslide.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="/templates/<?php echo $mainframe->getTemplate(); ?>/highslide/highslide-ie6.css" />
<![endif]-->
<script type="text/javascript">
hs.graphicsDir = '/templates/<?php echo $mainframe->getTemplate(); ?>/highslide/graphics/';
</script>
3. В файле /administrator/components/com_virtuemart/classes/htmlTools.class.php
function vmPopupLink( $link, $text, $popupWidth=640, $popupHeight=480, $target='_blank', $title='', $windowAttributes='' ) {
if( $windowAttributes ) {
$windowAttributes = ','.$windowAttributes;
}
return vmCommonHTML::hyperLink( $link, $text, '', $title, "onclick=\"void window.open('$link', '$target', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=$popupWidth,height=$popupHeight,directories=no,location=no".$windowAttributes."');return false;\"" );
}
заменяем на
function vmPopupLink( $link, $text, $target='_self', $title='' ) {
$jslink = "<a href=\"$link\" class=\"highslide\" onclick=\"return hs.expand(this)\" title=\"$title\">$text</a>";
$noscriptlink = "<a href=\"$link\" class=\"highslide\" onclick=\"return hs.expand(this)\" target=\"$target\" title=\"$title\">$text</a>";
return $jslink;
return $noscriptlink;
}
function vmPopupLink_old( $link, $text, $popupWidth=640, $popupHeight=480, $target='_blank', $title='', $windowAttributes='' ) {
if( $windowAttributes ) {
$windowAttributes = ','.$windowAttributes;
}
return vmCommonHTML::hyperLink( $link, $text, '', $title, "onclick=\"void window.open('$link', '$target', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=$popupWidth,height=$popupHeight,directories=no,location=no".$windowAttributes."');return false;\"" );
}
4. В файле /administrator/components/com_virtuemart/html/shop.product_details.php
строку
$manufacturer_link .= vmPopupLink_old( $link, $text );
заменяем на
$manufacturer_link .= vmPopupLink( $link, $text );
В случае, когда истечение срока публикации по умолчанию принимает значение текущей даты (на некоторых хостингах, по какой причине не разбирался) можно сделать следующее изменение в файле administrator/components/com_content/controller.php
:
вместо
if (JHTML::_('date', $row->publish_down, '%Y') <= 1969 || $row->publish_down == $db->getNullDate()) {
$form->set('publish_down', JText::_('Never'));
} else {
$form->set('publish_down', JHTML::_('date', $row->publish_down, '%Y-%m-%d %H:%M:%S'));
}
следующее:
$form->set('publish_down', JText::_('Never'));
После этого значениие этого параметра по умолчанию будет принимать значение «Никогда».
Для удаления из БД всех ссылок на сайты авторов комментариев и их e-mail можно выполнить следующий sql-запрос:
UPDATE `wp_comments` SET `comment_author_email`=NULL, `comment_author_url`=NULL
Файлы для редактирования:
1. В index.php строка
echo "\n<!-- DataLife Engine Copyright SoftNews Media Group (http://dle-news.ru) -->\r\n";
2. В engine/engine.php строка
<meta name="generator" content="DataLife Engine Nulled by M.I.D-Team (http://www.mid-team.ws)" />
3. Чтобы убрать из админки на главной странице в параметре «Тип лицензии скрипта:» ссылку, в файле /engine/inc/main.php изменить значение переменной licence
:
$licence = "krylov.org.ua";
Примерное содержание структуры xml-файла простейшего компонента.
Например: mycomponent.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
<install type="component" version="1.5.0">
<name>mycomponent</name>
<creationDate>2010 01 04</creationDate>
<author>Konstantin Krylov</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://krylov.org.ua</authorUrl>
<copyright>Copyright (C) Konstantin Krylov</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<version>1.0</version>
<description>Sample Component</description>
<files>
<filename>mycomponent.php</filename>
</files>
<administration>
<menu>MyComponent...</menu>
</administration>
</install>
Затем этот файл, и файл mycomponent.php с самим php-кодом компонента пакуем в архив com_mycomponent.zip, и если вы все сделали правильно то можно устанавливать через админку. Обратите внимание, т.к. административную часть мы на этом этапе не разрабатывали то ее собственно и нет, хотя в меню компонент появится. Далее в меню управления навигацией по сайту публикуем ссылку на компонет и собственно все.