Announcement

#1 2018-04-06 14:40:58

BillWill
Member
2018-04-06
4

include php sitewide header, change display orientation per album

Hello-

Been searching, documentation on extensions and themes, as well as the forum, but could not find the answers.

1.  How is the view changed for individual albums so that the thumbnails for one album displays landscape images, and another displays portrait?  I tried on a test install, and the portraits thumbs are displayed cut off in a landscape format.

2.  How can an existing php header and footer be displayed on PW pages so they are consistent with the rest a site?  Tried the usual php code in the dark bootstrap theme, and as you already know, it did not work.  How is a normal php include rewritten for Smarty?

Thanks,
bw

Last edited by BillWill (2018-04-06 14:44:17)

Offline

 

#2 2018-04-13 15:18:51

Dagwood
Member
2018-03-30
1

Re: include php sitewide header, change display orientation per album

I have no clue, but would like to know this as well.

I suspect it is extremely simple if you either know where to put something as common as a php include or else know where to put it and translate the include from php to smarty.

Offline

 

#3 2018-04-13 21:17:19

teekay
Member
2013-06-12
427

Re: include php sitewide header, change display orientation per album

There is too less info about what exactly you're trying to achieve and what you've tried so far.
Piwigo is a standalone webapp, so there is no "rest of the site". Piwigo is the site, the rest is another site.
If you want them to look identical, you need to override stylesheets and maybe create a child theme so you can move stuff around, or integrate Piwigo into your main site using the API.

Last edited by teekay (2018-04-13 21:21:58)

Offline

 

#4 2018-04-19 19:13:08

BillWill
Member
2018-04-06
4

Re: include php sitewide header, change display orientation per album

Thanks teekay.  Nice to hear more than crickets.  :)

The goal is to incorporate PW into an already existing website as a subdirectory.  Every page in the existing site has the same header and footer so when an update is made to either file, each of the two files just has to be done once.  The header in particular is essential, as it contains the favicons, custom css, etc.  I have had no trouble including these two files with other standalone webapps, just PW.

I looked at the dark bootstrap theme, since the pre-existing site uses bootstrap.  I see files included using smarty code, so I would suppose that could be used to add the header.  The header and footer files are in a subdirectory in root, on the same level as PW.

I also see in the core files that normal php includes are used.  However, I would rather not change those files if I can do it using either a template or an existing plugin.  But if that is the only way to accomplish what I want, then knowing which core file to use would be helpful.

The second question, how to change the thumbnail display orientation of different albums, so one displays landscape images, and another displays portrait?  Currently, they all display landscape.  As a result, the thumbnails for photos with portrait orientation are cut off at the top and bottom.  The photos themselves display correctly.

Hope this clarifies.

Offline

 

#5 2018-04-19 23:53:40

teekay
Member
2013-06-12
427

Re: include php sitewide header, change display orientation per album

BillWill wrote:

Thanks teekay.  Nice to hear more than crickets.  :)

The goal is to incorporate PW into an already existing website as a subdirectory.  Every page in the existing site has the same header and footer so when an update is made to either file, each of the two files just has to be done once.  The header in particular is essential, as it contains the favicons, custom css, etc.  I have had no trouble including these two files with other standalone webapps, just PW.

I looked at the dark bootstrap theme, since the pre-existing site uses bootstrap.  I see files included using smarty code, so I would suppose that could be used to add the header.  The header and footer files are in a subdirectory in root, on the same level as PW.

I also see in the core files that normal php includes are used.  However, I would rather not change those files if I can do it using either a template or an existing plugin.  But if that is the only way to accomplish what I want, then knowing which core file to use would be helpful.

Hmm, the header template is template/header.tpl and the footer is template/footer.tpl
You could create template overrides by copying those to template-extensions/, editing to your liking, and create the override in Administration -> Configuration -> Templates. Or in a child theme.

The second question, how to change the thumbnail display orientation of different albums, so one displays landscape images, and another displays portrait?  Currently, they all display landscape.  As a result, the thumbnails for photos with portrait orientation are cut off at the top and bottom.  The photos themselves display correctly.

That's not possible using bootstrap darkrooms default grid layout. They are all landscape orientation while respecting the "center of interest" feature. But plugins like gdThumb or GThumb+ do respect the orientation and aspect ratio. Maybe take a look at those.

Last edited by teekay (2018-04-20 00:02:39)

Offline

 

#6 2018-04-20 14:12:54

BillWill
Member
2018-04-06
4

Re: include php sitewide header, change display orientation per album

Thanks.  I'll try to figure out how to implement your advice on the first, and look for a bootstrap theme that isn't as restrictive for your second advice.  Have a good one!

Last edited by BillWill (2018-04-20 14:13:27)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact