Новости Joomla

SW JProjects v.2.5.0 - компонент каталога цифровых проектов на Joomla

SW JProjects v.2.5.0 - компонент каталога цифровых проектов на Joomla

👩‍💻 SW JProjects v.2.5.0 - компонент каталога цифровых проектов на Joomla.Компонент - менеджер цифровых проектов для Joomla! CMS. Компонент обеспечивает создание каталога цифровых проектов и предоставляет возможность скачивания, в том числе с использованием лицензионных ключей.👩‍💻 v.2.5.0. Что нового?Схемы структур данных для серверов обновлений. Теперь с SW JProjects вы может создавать сервер обновлений не только для расширений Joomla, но и свои собственные. Например, вам нужно, чтобы структура данных сервера обновлений была другая и формат должен быть, например, не XML, а JSON. Формирование структуры данных для сервера обновлений расширений Joomla вынесено в отдельный плагин. Вы можете создать свой собственный плагин и реализовать в нём нужную вам структуру данных, добавив или наоборот исключив отображаемые данные. Сервер обновлений в компоненте по-прежнему отображает информацию о списке проектов и их версиях, о конкретном проекте и его changelog.Можно выбрать схему данных сервера обновлений глобально для всего компонента, выбрать другую схему данных для категории проектов, а так же выбрать схему в каждом проекте.

Разработчикам в качестве образца можно посмотреть плагин схемы данных для Joomla в составе компонента или же плагин-образец JSON-схемы на GitHub.
Группа плагинов swjprojects. Для нужд компонента создана группа плагинов swjprojects. В частности, в этой группе находится плагин структуры данных Joomla расширений для сервера обновлений.Изменение языковых констант. Изменены некоторые языковые константы в панели администратора. Если вы делали переопределение констант - переопределите их снова.👩‍💻 Joomla 6. Внесены изменения для корректной установки и работы компонента на Joomla 6. Компонент успешно протестирован на Joomla 6-beta2.Минимальная версия Joomla - 5. Подняты минимальные системные требования: Joomla 5.0.0 и PHP 8.1.
- Страница расширения👉 Плагин-образец кастомной JSON-схемы данных для сервера обновлений на GitHub.- GitHub расширения- Документация на GitHub- Joomla Extensions Directory#joomla #расширения

Как триггерить события для плагинов на манер Joomla 5+?В Joomla 6 должны удалить метод...

Как триггерить события для плагинов на манер Joomla 5+?В Joomla 6 должны удалить метод...

👩‍💻 Как триггерить события для плагинов на манер Joomla 5+?В Joomla 6 должны удалить метод triggerEvent(), с помощью которого раньше вызывались события для плагинов. Теперь чтобы в своём коде вызвать событие для плагина и получить от него результаты нужно:- создать объект класса события- передать в него параметры

use Joomla\CMS\Event\AbstractEvent;use Joomla\CMS\Factory;use Joomla\CMS\Plugin\PluginHelper;// Грузим плагины нужных группPluginHelper::importPlugin('system');// Создаём объект события$event = AbstractEvent::create('onAfterInitUniverse', [    'subject' => $this,    'data'    => $data, // какие-то данные    'article' => $article, // ещё материал вдовесок    'product' => $product, // и товаров подвезли]);// Триггерим событиеFactory::getApplication()->getDispatcher()->dispatch(    $event->getName(), // Тут можно строку передать 'onAfterInitUniverse'    $event);// Получаем результаты// В случае с AbstractEvent это может быть не 'result',// а что-то ещё - куда сами отдадите данные.// 2-й аргумент - значение по умолчанию, // если не получены результаты$results = $event->getArgument('result', []);
Плюсы такого подхода - вам не нужно запоминать порядок аргументов и проверять их наличие. Если вы написали свой класс события, то в плагине можно получать аргументы с помощью методов $event->getArticle(), $event->getData(), $event->getProduct() и подобными - реализуете сами под свои нужды. Если такой класс события написали, то создаёте экземпляр своего класса события и укажите его явно в аргументе eventClass
use Joomla\Component\MyComponent\Administrator\Event\MyCoolEvent;$event = MyCoolEvent::create('onAfterInitUniverse', [    'subject'    => $this,    'eventClass' => MyCoolEvent::class, // ваш класс события    'data'       => $data, // какие-то данные    'article'    => $article, // ещё материал вдовесок    'product'    => $product, // и товаров подвезли]);
Ожидаемо, что класс вашего события будет расширять AbsractEvent или другие классы событий Joomla.🙁 Есть неприятный нюанс - нельзя просто так вызывать событие и ничего не передать в аргументы. Аргумент subject обязательный. Но если вы всё-таки не хотите туда ничего передавать - передайте туда пустой stdClass или объект Joomla\registry\Registry.
@joomlafeed#joomla #php #webdev

0 Пользователей и 1 Гость просматривают эту тему.
  • 7 Ответов
  • 2684 Просмотров
*

dave.s

  • Осваиваюсь на форуме
  • 12
  • 0 / 0
JB Organica
« : 30.01.2011, 11:16:11 »
Добрый день. Работаю с шаблоном JB Organica и столкнулся с проблемой - настраивал модули в разные позиции и в итоге в шапочке сайта (слева вверху) стало писаться: 10%. если включить модуль поиска, то будет писаться 96%. никакой позиции в этом месте нет. в index ничего похожего тоже не прописано. отключал все модули, цифра остается. где искать? спасибо

скрин:

index.php:
Код
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );
define( 'YOURBASEPATH', dirname(__FILE__) );
require(YOURBASEPATH .DS."vars.php");

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<?php
// General template settings - alter the variable in the quotatipn marks to change a setting in this template.

/*------ Javascripts --------*/
$jquery = $this->params->get("jquery","yes"); // Select whether to include the Jquery script. Leave this set to yes if you want to use the superfish menu or any other Jquery scripts.
$superfish = $this->params->get("superfish","yes"); // Set this to yes if you want to enable the use of the Superfish menu.

/*------ Style --------*/
$bg = $this->params->get("bg","trees"); // Sets the background for the site. birds | birds2 | birds3 | birds4 | trees | smoke | wall | wood | clouds
$hilite = $this->params->get("hilite","blue"); // Colours for links and the column borders on the sub pages  blue | red | charcoal | green

/*------ Style --------*/
$fold1 = $this->params->get("fold1","black1"); // Sets the background for the site. dark | light | white | wooden | black | grass | clouds | dark_clouds
$fold2 = $this->params->get("fold2","charcoal2");
$fold3 = $this->params->get("fold3","blue1");
$fold4 = $this->params->get("fold4","blue2");
$foldIsolated = $this->params->get("foldIsolated","blue1"); // The image to use if you arent displaying the horizontal accordion

$displayFoldLabels = $this->params->get("displayFolds","yes"); // Set this option to yes if you want to display text images as labels on the sliding bars.

// Here is a list of the following labels available for the settings below: aboutUs | blog | contactUs | directions | downloads | events | features | files | findingUs | flickr | folio | gallery | home | locations | music | myLife | newsletter | portfolio | resources | services | specials | twitter | work

$fold1Label = $this->params->get("fold1Label","specials"); // The name of the image that you want to display on the first fold
$fold2Label = $this->params->get("fold2Label","twitter"); // The name of the image that you want to display on the second fold
$fold3Label = $this->params->get("fold3Label","work"); // The name of the image that you want to display on the third fold
$fold4Label = $this->params->get("fold4Label","services"); // The name of the image that you want to display on the fourth fold


/*------ prettyPhoto Settings --------*/
$prettyPhoto = $this->params->get("prettyPhoto","yes");
$opacity = $this->params->get("opacity","0.6");

/*------ FaceBox Settings --------*/
$faceBox = $this->params->get("faceBox","yes"); // FaceBox is required for hte lightbox effect in the microBlog module


/*------ Slider Menu Titles --------*/
$title1 = $this->params->get("title1","Basecamp");
$title2 = $this->params->get("title2","Features");
$title3 = $this->params->get("title3","Gallery");
$title4 = $this->params->get("title4","Bio");
$title5 = $this->params->get("title5","Wheat");
$title6 = $this->params->get("title6","Winter");
$title7 = $this->params->get("title7","Contact");
$title8 = $this->params->get("title8","Travel log");
$title9 = $this->params->get("title9","About Us");


$slide2Label = $this->params->get("slide2Label","blue1");
$slide3Label = $this->params->get("slide3Label","charcoal1");
$slide4Label = $this->params->get("slide4Label","black1");
$slide5Label = $this->params->get("slide5Label","black2");
$slide6Label = $this->params->get("slide6Label","blue3");
$slide7Label = $this->params->get("slide7Label","blue4");
$slide8Label = $this->params->get("slide8Label","black1");
$slide9Label = $this->params->get("slide9Label","black2");



/*------ Fade Effects and transitions --------*/
$startTransition = $this->params->get("startTransition","Out"); // Parameters: In | Out | InOut
$transition = $this->params->get("transition","Back"); // Parameters Quad | Cubic | Quart | Quint | Circ | Sine | Expo | Elastic | Bounce | Back
$duration = $this->params->get("duration","800");

$col1Width2 = $this->params->get("col1Width2", '10%');
$col2Width2 = $this->params->get("col2Width2", '31%');
$col3Width2 = $this->params->get("col3Width2", '60%');
$col4Width2 = $this->params->get("col4Width2", '33%');

$col1Width3 = $this->params->get("col1Width3", '17%');
$col2Width3 = $this->params->get("col2Width3", '17%');
$col3Width3 = $this->params->get("col3Width3", '52%');
$col4Width3 = $this->params->get("col4Width3", '52%');

$col1Width4 = $this->params->get("col1Width4", '17%');
$col2Width4 = $this->params->get("col2Width4", '17%');
$col3Width4 = $this->params->get("col3Width4", '31%');
$col4Width4 = $this->params->get("col4Width4", '17%');

/*------ Width of the four columns on the sub page --------*/
$containerWidth = $this->params->get("containerWidth","90%");
$layout = $this->params->get("layout","3");
// Layout 1 = MainBody | Left | Inset | Right
// Layout 2 = Left | MainBody | Inset | Right
// Layout 3 = Left | Inset | MainBody | Right
// Layout 4 = Left | Inset | Right | MainBody

/*------ Do not edit these settings --------*/

if ($displayFoldLabels == "yes") {
$fold1LabelRef = "<img src='$this->baseurl/templates/$this->template/images/labels/$fold1Label.png' alt='$fold1Label' />";
$fold2LabelRef = "<img src='$this->baseurl/templates/$this->template/images/labels/$fold2Label.png' alt='$fold2Label' />";
$fold3LabelRef = "<img src='$this->baseurl/templates/$this->template/images/labels/$fold3Label.png' alt='$fold3Label' />";
$fold4LabelRef = "<img src='$this->baseurl/templates/$this->template/images/labels/$fold4Label.png' alt='$fold4Label' />";
}

if ($displayFoldLabels == "no") {
$fold1LabelRef = '';
$fold2LabelRef = '';
$fold3LabelRef = '';
$fold4LabelRef = '';
}





// For two modules it needs to add up to 96%
if ($colCount == "0") {
$col1Width = "96%";
$col2Width = "96%";
$col3Width = "96%";
$col4Width = "96%";
}

// For two modules it needs to add up to 91%
if ($colCount == "1") {
$col1Width = $col1Width2;
$col2Width = $col2Width2;
$col3Width = $col3Width2;
$col4Width = $col4Width2;
}

echo $col1Width;
// For three modules it needs to add up to 86%
if ($colCount == "2") {
$col1Width = $col1Width3;
$col2Width = $col2Width3;
$col3Width = $col3Width3;
$col4Width = $col4Width3;

}

// For four modules it needs to add up to 82%
if ($colCount == "3") {
$col1Width = $col1Width4;
$col2Width = $col2Width4;
$col3Width = $col3Width4;
$col4Width = $col4Width4;

}





?>
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<jdoc:include type="head" />
<link rel="shortcut icon" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/favicon.ico" />
<!-- Import Style Sheets-->
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/template_css.css" type="text/css" />

<?php if ($jquery == "yes") { ?>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery-1.2.6.pack.js"></script>

<?php if ($jquery == "yes") { ?>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/superfish.js"></script>
<?php } ?>

<?php if ($frontPage > "0") { ?>
<!-- front page scripts -->
 <script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jqueryhaccordionOpen.js"></script>
 <script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery.flow.1.2.js"></script>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery.easing.min.js"></script>
<?php } ?>

<?php if ($frontPage == "0") { ?>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/equalHeights.js"></script>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/accordionMenu.js"></script>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery.cookie.js"></script>
<script type="text/JavaScript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/jquery.dimensions.js"></script>
<?php } ?>

 
<?php if ($faceBox == "yes") : ?>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/facebox/facebox.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/facebox/facebox.js" type="text/javascript"></script>
<?php endif; ?>
<?php if ($prettyPhoto == "yes") : ?>
<!-- PrettyPhoto-->
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/prettyPhoto/js/jquery.prettyPhoto.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/prettyPhoto/css/prettyPhoto.css" type="text/css" />
<?php endif; ?>

<!--[if IE 6]>
<script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/DD_belatedPNG0.0.6a-min.js"></script>
<script>
    DD_belatedPNG.fix('#veryTopLeft a img,div.search,.header a img,.pngfix,.pathway img</script>pic<?php if ($prettyPhoto == "yes") : ?>,div.pictureHolder .top .left,div.pictureHolder .top .right,div.pictureHolder .top .left,div.pictureHolder .bottom .left,div.pictureHolder .bottom .right,div.pictureHolder .content a.close,div.pictureHolder .content .details .nav a.arrow_next,div.pictureHolder .content .details .nav a.arrow_previous,div.pictureHolder .content,div.pictureHolder .bottom .middle,div.pictureHolder .top .middle <?php endif; ?>');
</script>
<![endif]-->

<script type="text/JavaScript">
 jQuery.noConflict();

jQuery(document).ready(function(){

<?php if ($frontPage == "0") { ?>
jQuery('#mainWrap').equalHeights();

<?php } ?>
<?php if ($superfish == "yes") : ?>
jQuery("#nav ul")
.superfish({
animation : {width:"show",height:"show",opacity:"show"},
delay : 1000
});
<?php endif; ?>

<?php if ($faceBox == "yes") : ?>
jQuery('a[rel*=facebox]').facebox()
<?php endif; ?>

<?php if ($prettyPhoto == "yes") : ?>
jQuery("a[rel^='prettyOverlay'],a[rel^='prettyPhoto']").prettyPhoto({
animationSpeed: 'normal',
padding: 40,
opacity: <?php echo  $opacity ?>,
showTitle: false,
allowresize: true
});
<?php endif; ?>

<?php if ($frontPage > "1") {
  if ($accordion > "0") { ?>
jQuery(".haccordion").haccordion();
<?php } ?>



<?php if ($displaySliderAccordion = "yes") { ?>
jQuery("#myController").jFlow({
slides: "#mySlides",
controller: ".jFlowControl", // must be class, use . sign
slideWrapper : "#jFlowSlide", // must be id, use # sign
selectedWrapper: "jFlowSelected",  // just pure text, no sign
width: "100%",
height: "460px",
duration: <?php echo $duration ?>,
easing: "ease<?php echo $startTransition ?><?php echo $transition ?>",
prev: ".jFlowPrev", // must be class, use . sign
next: ".jFlowNext" // must be class, use . sign
});

jQuery(".header.fade").hover(function(){
jQuery(this).fadeTo("fast", 0.4); // This should set the opacity to 100% on hover
},function(){
jQuery(this).fadeTo("fast", 1.0); // This should set the opacity back to 60% on mouseout
});

jQuery(".header.nohover").hover(function(){
jQuery(this).fadeTo("fast", 1); // This should set the opacity to 100% on hover
},function(){
jQuery(this).fadeTo("fast", 1.0); // This should set the opacity back to 60% on mouseout
});

// Fade transitions for Slider Nav
jQuery('.start').fadeTo("slow", 0.6);
jQuery(".jFlowControl").click(function () {
jQuery(".jFlowControl").fadeTo("slow", 1.0);
    jQuery(".jFlowSelected").fadeTo("slow", 0.6);
});
<?php } ?>
<?php } ?>
<?php if ($frontPage == "0") { ?>

<?php } ?>
});

</script>
 <?php } ?>
</head>
<body class="<?php echo $bg ?> <?php echo $hilite ?>">

<?php if ($frontPage == "0") { ?>
<div id="outerWrap">
<div id="innerWrapSub">
<div id="innerWrap" style="width:<?php echo $containerWidth ?>">
<?php } ?>
<div id="veryTop">
<div id="veryTopLeft">
<!-- Site Logo -->
<a href="<?php echo $this->baseurl ?>/"><img src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo.png" alt="logo" /></a>
</div>
<!-- Start Nav contianer and Nav -->
<div id="veryTopMid">
<div id="nav">
<jdoc:include type="modules" name="top" style="xhtml" />
</div>
</div>
</div>
<!-- Top Wrapper - Holds the menu items for the slider -->
<div id="top_wrapper">


</div>

<!-- End top wrapper-->

и исходный код через оперу:
Код
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru-ru" lang="ru-ru" >
96%<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
*

Djamezzz

  • Новичок
  • 7
  • 1 / 0
Re: JB Organica
« Ответ #1 : 30.01.2011, 13:34:49 »
Привет! Очень хотел бы помочь в твоем вопросе, но  сам обращаюсь за помощью, возможно мне тебя сам Бог послал. У меня очень похожий шаблон и органику я тоже пробовал. Пожалуйста, скажи, как создать это вертикальное, "аккордеон"-меню? Установил шаблон, а его нет. Не знаю с чего начинать. Что это, модули, разделы? Откуда начинать поиск решения, создавать их в админ панели, или в самом коде скрипта?
Спасибо и извини, что влез со своим вопросом.
*

clubbers

  • Захожу иногда
  • 195
  • 10 / 1
  • Ставим + , если помог)
Re: JB Organica
« Ответ #2 : 30.01.2011, 13:38:16 »
тяжело так искать..сайт как я понимаю на локалке... ошибка не обезательно должна быть в индекс.пхп в темплейтс есть еще папка хтмл или либ, или что то подобное, там может быть файл хедер.пхп надо еще там посмотреть... а вообще попробуйте использовать поиск тотал командера, и найти все файлы в которых есть символы 96%, ежели в коде оно таки прописуеться, вы его найдете, ежели в коде прописан програмный код который выводит пока непонятное число, тога будет труднее)
*

zlideni

  • Захожу иногда
  • 337
  • 76 / 0
Re: JB Organica
« Ответ #3 : 30.01.2011, 13:38:43 »
:)
Найдите вот эти строки
Цитировать
}

echo $col1Width;
// For three modules it needs to add up to 86%
и уберите из них
Цитировать
echo $col1Width;
*

dave.s

  • Осваиваюсь на форуме
  • 12
  • 0 / 0
Re: JB Organica
« Ответ #4 : 30.01.2011, 13:46:31 »
Спасибо огромнейшее, убрал эту строку и больше эти проценты не отображаются ^-^
*

dave.s

  • Осваиваюсь на форуме
  • 12
  • 0 / 0
Re: JB Organica
« Ответ #5 : 30.01.2011, 13:55:30 »
Djamezzz, в органике уже встроено это аккордеон-меню в позицию top, в нее нужно только разместить модуль и в его настройках разрешить раскрывающийся список.
для других шаблонов очень много же разных модулей такого меню.
вбей в поиск menu accordion Joomla, там много разных, для других шаблонов я пользуюсь swmenupro
*

Djamezzz

  • Новичок
  • 7
  • 1 / 0
Re: JB Organica
« Ответ #6 : 01.02.2011, 04:28:35 »
dave.s, дай тебе Боже здоровьичка! Вроде пошло дело. У меня тоже аккордеон встроен был, я это знал, но не знал как его оживить, не знал, что нужно модуль создать и прочее. Спасибо тебе большое!
*

spb-realtor

  • Новичок
  • 3
  • 0 / 0
  • энергичный петербургский риэлтор
Re: JB Organica
« Ответ #7 : 02.05.2011, 21:04:43 »
Как разместить статью в subPage?
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться