Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Unable to configure Gallery (http://gallery.menalto.com/)


Go to End


6 Posts   2705 Views

Avatar
africansafari

Community Member, 30 Posts

26 October 2009 at 11:04am

Hi,

I have installed Gallery software (http://gallery.menalto.com/) to my website, however can't access the startup page in order to configure and set-up.

I keep getting silverstripes message saying that this page cannot be displayed.

I know this must be something to do with the silverstripe and/or permissions as this software works fine on non-silverstripe websites.

What do I need to do to the folder and/or page (www.domain.com/photogallery/) in order to display this 3rd party software so I can configure and set-up?

Cheers

Claire

Avatar
woodb2

Community Member, 48 Posts

28 October 2009 at 8:14am

I use gallery with my SilverStripe site. SilverStripe wants to manage everything in its directory, even subdirectories. You need to modify the .htaccess file that's in your silverstripe directory to tell it to pass requests to the photogallery directory. Add these two lines to your .htaccess file just above the existing rewrite condition statements (after the RewriteBase line).

RewriteRule ^photogallery$ photogallery/ [R,L]
RewriteRule ^photogallery/(.*)$ photogallery/$1 [L]

Not sure how familiar you are with gallery, but it's fairly easy to add your header info from Silverstripe to it to make it look like your photogallery is part of the rest of your site.

Avatar
africansafari

Community Member, 30 Posts

28 October 2009 at 9:21am

Thanks for the reply. To get around the problem I installed Gallery 2.3 under a sub-domain for the website, and seems to work. I will give you idea a go as I prefer to have installation in a sub-directory, not a sub-domain.

Can you explain how to add header from silverstripe?

Cheers

Claire

Avatar
africansafari

Community Member, 30 Posts

28 October 2009 at 9:41am

The re-write rule worked - thank you :-)

Avatar
woodb2

Community Member, 48 Posts

28 October 2009 at 10:59am

Edited: 28/10/2009 11:32am

Adding SilverStripe header to Gallery. I'm assuming you're using Gallery v2.x. Also, I forgot to mention that the header isn't going to be dynamic. If you add/change any of the header menu picks you'll have to change them in Gallery too.

In my case I'm using the matrix theme in gallery. go to your photogallery/themes/matrix/templates directory. Create a sub directory called local and copy the theme.tpl file to the local directory. We don't edit the default template, but this copy takes precedence. Edit the newly copied local/theme.tpl file.

We need to insert a few things from your silverstripe site. We need to insert the stylesheet info and the basic html that builds the header. Get that by doing a view source on your site in a browser. You'll see there is already a stylesheet in the theme.tpl just copy and paste your stylesheet line in after it. You may have to edit it (I did to give it the full path to it).

Then I copied from the viewed source from my "<div id="BgContainer">" to the closing series of </div> for the navcontainer.

Here is what the top portion of my theme.tpl looks like

{*
* $Revision: 16727 $
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="{g->language}" xmlns="http://www.w3.org/1999/xhtml">
<head>
{* Let Gallery print out anything it wants to put into the <head> element *}
{g->head}

{* If Gallery doesn't provide a header, we use the album/photo title (or filename) *}
{if empty($head.title)}
<title>{$theme.item.title|markup:strip|default:$theme.item.pathComponent}</title>
{/if}

{* Include this theme's style sheet *}
<link rel="stylesheet" type="text/css" href="{g->theme url="theme.css"}"/>
<link rel="stylesheet" type="text/css" href="http://actionsuperstars.com/themes/actionsuperstars/css/layout.css" >
</head>
<body class="gallery">
the
<div id="Container">
<div id="Header">
<h1></h1>
<h2></h2>
</div>
<div id="LinkBar">
<div id="Navcontainer">

<ul id="Navlist">

<li><a href="/home/" title="Go to the Home page" class="current">Home</a></li>

<li><a href="/photo-usage/" title="Go to the Photo Usage page" class="link">Photo Usage</a></li>

<li><a href="/contact/" title="Go to the Contact page" class="link">Contact</a></li>

<li><a href="/keeping-your-memories/" title="Go to the Keeping your Memories page" class="link">Keeping your Memories</a></li>

</ul>
</div>
</div>
</div>

<div {g->mainDivAttributes}>
{*
* Some module views (eg slideshow) want the full screen. So for those, we don't draw
* a header, footer, navbar, etc. Those views are responsible for drawing everything.
*}
{if $theme.useFullScreen

Hope this helps. You can view my if it helps by going to:
http://actionsuperstars.com silverstripe
http://actionsuperstars.com/actionsuperstars photos using Gallery

Good luck!

Forgot to mention that you'll have to log in to galley, go to site admin, maintenance, then delete template cache to see the changes.

Avatar
woodb2

Community Member, 48 Posts

28 October 2009 at 2:23pm

My copy and paste is a little messed up.
After
</head>
<body class="gallery">
the Should be <div id="BgContainer">

Not sure what happened there, but you get the idea.