Page 1 of 1

Description in Magnific Image popup

Posted: 06 Sep 2015, 13:03
by ruster1969
I realized that the best compromise IMHO for Detail Window popup between desktop and mobile screens is Magnific Image (only).
The only thing to change is to show description instead of title. Which file do I have to edit to change the query? :?

Re: Description in Magnific Image popup

Posted: 09 Sep 2015, 00:55
by Jan
Hi, did you try to set "Alt Title" value in Options?

Jan

Re: Description in Magnific Image popup

Posted: 06 Oct 2015, 10:58
by ruster1969
Jan wrote:Hi, did you try to set "Alt Title" value in Options?

Jan
Hi Jan!
You mean to set "Description" in Options > General Settings >Alt Value ? That's not I want to do. I refer to Detail View > Detail Window > Magnific option.
If I set "Show" in Detail View > Description Settings nothing changes, only title is shown.

I guess the file to edit is /components/com_phocagallery/assets/magnific/jquery.magnific-popup.min.js but I'm not good at JS...

Re: Description in Magnific Image popup

Posted: 07 Oct 2015, 23:35
by Jan
Hi, some of the javascript popup methods take the ALT value as text which is displayed below the image (e.g. as title or as description)

Jan

Re: Description in Magnific Image popup

Posted: 20 Oct 2015, 16:09
by ruster1969
I'm stuck with that problem, can't solve that :-(

Re: Description in Magnific Image popup

Posted: 22 Oct 2015, 00:38
by Jan
Hi, edit this file:

components\com_phocagallery\views\category\view.html.php

line cca 1482

FROM:

Code: Select all

if ($this->tmpl['detail_window'] == 8 && $this->tmpl['displaydescriptiondetail'] > 0) {
				$this->items[$iS]->odesctitletag = strip_tags($titleDesc).strip_tags($this->items[$iS]->description);
			} else {
				$this->items[$iS]->odesctitletag = strip_tags($imgTitle);
			}
TO:

Code: Select all

if (($this->tmpl['detail_window'] == 8 || $this->tmpl['detail_window'] == 12) && $this->tmpl['displaydescriptiondetail'] > 0) {
				$this->items[$iS]->odesctitletag = strip_tags($titleDesc).strip_tags($this->items[$iS]->description);
			} else {
				$this->items[$iS]->odesctitletag = strip_tags($imgTitle);
			}
And in Options - in Tab Detail Window: Display Description In Detail View: Show Lightbox

Jan

Re: Description in Magnific Image popup

Posted: 28 Oct 2015, 16:04
by ruster1969
Hi Jan,
it works if I remove the first condition:

Code: Select all

if ($this->tmpl['displaydescriptiondetail'] > 0) {
		$this->items[$iS]->odesctitletag = strip_tags($titleDesc).strip_tags($this->items[$iS]->description);
	} else {
		$this->items[$iS]->odesctitletag = strip_tags($imgTitle);
	}
Are there any problems/contraindications?... :idea:

Re: Description in Magnific Image popup

Posted: 06 Nov 2015, 20:57
by Jan
Hi, no, it is just about output, no function, so you can customize it by your needs and it does not any influence on other function, etc.

Jan

Re: Description in Magnific Image popup

Posted: 07 Dec 2015, 02:11
by Jan
Hi, added to 4.2.2

Jan