Topic Closed
tyee
24 Posts

I'm trying to add an external photo gallery to one of my pages. I have to do the two following things -

- add this in the head area    <?php include_once("...../include.php"); ?>

- add this in the body area     <div class="gallery" title="gal"></div>

 

I tried adding both of them to the template I want my gallery in but the php include tag was removed when I look at the source after loading the page.

How can I do this?

12 years ago#3221

tyee
24 Posts

I used an IFrame to do it but am wondering if there is an easier way?

12 years ago#3222

Josh S.
2K Posts
313K Downloads
16 Themes
18 Plugins

I tried adding both of them to the template I want my gallery in...

You'd need to edit the template.php file of the theme you're using to add php. Take a look in the /themes folder for the name of the theme you're using.

12 years ago#3227

tyee
24 Posts

Hi Josh

  I did try, and I thought I was in the right folder, it was in data/_themes/magw204. The theme was one I downloaded so am I pretty sure I am looking in the right spot?

One other question, when i am entering this - <?php include_once("...../include.php"); ?> - what is the relative path to use? Is it from the template.php file or from ghEasy's root folder or something else??

 

Edited: 12 years ago#3230

Josh S.
2K Posts
313K Downloads
16 Themes
18 Plugins

Ok, so if it was in a theme that you downloaded, you may need to copy it from /data/_themes/magw204 to /themes/your_theme_name.

One other question, when i am entering this - <?php include_once("...../include.php"); ?> - what is the relative path to use?

To be certain of the path you could use the $dataDir variable of gpEasy. The following code would include a file in the root gpEasy directory (adjacent to the index.php file).

<?php

global $dataDir

include_once($dataDir.'/include.php');

?>

12 years ago#3231

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

Log In

  Register