http://www.lokeshdhakar.com/projects/lightbox2/
я так и хотел, но не нашел сайт разработчиков((
С некоторыми картинками при применении к ним DR возникает 500 ошибка internal server error. При отключении DR страница начинает функционировать нормально.
Не подскажите в чем может быть проблема и как поправить?
стоит закомментить мне размеры большой картинки - ничего нет
и кеш чистил и картинка на месте.
if ($currentImgWidth > $this->drconfig['big_width'] || $currentImgHeight > $this->drconfig['big_height']){
// Генерируем большое изображение
$this->PrepareImg($currentImgPath);
$this->imgWidth = $this->drconfig['big_width'];
$this->imgHeight = $this->drconfig['big_height'];
$this->mode = "big";
$this->bigPath = $this->Process();
$this->bigWidth = $this->imgWidth;
$this->bigHeight = $this->imgHeight;
} else {if ($currentImgWidth > $this->drconfig['big_width'] || $currentImgHeight > $this->drconfig['big_height'] || $this->drconfig['big_watermark']['use_watermark']){
// Генерируем большое изображение
$this->PrepareImg($currentImgPath);
$this->imgWidth = $currentImgWidth > $this->drconfig['big_width'] ? $this->drconfig['big_width'] : $currentImgWidth;
$this->imgHeight = $currentImgHeight > $this->drconfig['big_height'] ? $this->drconfig['big_height'] : $currentImgHeight;
$this->mode = "big";
$this->bigPath = $this->Process();
$this->bigWidth = $this->imgWidth;
$this->bigHeight = $this->imgHeight;
} else {if ($this->imgWidth == $this->img_src_w && $this->imgHeight == $this->img_src_h) return false;
if ($this->imgWidth == $this->img_src_w && $this->imgHeight == $this->img_src_h && !$this->drconfig['big_watermark']['use_watermark']) return false;
// This is the template to markup your thumbnails. See readme for possible placeholders.
$tpl = <<<HTML
<a href="[+dr.bigPath+]" class="highslide" onclick="return hs.expand(this, {captionId: 'caption[+dr.id+]'})">
<img src="[+dr.thumbPath+]" [+dr.align:ne=``:then=`align="[+dr.align+]"`+] [+dr.alt:ne=``:then=`alt="[+dr.alt+]"`+] [+dr.title:ne=``:then=`title="[+dr.title+]"`+] width="[+dr.thumbWidth+]" height="[+dr.thumbHeight+]" /></a>
<div class="highslide-caption" id="caption[+dr.id+]">[+dr.title+]</div>
HTML;
preg_match_all("/]*>/", $o, $imgs, PREG_PATTERN_ORDER); for($n=0;$nconfig[site_url], "", $currentImgPath); $currentImgPath = urldecode($currentImgPath); preg_match('~\[(\+|\*|\()([^:\+\[\]]+)([^\[\]]*?)(\1|\))\]~s', $currentImgPath, $matches); if (!empty($matches)) continue; // ���� ����� $this->CheckForLabels($imgs[0][$n]); //���������, ����� �� ��� ����������� � ��� ����� ������������ ������, ��������� ����� drskip, ��������� ���������� ����� if ($this->checkPath($currentImgPath) && !$this->label["drskip"] && $this->CheckAllowedExt($currentImgPath) && (($this->drconfig['lightbox_mode'] == 1 && $this->label["drlightbox"]) || $this->drconfig['lightbox_mode'] == 2)){ $img = strtolower($imgs[0][$n]); // ���������, ������ �� � ����������� height ��� width if ($this->CheckThumbSizes($img)){ $imgf =$imgs[0][$n]; preg_match("/^.+(src|Src|SRC)=('|\")/",$imgf,$lien_g); $imgf = eregi_replace("^.+src=('|\")","",$imgf); preg_match("/('|\").*$/",$imgf,$lien_d); // �������� ����� $currentImgPath = $this->PrepareImg($currentImgPath); $this->imgWidth = $this->imgHTMLWidth; $this->imgHeight = $this->imgHTMLHeight; $this->mode = "thumb"; $this->thumbPath = $this->Process(); /* thumbImgTag - HTML-��� ���� img ��� ����� thumbWidth, thumbHeight - ��������� ������� ��������������� ����� */ $HTML = $lien_g[0].$this->thumbPath.$lien_d[0]; $this->thumbWidth = $this->imgWidth; $this->thumbHeight = $this->imgHeight; //if ($this->label["drthumbonly"]) { $s = "/(width *= *[\"|'])([^\"']*)([\"'])/i"; $r = "\${1}{$this->thumbWidth}\${3}"; $HTML = preg_replace($s,$r, $HTML); $s = "/(height *= *[\"|'])([^\"']*)([\"'])/i"; $r = "\${1}{$this->thumbHeight}\${3}"; $HTML = preg_replace($s,$r, $HTML); } // ���������� ������� ����������� � lightbox HTML-��� if (!$modx->isBackend() && !$this->label["drthumbonly"]){ $size = getimagesize($modx->config['base_path'].$currentImgPath); $currentImgWidth = $size[0]; $currentImgHeight = $size[1]; if ($currentImgWidth > $this->imgHTMLWidth || $currentImgHeight > $this->imgHTMLHeight){ $this->originalPath = $currentImgPath; $this->originalWidth =$currentImgWidth; $this->originalHeight =$currentImgHeight; $this->bigPath = $currentImgPath; $this->bigWidth = $currentImgWidth; $this->bigHeight = $currentImgHeight; if ($currentImgWidth > $this->drconfig['big_width'] || $currentImgHeight > $this->drconfig['big_height']){ // ���������� ������� ����������� $this->PrepareImg($currentImgPath); $this->imgWidth = $this->drconfig['big_width']; $this->imgHeight = $this->drconfig['big_height']; $this->mode = "big"; $this->bigPath = $this->Process(); $this->bigWidth = $this->imgWidth; $this->bigHeight = $this->imgHeight; } else { $this->bigPath = $currentImgPath; } // ���������� HTML-��� lightbox-������ $HTML = $this->ParseTemplate($imgs[0][$n], $n); } } $o = str_replace($imgs[0][$n],$HTML,$o); $this->imgCounter++; } } } if (!$modx->isBackend()) $o = $this->ReplaceLabels($o); $this->output = $o; } //------------------------------------------------------------------------------------------------- /* ������ ������, �������� �������� ��� */ function ParseTemplate($tpl, $currId) { global $modx, $_lang; if (!class_exists('DRChunkie')) { $chunkieclass = $modx->config['base_path'].DIRECTRESIZE_PATH.'includes/chunkie.class.inc.php'; if (file_exists($chunkieclass)) { include_once $chunkieclass; } } $drtemplate = new DRChunkie($this->drconfig['tpl']); /* ������������ ��������� ��������� �����������, �������� �� � ������������ */ $HTMLattr = array( "alt" => "alt|Alt|ALT", "title" => "title|Title|TITLE", "class" => "class|Class|CLASS", "valign" => "valign|Valign|VALIGN", "align" => "align|align|ALIGN", "style" => "style|Style|STYLE", ); foreach ($HTMLattr as $attr_k => $attr_v) { preg_match("/(".$attr_v.") *= *[\"|'][^\"']*[\"']/",$tpl,$array); if (!empty($array[0])) { $tmp = eregi_replace($attr_k." *= *[\"|']","",$array[0]); $tmp = eregi_replace("[\"']*","",$tmp); $tpldata[$attr_k] = trim($tmp); } } $tpldata['id'] = $currId; $tpldata['thumbWidth'] =$this->thumbWidth; $tpldata['thumbHeight'] =$this->thumbHeight; $tpldata['thumbPath'] = $this->thumbPath; $tpldata['bigWidth'] =$this->bigWidth; $tpldata['bigHeight'] =$this->bigHeight; $tpldata['bigPath'] = $this->bigPath; $tpldata['originalPath'] = isset($this->originalremotePath) ? $this->originalremotePath : $this->originalPath; $tpldata['originalWidth'] =$this->originalWidth; $tpldata['originalHeight'] =$this->originalHeight; $tpldata['originalFilename'] =str_replace("b
я не знаю в чем проблема, может плагин DirectResize 0.8.0 не любит modx-0.9.6.2. Или вся вина на БД? По идее я делал все как в описании установки.
Обновить сайт
0 документов опубликовано.
0 документов снято с публикации.
Кэш: найдено 5 файлов в папке кэширования и удалено 1 кэш-файлов.
Новые кэш-файлы будут созданы при запросах страниц.
Следующие файлы были удалены:
* docid_1.pageCache.php