Update Zoom Plugin

17 years 2 weeks ago #32833 by laurie_lewis
Update Zoom Plugin was created by laurie_lewis
I am sorry I am sure this is not the correct place to upload this but I have added a parameter to the Zoom Plugin so that you can define the directory that you have placed the Zoom media files in. Did this after I moved them from the default location.

First go at it but it appeared to work for me.

Sorry about putting it up here.

Laurie

Attachment plug_zoom.zip not found


Laurie
My Community Site: thelewisfamily.id.au
Attachments:

Please Log in to join the conversation.

17 years 2 weeks ago #32858 by nant

Please Log in to join the conversation.

16 years 11 months ago #34944 by WingDude
Replied by WingDude on topic Re:Update Zoom Plugin
Nant,
We are currently deciding which Gallery plugin to use.
We need the following functionality:

# resize thumbnails
# build B & W thumbnail images
# comment photo
# rate photo
# Video thumbnails - Zoom has this feature
# CB plugin that works.
# Compatibility with tools such as imagemagik.

CAn you advise whether we can do all the above with CB Gallery
Regards

Please Log in to join the conversation.

16 years 11 months ago #34951 by folmolen
Replied by folmolen on topic Re:Update Zoom Plugin
I installed this version of the CB Zoom plugin. I got the tab but the pictures thumbs are not being shown although it indicates that they are there. The links of the pictures does work correctly. What to do??

Please Log in to join the conversation.

16 years 11 months ago #34962 by nant
Replied by nant on topic Re:Update Zoom Plugin
WingDude wrote:

Nant,
We are currently deciding which Gallery plugin to use.
We need the following functionality:

(1)# resize thumbnails
(2)# build B & W thumbnail images
(3)# comment photo
(4)# rate photo
(5)# Video thumbnails - Zoom has this feature
(6)# CB plugin that works.
(7)# Compatibility with tools such as imagemagik.

CAn you advise whether we can do all the above with CB Gallery
Regards



1 - sized during upload - no resizing afterwards
2 - nope
3 - nope
4 - nope
5 - nope
6 - dont need one
7 - yes

Please Log in to join the conversation.

16 years 9 months ago #39925 by SRTKOTA
Replied by SRTKOTA on topic Re:Update Zoom Plugin
Great work.. I'm running the 2.5.1 RC2 version because I found there were too many bugs in 2.5b3 with my server config.

I modified your code to make the thumblinks open to the full pic in a new window when clicked. I don't know if this will work with the 2.5b3 so proceed with caution. I'm also no coder by any means but it works for me quite nicely.

NOTE: If your Joomla installation is in a different folder than root, update the two instances of /images/zoom/.... to /yourjoomlafolder/images/zoom....

EDIT FILE /...comprofiler/plugin/user/plug_cbzoomtab/zoom.php

[code:1]<?php
/**
* Zoom Tab Class for handling the CB tab api
* @package Community Builder
* @author Unknown, PeterMixt, JoomlaJoe, Beat
*/
class getZoomTab extends cbTabHandler {
/**
* Constructor
*/
function getZoomTab() {
$this->cbTabHandler();
}
/**
* Generates the HTML to display the user profile tab
* @param object tab reflecting the tab database entry
* @param object mosUser reflecting the user being displayed
* @param int 1 for front-end, 2 for back-end
* @returns mixed : either string HTML for tab content, or false if ErrorMSG generated
*/
function getDisplayTab($tab,$user,$ui) {
global $database,$mosConfig_live_site,$acl,$my,$mosConfig_absolute_path;
$return="";
if(!file_exists('components/com_zoom/etc/zoom_config.php')){
return _UE_ZOOMNOTINSTALLED;
}
$params=$this->params;
$imgNumberPerPage = $params->get('imgNumberPerPage', '10');
$imgTextIfNoImg = $params->get('imgTextnoImg', _UE_NOZOOMIMGS);
$imgTextAbovePics = $params->get('imgTextAbovePics', _UE_ZOOMGALLERY);
if ($imgTextAbovePics == ""«») $imgTextAbovePics = " ";
$imgPhotoName = $params->get('imgPhotoName', '1');
$imgSortByAllowed = $params->get('imgSortByAllowed', 0);

$pagingParams = $this->_getPaging(array(),array("img_"«»));

if ($imgSortByAllowed != '1') $pagingParams["img_sortby"] = null;
switch ($pagingParams["img_sortby"]) {
case "category":
$order = "z.catname ASC, zf.imgdate DESC";
break;
case "hits":
$order = "zf.imghits DESC, zf.imgdate DESC";
break;
case "date":
default:
$order = "zf.imgdate DESC, zf.imghits DESC";
break;
}

$queryGet = "SELECT zf.imgid, zf.imgfilename, zf.imgname, zf.imgdate, zf.imghits, zf.imgdescr, zf.published, zf.catid, zf.uid, z.catdir, z.catname";
$queryCount = "SELECT COUNT(zf.imgfilename)";
$queryRest = "\n FROM #__zoomfiles zf"
. "\n INNER JOIN #__zoom z ON zf.catid=z.catid"
. "\n WHERE zf.uid=".$user->id;
$queryLimit = "\n ORDER BY ".$order
. "\n LIMIT ".($pagingParams["img_limitstart"]?$pagingParams["img_limitstart"]:"0"«»).",".$imgNumberPerPage;


$database->setQuery($queryCount.$queryRest);
$total = $database->loadResult();

if($total<1) {
if ($imgTextIfNoImg) {
if ($tab->description != null) $return .= "\t\t<div class=\"tab_Description\">".unHtmlspecialchars(getLangDefinition($tab->description))."</div>\n";
$return .= $imgTextIfNoImg;
}
return $return;
}

if ($tab->description != null) $return .= "\t\t<div class=\"tab_Description\">".unHtmlspecialchars(getLangDefinition($tab->description))."</div>\n";

$database->setQuery ($queryGet.$queryRest.$queryLimit);
$photos = $database->loadObjectList();

$database->setQuery("SELECT id FROM #__menu WHERE link = 'index.php?option=com_zoom' AND published=1"«»);
$Itemid = $database->loadResult();
if ($Itemid) $itemurl = "&Itemid=".$Itemid;
else $itemurl = "";

$ZoomPath =$params->get('ZoomPath') ;

if ($imgSortByAllowed) {
$return.= "<div class=\"cbZoomSorting\" style=\"margin-bottom:10px;\">".sprintf(_UE_CLICKTOSORTBY, ":"«»);
$return .= "<span style=\"margin:12px;\">".$this->_writeSortByLink($pagingParams,"img_","date",_UE_FORUMDATE,true)."</span>";
$return .= "<span style=\"margin:12px;\">".$this->_writeSortByLink($pagingParams,"img_","category",_UE_FORUMCATEGORY)."</span>";
$return .= "<span style=\"margin:12px;\">".$this->_writeSortByLink($pagingParams,"img_","hits",_UE_FORUMHITS)."</span>";
$return.= "</div>";
}

foreach ($photos as $photo) {
$thumbphoto = $photo->imgfilename;
$photoname = $photo->imgname;
$photoname = wordwrap($photoname, 8, "\n", 1);

$imgdir = $photo->catdir;
$thumbpath = "/thumbs/";

$return.= "<div class=\"containerBox\">";
$return.= "<a href=\"".sefRelToAbs("index.php?option=com_zoom".$itemurl."&catid=".$photo->catid)."\"><b>".$imgTextAbovePics."</b></a><br />";
$return.= "<a href=\"".sefRelToAbs("/images/zoom/".$photo->catdir."/".$thumbphoto)."\" target=\"u_blank\">"
."<img src=\"/images/zoom/$photo->catdir$thumbpath$thumbphoto\" border=\"0\" alt=\"\" title=\"".htmlentities(stripslashes($photo->imgdescr))."\" />"
."</a>\n";

if ($imgPhotoName == 1) {
$return.= "<br />".htmlentities(str_replace("\n"," ",stripslashes($photoname)))."\n";
}

$return.= "</div>";

}
$return .= "<div style=\"clear:both;\"> </div>";
if ($imgNumberPerPage < $total) {
$return .= "<div style='width:95%;text-align:center;'>"
.$this->_writePaging($pagingParams, "img_", $imgNumberPerPage, $total)
."</div>";
}
return $return;
}
} // end class getZoomTab.

?>[/code:1]

Post edited by: SRTKOTA, at: 2007/06/22 07:19

Post edited by: SRTKOTA, at: 2007/06/22 07:20

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.258 seconds

Facebook Twitter LinkedIn