Work with "path to media-files" change

16 years 1 month ago #2605 by mrhujun
The current zoom plugin does not work with a different "path to media-files" other than the default "images/zoom/". For some reason, maybe a good reason, I need to set the zoom media directory to "images/stories/zoom" so that I can use the mosimage bot to include the images and/or their thumbs into content.

Here is what I did, just in case anybody else needs it:

file: components / com_comprofiler / plugin / user / plug_cbzoomtab / zoom.php : line 81:

[code:1]
$ZoomPath = "/images/zoom/";
[/code:1]

change to
[code:1]
$ZoomPath = "images/zoom/";
if(file_exists('components/com_zoom/etc/zoom_config.php')){
include_once('components/com_zoom/etc/zoom_config.php');
$ZoomPath = $zoomConfig;
}
[/code:1]

line 99:
[code:1]
$imgsize=getimagesize($mosConfig_absolute_path.$ZoomPath.$photo->catdir."/".$photo->imgfilename);
[/code:1]
change to
[code:1]
$imgsize=getimagesize($mosConfig_absolute_path."/".$ZoomPath.$photo->catdir."/".$photo->imgfilename);
[/code:1]
line 106:
[code:1]
."<img src=\"images/zoom/$photo->catdir$thumbpath$thumbphoto\" border=\"0\" alt=\"\" title=\"".htmlentities(stripslashes($photo->imgdescr))."\" />"
[/code:1]
change to
[code:1]
."<img src=\"$ZoomPath$photo->catdir$thumbpath$thumbphoto\" border=\"0\" alt=\"\" title=\"".htmlentities(stripslashes($photo->imgdescr))."\" />"
[/code:1]

tested with CB1.0RC2, zoom 2.5b3 and zoom 2.5RC1.

Post edited by: mrhujun, at: 2005/12/21 14:39

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.120 seconds

Facebook Twitter LinkedIn