Description in Magnific Image popup

Phoca Gallery - image gallery extension
ruster1969
Phoca Member
Phoca Member
Posts: 36
Joined: 28 Aug 2015, 09:36

Description in Magnific Image popup

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

Re: Description in Magnific Image popup

Post by Jan »

Hi, did you try to set "Alt Title" value in Options?

Jan
If you find Phoca extensions useful, please support the project
ruster1969
Phoca Member
Phoca Member
Posts: 36
Joined: 28 Aug 2015, 09:36

Re: Description in Magnific Image popup

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

Re: Description in Magnific Image popup

Post 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
If you find Phoca extensions useful, please support the project
ruster1969
Phoca Member
Phoca Member
Posts: 36
Joined: 28 Aug 2015, 09:36

Re: Description in Magnific Image popup

Post by ruster1969 »

I'm stuck with that problem, can't solve that :-(
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Description in Magnific Image popup

Post 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
If you find Phoca extensions useful, please support the project
ruster1969
Phoca Member
Phoca Member
Posts: 36
Joined: 28 Aug 2015, 09:36

Re: Description in Magnific Image popup

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

Re: Description in Magnific Image popup

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Description in Magnific Image popup

Post by Jan »

Hi, added to 4.2.2

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