Page 1 of 2

Display latest category

Posted: 18 Feb 2010, 11:07
by bubble
Hi !

Thanks a lot for this great job ! PhocaGallery is really great !

I am using the Image Module.
I would like to use it in order to display the latest category on my homepage : I would like to display one of the image of this category, but also the name of this category.
For the moment, I can just display the lastest image of my Phocagallery (using "date descending" in the module)

Thanks for any help !
Bubble
website : http://ecolepourtousaucambodge.org

Re: Display latest category

Posted: 18 Feb 2010, 13:38
by reko
Hi bubble,
at the moment it's not possible to display the category name (without editing the code) :(
regards,
rk

Re: Display latest category

Posted: 19 Feb 2010, 13:23
by bubble
hello,

thanks for your answer !

I imagine the modification of the code is not very complicated no ?

Is someone has ever done this kind of thing ?

++
Bubble

Re: Display latest category

Posted: 19 Feb 2010, 13:44
by reko
no probably not. I don't remember reading something about that in the forum, but try searching for it

since you can set the image-link to directs visitors to the category of the image, the information is already there. maybe thats the point to start looking?

it would be great if you could post any results you achieve!
thx,
rk

Re: Display latest category

Posted: 22 Feb 2010, 18:18
by bubble
hello,

So, I managed to do it like this (in a very crude way !!) :

1) I edit : /www/modules/mod_phocagallery_image/mod_phocagallery_image.php

2) Line 523, I add to the SQL query : cc.title as titlecat (in SELECT ....)
Now in *->titlecat, you have the name of the category of the image.

3) For my own purpose, I add this :
line 831 : $output[$i] .= "<center>$valueImages->titlecat</center>";

So the name of the category is displayed below the image

Example : http://ecolepourtousaucambodge.org/
(top right column)

Well, it could be great to add this as a parameter of the module.
Is someone could give me any help for this ?

thanks !

Bubble

Re: Display latest category

Posted: 23 Feb 2010, 00:34
by reko
great, thank you!

Jan is the only developer for the phoca extension, maybe he can help you, or add it to one of the next releases.

Re: Display latest category

Posted: 23 Feb 2010, 09:15
by bubble
ok, I hope Jan will see these posts... :wink:

Re: Display latest category

Posted: 26 Feb 2010, 14:21
by Jan
Hi, sorry I don't understand, in image module, you can set the category :idea:

Re: Display latest category

Posted: 26 Feb 2010, 14:36
by reko
Hi Jan, above we where talking about the possibility to show the name of the category the displayed image belongs to.
Regards,
rk

Re: Display latest category

Posted: 26 Feb 2010, 15:10
by Jan
Hi,

I have answered the first sentence:
I would like to display one of the image of this category
I would like to display one of the image of this category, but also the name of this category.
For the moment, I can just display the lastest image of my Phocagallery (using "date descending" in the module)
The second - yes there is no such feature yet :-(,
this needs to be customized in the module. For now I have no info what should be customized as I didn't do such modifications yet.

But in the module there should be loaded the info about category so this then should be pasted below the images, e.g.

echo '<div>'. info about category (I don't know the variable (object) name yet as I am not on my PC now :-( .'</div>';

Jan