#1 2019-08-08 08:09:02

ashonus
Member
2019-08-07
2

How to display PHP snippet on gallery?

This is the code which I want to show up on every page in my gallery:

Code:

<?php include('/stuff.php'); ?>

The page banner area in admin config seems like the perfect spot for my code but PHP won't work. From my experience Javascript and plain text does work there.

The next best thing would be to edit the header.tpl in the theme I'm using. I understand that .tpl files contain Smarty code. I tried SmartyBC and failed. Failed perhaps due to file name and file not in the right folder.

Does anyone have a solution for what I want to achieve?

Piwigo version: 2.9.5
PHP version: 5.6.40
MySQL version: 5.5.5-10.0.38-MariaDB-cll-lve

Offline

 

#2 2019-08-08 08:30:08

nicolas
Former Piwigo Team
2004-12-30
1233

Re: How to display PHP snippet on gallery?

You should consider making a small plugin to use the appropriate hook to include your code in the right place.

Offline

 

#3 2019-08-10 04:24:33

ashonus
Member
2019-08-07
2

Re: How to display PHP snippet on gallery?

Is there someone willing to write a plugin for me?

I just want my code to appear above the page banner area.

Last edited by ashonus (2019-08-12 09:52:44)

Offline

 

Board footer

Powered by FluxBB

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