|
|
thumbnail could links to images, not gallery
|
|
Date: 2005/12/08 08:12
|
By: Viames
|
Status: User
|
|
|
Karma: 4  
|
|
Senior Joomlapolitan  | Posts: 63 |   | |
|
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 homesite: Crotone on Web
|
|
The administrator has disabled public write access. |
|
|
|
Re:thumbnail could links to images, not gallery
|
|
Date: 2005/12/09 02:30
|
By: beat
|
Status: Admin
|
|
|
Karma: 231  
|
|
Admin  | Posts: 3631 |   | |
|
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 - Developer on Community Builder core Team - If you like CB and this forum, you will love Nick's CB 1.1 reference manual ! : Click here to Get it now  - Would like to help us move faster ? Get it, and/or help us spend more time coding by helping others in this forum, many thanks
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:thumbnail could links to images, not gallery
|
|
Date: 2006/01/18 21:58
|
By: majidmx
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 3 |   | |
|
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!)
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:thumbnail could links to images, not gallery
|
|
Date: 2006/02/03 13:30
|
By: revo2001
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 7 |   | |
|
|
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.
|
|
The administrator has disabled public write access. |
|
|
|
|
Re:thumbnail could links to images, not gallery
|
|
Date: 2006/02/08 02:58
|
By: majidmx
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 3 |   | |
|
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!
|
|
The administrator has disabled public write access. |
|
|
|
Re:thumbnail could links to images, not gallery
|
|
Date: 2006/06/04 00:25
|
By: ndee
|
Status:
|
|
|
Karma: 6  
|
|
Expert Joomlapolitan  | Posts: 143 |   | |
|
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: | $return.= "<a href=\"".sefRelToAbs("index.php?option=com_zoom".$itemurl."&page=mmx_cb&catid=".$photo->catid)."&key={$photo->imgid}&mmxPicID={$photo->imgid}\">"
|
I also got the hitcounter working by changing the last line of your hack in components/com_zoom/zoom.php
| Code: | mosRedirect("?option=com_zoom&page=view&catid={$mmxPicCatID}&key={$i}&hit=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
greets
ndee
ps: give majidmx some karma!
Post edited by: ndee, at: 2006/06/03 18:26
|
|
The administrator has disabled public write access. |
|
|