Big hi from Russia
im russ hacker (joomla hack)
it's work!
in componentscom_fireboardtemplatedefaultpost.php (условие если запрос пришел из компонента sobi2 то меняем url):
$parentid = 0;
$replyto = (int)$replyto;
$setFocus = 0;
$resubject = base64_decode(strtr($resubject, "()", "+/"));
$resubject = str_replace("%20", " ", $resubject);
$resubject = preg_replace('/%32/', '&', $resubject);
$resubject = preg_replace('/%33/', ';', $resubject);
$resubject = preg_replace("/\'/", ''', $resubject);
$resubject = preg_replace("/\"/", '"', $resubject);
$fromBot = 1;
$authorName = htmlspecialchars($my_name);
$rowid = mosGetParam($_REQUEST, 'rowid', 0);
$rowItemid = mosGetParam($_REQUEST, 'rowItemid', 0);
$comp = mosGetParam($_REQUEST, 'comp', 0);
if ($rowItemid) {
if (empty($comp)){
$contentURL = sefRelToAbs('index.php?option=com_content&task=view&Itemid=' . $rowItemid . '&id=' . $rowid);
}else{
$contentURL = sefRelToAbs('index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=' . $rowid . '&Itemid=' . $rowItemid);
}
in componentscom_sobi2templatesdefaultsobi2.details.tmpl.php здесь добавляем параметры необходимые для инициализации бота:
<?php
/////to mambot fb_db :)
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'content' );
$fakeRow = "";
$fakeRow->id=$sobi2Id;
$fakeRow->title =$mySobi->title;
$fakeRow->title_alias =$mySobi->title;
$fakeRow->introtext ="/{///mos_fb_discuss:2///}/".$fieldsFormatted['field_description'];
$fakeRow->sectionid ="1";
$fakeRow->catid ="1";
$fakeRow->created_by ="62";
$fakeRow->author ="Administrator";
$fakeRow->usertype ="Super Administrator";
$fakeRow->text ="{////mos_fb_discuss:2///}"; (убрать ///)
$fakeRow->component ="sobi2";
/////////params
$fakeParams = new mosParameters('');
$fake = new stdClass();
$fake->intro_only = "0";
$fakePage = "0";
$results = $_MAMBOTS->trigger( 'onPrepareContent', array( &$fakeRow, &$fakeParams, $fakePage ), true );
$results = $_MAMBOTS->trigger( 'onAfterDisplayContent', array( &$fakeRow, &$fakeParams, $fakePage ) );
echo trim( implode( "\n", $results ) );
?>
in mambots\content\fbdiscussbot.php здесь вносим несколько изменений ищите строки:
741 строка - если это sobi2 то меняем url
if (FBDB_JOOMLA_1_0_X) {
// $prefix = sefRelToAbs('index.php?option=com_content&task=view&id=' . $row->id . '&Itemid=' . ($rowItemid?$rowItemid:1));
if (empty($row->component)){
$prefix = $mosConfig_live_site . 'index.php?option=com_content&task=view&id=' . $row->id . '&Itemid=' . ($rowItemid?$rowItemid:1);
}
else{
/////for sobi2
$prefix = $mosConfig_live_site . 'index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=' . $row->id . '&Itemid=' . ($rowItemid?$rowItemid:1);
}
} else {
// $prefix = sefRelToAbs('index.php?option=com_content&view=article&id=' . $row->id . '&catid=' . $row->catid . '&Itemid=' . ($rowItemid?$rowItemid:1));
if (empty($row->component)){
$prefix = $mosConfig_live_site . 'index.php?option=com_content&view=article&id=' . $row->id . '&catid=' . $row->catid . '&Itemid=' . ($rowItemid?$rowItemid:1);
}///for sobi2
else{
$prefix = $mosConfig_live_site . 'index.php?option=com_sobi2&sobi2Task=sobi2Details&sobi2Id=' . $row->id . '&catid=' . $row->catid . '&Itemid=' . ($rowItemid?$rowItemid:1);
}
}
111 строка добовляем правило && $option != "com_sobi2
function fbdbIncludeIntegrationFile() {
global $mosConfig_absolute_path, $botCopyContent;
$path = $mosConfig_absolute_path.'/'.(FBDB_JOOMLA_1_0_X ? "mambots" : "plugins").'/content/fbdiscussbot/integration/';
$option = fbdbCheck($_REQUEST['option']);
if ($option && $option != "com_content" && $option != "com_sobi2" ) {
857 строка добавляем параметр &comp=".$row->component
// If there is no result from the first query let the link open a new reply possibility
$showlink = "";
echo $showlink;
if ($resultid == ""){
$showlink = sefRelToAbs("index.php?option=com_fireboard&Itemid=" . $Itemid
. "&func=post&do=newFromBot&resubject=".strtr(base64_encode($row->title), "+/", "()")."&catid=".$catid
. "&rowid=".$row->id."&rowItemid=".$rowItemid."&comp=".$row->component );
you may download file change and Screenshot on page of our forum
http://avlab.ru/component/option,com_fireboard/Itemid,78/func,view/id,23/catid,5/