thumbnail could links to images, not gallery

13 years 7 months ago #1589 by Viames
Hey guys, I'm enjoying this nice plugin ... thank you! :-D

I'm wondering why thumbnail of an image links to the image's gallery, instead that his normal-size image directly!

Also, images can shows the gallery name on the link, because it advice users of where it goes :)

CB italian translation & testing
translations on joomla.it
homesites: Viames.it , Crotone on Web
13 years 7 months ago #1650 by beat
It's because the way zoom component works, getting directly to the image requires a lot of SQL request for each image, to simulate Zoom's image access just to compute the URL !

If I understand it right, an image can't be displayed directly with its id, but as a given picture on a given page of a given gallery/view.

Trail has tried this out, but we decided to not include these massive SQL requests into the release (remember this would have been at each profile display).

Actually, these things should be for the Zoom dev team: to do some little changes to allow this more easier and less SQL-intensive.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
13 years 5 months ago #4161 by majidmx
dear friends ,
I has the same problem , and it was necccesary for me , so I my self started to solve it ,
here is the solution :

1.in the following file :
../components/com_profiler/plugin/user/plug_cbzoomtab/zoom.php

replace line :( nearly line 108 )
$return.= "<a href=\"".sefRelToAbs("index.php?option=com_zoom".$itemurl."&catid=".$photo->catid)."\">"

with this one :
$return.= "<a href=\"".sefRelToAbs("index.php?option=com_zoom".$itemurl."&page=mmx_cb&catid=".$photo->catid)."&key={$photo->imgid}&mmxPicID={$photo->imgid}\">"


and in this file :
../components/com_zoom/zoom.php

exactly after this line (nearly line 101):
switch($page)

add these lines :

//majidmx (majidfn@yahoo.com) => added these lines so we can view the images directly from cb , by clicking on their thumbnail in zoom tab in CB
//All rights reserverd to MajiD Fatemian (majidfn@yahoo.com)
case 'mmx_cb':
$mmxPicID=mosGetParam($_REQUEST,'mmxPicID',NULL);
$mmxPicCatID=mosGetParam($_REQUEST,'catid');
for($i=0;$i<count($zoom->_gallery->_images);$i++){
$zoom->_gallery->_images[$i]->getInfo();
if($zoom->_gallery->_images[$i]->_id==$mmxPicID){
mosRedirect("?option=com_zoom&page=view&catid={$mmxPicCatID}&key={$i}");
}
}
break;
//end of majidmx(majidfn@yahoo.com)


I hope it helps you :)
regards
MajiD Fatemian
senior web developer
majid@parspake.com (majidfn@Y!)
13 years 5 months ago #5471 by revo2001
Did the above "fix" help? Would be really cool for me and users of my website to be able to directly link to the photos. My intention with my site is to make it so my users dont have to use a photo storage web site. Benefit to them is definitely being able to link other users directly to a photo, not just the gallery.
13 years 5 months ago #5765 by majidmx
Dear friend ...
It works correctly . just try it .
Zoom media gallery previewing images doesn't work with ID of images , just by knowing the algorithm , you can do it your self too .
take a deeper look at code and you'll find .
regards
MajiD Fatemian
majidfn@Y!
13 years 1 month ago #14630 by ndee
Hi majidmx,

thank you for your piece of code. It did not work for me with zoom 2.5 RC1 until I escaped the quotes in com_comprofiler/plugin/user/plug_cbzoomtab/zoom.php
[code:1]$return.= "<a href=\"".sefRelToAbs("index.php?option=com_zoom".$itemurl."&page=mmx_cb&catid=".$photo->catid)."&key={$photo->imgid}&mmxPicID={$photo->imgid}\">"[/code:1]

I also got the hitcounter working by changing the last line of your hack in components/com_zoom/zoom.php
[code:1]mosRedirect("?option=com_zoom&page=view&catid={$mmxPicCatID}&key={$i}&hit=1"«»);[/code:1]

I also had my own solution with some logic of the zoom module mod_zoom_pics. It is working without modifying the components/com_zoom/zoom.php and no additional database queries. But I am not sure if the paging is working correctly. I may post it here if my php skills are better and I exactly know what I am doing
:laugh:

greets
ndee

ps: give majidmx some karma!

Post edited by: ndee, at: 2006/06/03 18:26

###################
SPEED UP HELP, read first: Help us help you
###################
Moderators: beatnantkrileon
Time to create page: 0.413 seconds
Facebook Twitter Google LinkedIn