Page 1 of 2

Link to category in detailed view

Posted: 21 Jul 2011, 11:17
by axtolf
Hi, there is a way to dislay in deailed view, the category from the image is taken?
I'm using the random option of the module, according to the settings that I'm usign, clicking on a image results in opening the image or display the category.
The first method (opening the image) show the image that the user wants to view, but has no possibility do tell to the user where the image is. So if the user get attracted from the image and wants to view all the other, can't understand where the image is.
The second method, open the category, but the image clicked could be one in 1000 in the same category, and user get confused about it, because he cannot simply find the image that was clicked.

Reading : https://www.phoca.cz/documents/50-phoca/ ... al-advices , point 8 I understand that the methods to display the image that use iframe, have code that can be modified.
No popup method insert a image (an arrow) that bring the user to the category where the image is taken.
There is a way to insert the same thing in the other methods, like modal box for example? Could you please give me, if possible, details about the file/s that I have to modify?
Thank you

Re: Link to category in detailed view

Posted: 21 Jul 2011, 22:19
by Jan
Hi, you can set it in parameters of the module, which method will be used?

Re: Link to category in detailed view

Posted: 21 Jul 2011, 23:13
by axtolf
usually Modal box

Re: Link to category in detailed view

Posted: 22 Jul 2011, 22:04
by Jan
If Modal box (not Modal box image only), then the detail get arrows to next and previous images in the category (but there cannot be any remember function which image was clicked as clicking on next or previous, the site is reloaded - which then enables the possibility to display all images in the category without memory problems.

Jan

Re: Link to category in detailed view

Posted: 22 Jul 2011, 22:21
by axtolf
Hi Jan, I'm sorry but I didn't understand you explanation... could you please try to help me better? Thank you and sorry

Re: Link to category in detailed view

Posted: 22 Jul 2011, 22:35
by Jan
Hi, I think, I cannot explain it better :-(, maybe try to ask simple question so I can answer it simple (not a humour but maybe the best solution to explain it better :-) )

Jan

Re: Link to category in detailed view

Posted: 24 Jul 2011, 20:00
by axtolf
It's not clear to me from you explanation if there is a possibility to insert in the modal box a link to category view.
I understood that, when the user click next or back, all is reloaded and so it's not possible to understand where he started to see. But for me the way to add a link to the category where the image is form , is enough.
I took a fast look to the code of the modal box, but i can't understand where and how to put the link...

Re: Link to category in detailed view

Posted: 25 Jul 2011, 17:06
by Jan
Hi, if the modal box is ifram, you can paste there a link to category, but you need to paste there a javascript code to close the modal box too.

You can find the view and its functions:

components/com_phocagallery/views/detail/view.html.php
components/com_phocagallery/views/detail/tmpl/default.php

Jan

Re: Link to category in detailed view

Posted: 23 Aug 2011, 14:24
by axtolf
Hi, sorry for the delay in response, but job took all my time..:-(

I'm not very smart with the code, so I took a look, but I didn't succeded to understand how to do what I need with you suggestion.

In default.php I understood what you use something that is declared in view.html.php. So for example, the nextbutton is declared in the file in this way:
$item->nextbutton = $detailButton->getNext((int)$item->catid, (int)$item->id, (int)$item->ordering);
(line 144).

I didn't understand how to obtain the code to have the category name, something similar to:

$item->something = $something->$catid;

I guess, but i can't understand wich is the right thing to write down in the code...
I know that this is not a bug, but pratically, a feature request... anyway your help will be very appreciated again.

Re: Link to category in detailed view

Posted: 25 Aug 2011, 18:01
by Jan
Hi, I think, you then need to upload some information from category table, now the info is only from image table.