Announcement

  •  » Themes
  •  » [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

#241 2018-01-30 08:42:45

teekay
Member
2013-06-12
313

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

elece wrote:

Hi,

I have a little problem and I'll be grateful if someone can help...

(sorry, I'm not sure if opening a new topic or add this as a reply to main Darkroom theme thread)

After updating the theme yesterday, I noticed the carousel in homepage (with the script of Tom Kuther using Piwigo API to load the newest 10 images) stopped working.

It looks that the line:
var pwg_api = "/ws.php?format=json&method=pwg.categories.getImages&recursive=true&per_page=10&recursive=true&order=date_available%20desc";
is getting a 404 error.
I tested some things, as putting the absolute path of ws.php, purge compiled templates, change permissions of ws.php... but without any results.
Maybe it is related to some PHP configuration in my server? I'm completely lost.
Thank you!

site: www.elece.net/galeria
Piwigo 2.9.2
OS: Linux
PHP: 7.1.13
MySQL: 5.6.38 [2018-01-28 02:08:26]
Graphic library: ImageMagick 6.9.4-10

On your site it should work with /galeria/ws.php. Check the javascript console for errors if it doesn't.

Offline

 

#242 2018-01-30 08:48:43

teekay
Member
2013-06-12
313

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

PolyWogg wrote:

I confess upfront that I'm not sure if this is a "theme" issue or a "core" issue. I'm running BS Darkroom, everything more or less works (occasionally Admin Tools wants to reset me back to a preview of another theme, but I don't think that is a theme issue).

The one thing I can't figure out is field placement on the Album Page or the Photo Page. I would like the photo caption on my Album Page and Photo pages to be the same -- but Album Page puts the title below the photo while the Photo Page puts the Description there.

Which leaves me with five options:

a. Enter the same thing in the title and description manually when I upload every time;

b. Come up with some sort of CSS or HTML / plugin code that tells the core to copy the title into the description or the description into the title every time it loads a page;

c. Modify the Album page layout so it shows the description as caption instead of the Title;

d. Modify the Photo page layout so it shows the title as caption instead of the Description; or,

** e. Modify the Photo page layout so it shows BOTH the title and the Description as caption.

My preference would be E, as it would allow me to enter a title for most photos and it would show up everywhere, and if I had a longer description for a photo, it would show up too but only on the Photo page.

However, when I look at the TPL files, it doesn't seem to me that this is a theme solution. Anyone know where I should be looking?

Paul
aka PolyWogg

I think E is a good idea, and maybe make it configurable via theme settings

Offline

 

#243 2018-01-30 21:44:59

PolyWogg
Member
2014-08-17
49

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

>>> ** e. Modify the Photo page layout so it shows BOTH the title and the Description as caption.

>>I think E is a good idea, and maybe make it configurable via theme settings

I agree completely. :) Except I have NO idea how to even start.

I can't even figure out if this is code that is buried in the core, or if it is set by the theme. I'd be fine to even just add / edit some code manually to YOUR theme, but I can't find any code that even remotely looks like it is posting the description or title. The funny part is a couple of other themes DO merge them, but in the album page. Yet even there I can't figure out how they do it.

Sigh. Looks like I'm stuck with A for now.

P.

Offline

 

#244 2018-01-30 23:25:55

PolyWogg
Member
2014-08-17
49

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

So I found picture. tpl, and the refs to description include:

     data-description="{$thumbnail.DESCRIPTION}"

in two places. I could change that to $thumbnail.NAME. That would be telling it that the description never gets displayed, I think, just that the field will be the name/title field. It also exists in index.TPL


Although perhaps I'd be better off trying it as "data-description="{$thumbnail.NAME}" & "{$thumbnail.DESCRIPTION}" ??

P.

Offline

 

#245 2018-02-01 13:33:11

teekay
Member
2013-06-12
313

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

PolyWogg wrote:

So I found picture. tpl, and the refs to description include:

     data-description="{$thumbnail.DESCRIPTION}"

in two places. I could change that to $thumbnail.NAME. That would be telling it that the description never gets displayed, I think, just that the field will be the name/title field. It also exists in index.TPL


Although perhaps I'd be better off trying it as "data-description="{$thumbnail.NAME}" & "{$thumbnail.DESCRIPTION}" ??

P.

The text below the main image is set in [Github] piwigo-bootstrap-darkroom file template/picture.tpl@L38

No idea why the variable is called $COMMENT_IMG, but it's the description. If you replace the two $COMMENT_IMGs with $current.TITLE it should do what you want for now.

The data-description stuff is for the PhotoSwipe slideshow.

Last edited by teekay (2018-02-01 13:37:58)

Offline

 

#246 2018-02-03 06:24:08

PolyWogg
Member
2014-08-17
49

Re: [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

>> If you replace the two $COMMENT_IMGs with $current.TITLE it should do what you want for now.

YES! That works perfectly! Thank you, thank you, thank you!

I *never* would have figured that out. (Comment???? is description but description is not...umm, okay!)

Paul
aka lazy uploader who only wants to put the title in

Offline

 
  •  » Themes
  •  » [Theme] Bootstrap Darkroom (w/ PhotoSwipe, HTML5 video & more)

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact