The only thing to change is to show description instead of title. Which file do I have to edit to change the query?
Description in Magnific Image popup
-
ruster1969
- Phoca Member

- Posts: 36
- Joined: 28 Aug 2015, 09:36
Description in Magnific Image popup
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?
The only thing to change is to show description instead of title. Which file do I have to edit to change the query?
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Description in Magnific Image popup
Hi, did you try to set "Alt Title" value in Options?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
ruster1969
- Phoca Member

- Posts: 36
- Joined: 28 Aug 2015, 09:36
Re: Description in Magnific Image popup
Hi Jan!Jan wrote:Hi, did you try to set "Alt Title" value in Options?
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...
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Description in Magnific Image popup
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
Jan
If you find Phoca extensions useful, please support the project
-
ruster1969
- Phoca Member

- Posts: 36
- Joined: 28 Aug 2015, 09:36
Re: Description in Magnific Image popup
I'm stuck with that problem, can't solve that 
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Description in Magnific Image popup
Hi, edit this file:
components\com_phocagallery\views\category\view.html.php
line cca 1482
FROM:
TO:
And in Options - in Tab Detail Window: Display Description In Detail View: Show Lightbox
Jan
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);
}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);
}Jan
If you find Phoca extensions useful, please support the project
-
ruster1969
- Phoca Member

- Posts: 36
- Joined: 28 Aug 2015, 09:36
Re: Description in Magnific Image popup
Hi Jan,
it works if I remove the first condition:
Are there any problems/contraindications?... 
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);
}- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Description in Magnific Image popup
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
Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Description in Magnific Image popup
Hi, added to 4.2.2
Jan
Jan
If you find Phoca extensions useful, please support the project