Tag visibility and Colour

Phoca Gallery - image gallery extension
quiggles
Phoca Member
Phoca Member
Posts: 18
Joined: 22 Feb 2011, 02:25

Tag visibility and Colour

Post by quiggles »

Is there a way of creating an override for which tags are shown?

For instance I use Phoca Gallery for my wife's art at https://www.quigleyarts.co.uk/gallery. Each image is tagged and that's useful for a status like sold or prints available, but I'd like to add some hidden tags like the year it was painted or subject matter.

I could then use the hidden tags to create the static tab urls like the sold page at https://www.quigleyarts.co.uk/gallery/category/?tagid=1.

It would also be great if tags could have a certain colour assigned as well - so "sold" is red, "available" is blue etc? Is this possible as an override, or is that a feature request?

Thanks!

Using Joomla 3.9.18 and Phoca Gallery 4.3.18
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Tag visibility and Colour

Post by christine »

Hi,
quiggles wrote: 01 May 2020, 12:53 It would also be great if tags could have a certain colour assigned as well - so "sold" is red, "available" is blue etc? Is this possible as an override, or is that a feature request?
I don't know. But I tried an example from your URL, with html div class & CSS formatting (temporary):

Code: Select all

<div class="pg-cv-tags1"><span>Not For Sale</span> </div>
<div class="pg-cv-tags2"><span>Sold</span> </div>

Code: Select all

.pg-cv-tags1 {
color: lightgreen;
text-align: right;
font-weight: bold;
}
.pg-cv-tags2 {
color:red;   
text-align:right;    
}
Image

Kind regards
Christine
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tag visibility and Colour

Post by Jan »

Hi, the tags are rendered in this file:

components\com_phocagallery\views\category\tmpl\default_images.php - line cca 481, unfortunately as default, there is no identifiying of different tag.

I will add to next version, the code can be now changed here:

administrator\components\com_phocagallery\libraries\phocagallery\tag\tag.php - line cca 124

FROM:

Code: Select all

$o .= '<span>';
TO:

Code: Select all

$o .= '<span class="ph-tag-'.(int)$v->id.'">';
Then each tag will have another class:
Image

BTW: Maybe your needs on your site can be better solved by Phoca Cart component because it includes more advanced tag system including filtering and searching (tags, labels, parameters can be added and they can be differently displayed, etc.). Including the fact, that you can display price for some items, for another not (not for sale). Even you can have order or ask a question button, etc. etc. See example (displaying images, filtering tags, prices, descriptions, ask a question, etc.)

https://www.phoca.cz/jtd/

Jan
If you find Phoca extensions useful, please support the project
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: Tag visibility and Colour

Post by christine »

Ah I see: <span> of the tag is unfortunately not generated in view or in layout, so you cannot override it with a template.
Thanks Jan :-)

Christine
quiggles
Phoca Member
Phoca Member
Posts: 18
Joined: 22 Feb 2011, 02:25

Re: Tag visibility and Colour

Post by quiggles »

Thanks Jan. Although the site references sold and unsold, we don't actually sell from the site because of agreements with galleries.

However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
quiggles
Phoca Member
Phoca Member
Posts: 18
Joined: 22 Feb 2011, 02:25

Re: Tag visibility and Colour

Post by quiggles »

Thanks Jan. That code works exactly as I needed - appreciate it!

Although the site references sold and unsold, we don't actually sell from the site because of agreements with galleries.

However I take your point that Phoca Cart may suit the requirements better - however, does that mean completely setting it up again or is there some transfer capability?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49138
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tag visibility and Colour

Post by Jan »

Hi, yes, Phoca Cart is just another component, so it needs to be done everything from scratch. Phoca Cart even works like catalogue so there is option to not sell anything by Phoca Cart. But as written above, filtering and tag system is much more improved.

Jan
If you find Phoca extensions useful, please support the project
Post Reply