Display latest category

Phoca Gallery modules - modules for Phoca Gallery extension
bubble
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Feb 2010, 15:56

Display latest category

Post 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
http://ecolepourtousaucambodge.org
(French school in Kep, Cambodia)
reko
Phoca Professional
Phoca Professional
Posts: 407
Joined: 29 Dec 2008, 22:06

Re: Display latest category

Post by reko »

Hi bubble,
at the moment it's not possible to display the category name (without editing the code) :(
regards,
rk
bubble
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Feb 2010, 15:56

Re: Display latest category

Post 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
http://ecolepourtousaucambodge.org
(French school in Kep, Cambodia)
reko
Phoca Professional
Phoca Professional
Posts: 407
Joined: 29 Dec 2008, 22:06

Re: Display latest category

Post 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
bubble
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Feb 2010, 15:56

Re: Display latest category

Post 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
http://ecolepourtousaucambodge.org
(French school in Kep, Cambodia)
reko
Phoca Professional
Phoca Professional
Posts: 407
Joined: 29 Dec 2008, 22:06

Re: Display latest category

Post 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.
bubble
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 16 Feb 2010, 15:56

Re: Display latest category

Post by bubble »

ok, I hope Jan will see these posts... :wink:
http://ecolepourtousaucambodge.org
(French school in Kep, Cambodia)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Display latest category

Post by Jan »

Hi, sorry I don't understand, in image module, you can set the category :idea:
If you find Phoca extensions useful, please support the project
reko
Phoca Professional
Phoca Professional
Posts: 407
Joined: 29 Dec 2008, 22:06

Re: Display latest category

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Display latest category

Post 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
If you find Phoca extensions useful, please support the project
Post Reply