Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 Next > End >>
thumbnail could links to images, not gallery
Date: 2005/12/08 08:12 By: Viames Status: User  
Karma: 4  
Senior Joomlapolitan

Posts: 63
graphgraph
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
Click here to see the profile of this user 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: 242  
Admin

Posts: 4063
graphgraph
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
Click here to see the profile of this user 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
graphgraph
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!)
Click here to see the profile of this user 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
graphgraph
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.
Click here to see the profile of this user 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
graphgraph
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!
Click here to see the profile of this user The administrator has disabled public write access.

Re:thumbnail could links to images, not gallery
Date: 2006/06/04 00:25 By: ndee Status: CB Doc subscriber  
Karma: 7  
Expert Joomlapolitan

Posts: 145
graphgraph
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
Click here to see the profile of this user The administrator has disabled public write access.

<< Start < Prev 1 2 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login