Dram

Рейтинг
1114
Регистрация
28.06.2008

Вот почти все. В файле было где-то 10300 знаков, форум столько не пропустил. Убрал чуток с конца

<?php

/**
* @version 1.2 - RokBox - RocketWerx
* @thanks to Dennis Pleiter for Wildcards contribution
* @package RocketWerx
* @copyright Copyright (C) 2008 RocketTheme, LLC. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

// no direct access
defined( '_JEXEC' ) or die();

jimport( 'joomla.plugin.plugin' );
require_once(dirname(__FILE__) . '/rokbox/imagehandler.php');

class plgContentRokbox extends JPlugin
{
function plgContentRokbox( &$subject, $params )
{
parent::__construct( $subject, $params );
}

function onPrepareContent( &$article, &$params, $limitstart )
{
global $mainframe;


// simple performance check to determine whether bot should process further
if ( strpos( $article->text, 'rokbox' ) === false ) {
return true;
}

// Get plugin info
$plugin =& JPluginHelper::getPlugin('content', 'rokbox');

// define the regular expression for the bot
$regex = "#{rokbox(.*?)}(.*?){/rokbox}#s";

$pluginParams = new JParameter( $plugin->params );

// check whether plugin has been unpublished
if ( !$pluginParams->get( 'enabled', 1 ) ) {
$article->text = preg_replace( $regex, '', $row->text );
return true;
}

// find all instances of plugin and put in $matches
preg_match_all( $regex, $article->text, $matches );

// Number of plugins
$count = count( $matches[0] );

// plugin only processes if there are any instances of the plugin in the text
if ( $count ) {
// Get plugin parameters
$style = $pluginParams->def( 'style', -2 );

$this->plgContentProcessRokboxImages( $article, $matches, $count, $regex, $pluginParams );
}


}

function plgContentProcessRokboxImages( &$row, &$matches, $count, $regex, &$botParams ) {
global $mainframe;


$thumb_ext = $botParams->def( 'thumb_ext', '_thumb');
$thumb_class = $botParams->def( 'thumb_class', 'album');
$thumb_width = $botParams->def( 'thumb_width', '100');
$thumb_height = $botParams->def( 'thumb_height', '100');
$thumb_quality = $botParams->def( 'thumb_quality', '90');
$thumb_custom = $botParams->def( 'thumb_custom', 0);
$thumb_dir = $botParams->def( 'thumb_dir');
$compatibility = $botParams->def( 'compatibility', 'rokbox');


/* thumbnail settings */
$improve_thumbnails = false; // Auto Contrast, Unsharp Mask, Desaturate, White Balance
$thumb_quality = $thumb_quality;
$width = $thumb_width;
$height = $thumb_height;

/* slimbox = lightbox mode */
if ($compatibility == "slimbox") $compatibility = "lightbox";

for ( $i=0; $i < $count; $i++ )
{
$thealbum = '';
$thetitle = '';
$thethumb = '';
$thetype = '';
$thesize = '';
$thetext = '';
$themodule = '';
$thethumbcount = 999;
if (@$matches[1][$i]) {
$inline_params = $matches[1][$i];

// get album
$album_matches = array();
preg_match( "#album=\|(.*?)\|#s", $inline_params, $album_matches );
if (isset($album_matches[1])) $thealbum = "(" . trim($album_matches[1]) . ")";

// get size
$size_matches = array();
preg_match( "#size=\|(.*?)\|#s", $inline_params, $size_matches );
if (isset($size_matches[1])) $thesize = "[" . trim($size_matches[1]) . "]";

// get title
$title_matches = array();
preg_match( "#title=\|(.*?)\|#s", $inline_params, $title_matches );
if (isset($title_matches[1])) $thetitle = $title_matches[1];

// get text
$text_matches = array();
preg_match( "#text=\|(.*?)\|#s", $inline_params, $text_matches );
if (isset($text_matches[1])) $thetext = $text_matches[1];

// force image
$type_matches = array();
preg_match( "#type=\|(.*?)\|#s", $inline_params, $type_matches );
if (isset($type_matches[1])) $thetype = $type_matches[1];

// get module
$module_matches = array();
preg_match( "#module=\|(.*?)\|#s", $inline_params, $module_matches );
if (isset($module_matches[1])) $themodule = "[module=".$module_matches[1]."]";

// get thumb
$thumb_matches = array();
preg_match( "#thumb=\|(.*?)\|#s", $inline_params, $thumb_matches );
if (isset($thumb_matches[1])) $thethumb = $thumb_matches[1];

// get thumb count
$thumbcount_matches = array();
preg_match( "#thumbcount=\|(.*?)\|#s", $inline_params, $thumbcount_matches );
if (isset($thumbcount_matches[1])) $thethumbcount = $thumbcount_matches[1];
}

$onsite=1;
$text = '';
$displaythumb = '';
$tmp = glob(trim($matches[2][$i]));
if (count($tmp) < 1) {
$tmp = array(trim($matches[2][$i]));
$onsite=0;
}

foreach ($tmp as $link){
// Prevent thumbs of thumbs
if ( strpos( $link, $thumb_ext ) === false ) {


if (strlen($thethumb)) $image_url = trim($thethumb);
else $image_url = $link;

$extension = substr($image_url,strrpos($image_url,"."));
$image_name = substr($image_url,0,strrpos($image_url, "."));
$just_name = substr($image_name,strrpos($image_name,DS));


?>

Купил на свой сайт больше месяца назад

пр 6 одна ссылка

пр5 шесть ссылок

пр4 шесть ссылок

До закупки было у меня пр3, сегодня трясущимися руками открыл сайтик и тупо пялился на ту же тройку!!!

Нет слов :(

Можно подробнее?

[Fri Apr 02 16:49:03 2010] [crit] [client 79.174.67.233] (13)Permission denied: /var/www/dram/data/www/site.ru/installation/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

Еще не до конца разобрался, подскажите а как логи в этой панели посмотреть?

У меня было 5 фиг знает откуда взявшихся дублей. что смог заредиректил, и все в добавок закрыл в роботе. Больше проблем не было.

Вот ссылка по теме http://joomlaforum.ru/index.php?topic=77319.0

Насколько я понимаю дубли следующие:

/index.php

http://домен.ru/component/option,com_frontpage/Itemid,1/

Удирается редиректом в .htaccess

+ в роботе Disallow для верности

С ЧПУ лучше не мудрить, потому что серьезно повышается нагрузка не сервак и меняются все урлы - что для старого сайта смерти подобно

Я смотрю особых преимуществ и недостатков ни у кого нет, беру Debian с панелью управления ISPmanager и root-доступом

Поставил ссылку на свой сайт с морды 3-х других своих СДЛ, с большим окружением анкора + картинка с альтом. Описание и тайтл ссылки на этих сайтах разный.

Прошла неделя - запрос не шелохнулся. Как был на 6 месте так и стою :(

нет в дефолтной джумле русскоязычных урлов!

Всего: 6924