Customize a static HTML website to include gallery2

taskmaster
taskmaster's picture

Joined: 2004-12-01
Posts: 135
Posted: Sun, 2004-12-19 15:59

Hello

I have downloaded gallery2, now I need to get it into my site a pure static html website, I have sql, php on my dedicated server.

I could not find html_wrap in the directory, I read shadow wolfs post and I just cant find html_wrap directory. :D

A thing to the forum, its said that the search function delivers so bad results, its a great forum.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-12-19 18:22

moved to G2 User Interface forum.

Dave

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-12-19 19:35

no html_wrap in G2.. read the help text at the top of templates/global.tpl
that should get you started.

 
taskmaster
taskmaster's picture

Joined: 2004-12-01
Posts: 135
Posted: Mon, 2004-12-20 18:02

Thanks

Is it better to dowload a older version of GALLERY if I want to have it in my old site, the global thing sounds a little complicated and there is no dummy information how to

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-12-20 19:55

check README.html in G2 to see if the current state of G2 works for you.
G2 makes it easier to wrap the entire application in your site's header/footer, etc by providing a single global template where you can add these things so they will appear on all G2 pages. Just make a global.tpl.local file as described in the comment at the top of global.tpl and try adding some html above or below the main content.. you'll quickly see how it works.

 
taskmaster
taskmaster's picture

Joined: 2004-12-01
Posts: 135
Posted: Tue, 2004-12-21 15:26

Issent there any real description how to do this, I read the top of global, why dont it say

place your html here for top and html here for the end. thats it. as I understand it is all in the global.tpl so no 2 ducoments to change like in the old Gallery verrsion.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2004-12-21 16:20

the documentation looks pretty good to me.. you can clearly see where the main G2 content goes and there are images just above and below that, so it's easy to see where those are on the page. just experiment.. if you break anything you can always change it back or remove your global.tpl.local

 
taskmaster
taskmaster's picture

Joined: 2004-12-01
Posts: 135
Posted: Mon, 2004-12-27 12:44

Call me stupid, but I just cant get this to work - this error I got the last time and now I cant change it back so I have to install the gallery2 again.

Fatal error: Smarty error: [in gallery:templates/global.tpl line 181]: syntax error: unrecognized tag: window.location="http://www.1freewallpaper.com/links.htm"; (Smarty_Compiler.class.php, line 408) in /home/httpd/vhosts/1freewallpaper.com/httpdocs/gallery2/lib/smarty/Smarty.class.php on line 1083

Here is the global script, please mark where I put my tables/content, thanks

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
{* This should help out users whose browsers are confused about the character set *}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

{* Content that G2 wants to display inside the <head> element *}
{include file="gallery:`$main.viewHeadFile`" l10Domain=$main.viewL10Domain}
</head>
<body>
<div id="gallery">
<div id="gsHeader">
<img src="{g->url href="images/galleryLogo_sm.gif"}" alt="" />
</div>

{* Content that G2 wants to display inside the <body> element *}
{include file="gallery:`$main.viewBodyFile`" l10Domain=$main.viewL10Domain}

<div id="gsFooter">
<a href="http://validator.w3.org/check?uri={$main.validationUri}&amp;ss=1"><img style="border: 0px"
src="{g->url href="images/xhtml10.png"}"
alt="{g->text text="This page is valid XHTML 1.0"}"
height="15" width="80"/></a>

<a href="http://gallery.sourceforge.net"><img style="border: 0px"
src="{g->url href="images/gallery.gif"}"
alt="{g->text text="Gallery %s" arg1=$main.gallery.version}"
height="15"
width="80"/></a>
<img style="border: 0px"
src="{g->url href="modules/core/data/heybaby.png"}"
alt="{g->text text="Gallery 2 - Alpha 4: Hey Baby, Nice Commits"}"
height="15"
width="115"/>
</div>
</div>

{* If debugging or profiling is enabled, we'll display it here *}
{if isset($main.debug) || isset($main.profile)}
{include file="gallery:templates/debug.tpl"}
{/if}
</body>
</html>

maybe I have a totaly other problem with this program. :D

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-12-27 19:29

perhaps you removed your global.tpl.local file? as mentioned in the FAQ, you'll need to resave or 'touch' the original global.tpl file to get smarty to recognize this file as newer.
if you want to add javascript in your local/globa.tpl (note that we changed the setup for local templates, though the old scheme still works) you'll want to wrap that section in {literal} .... {/literal} tags... these are smarty templates, so any { characters not in a literal block will be interpreted by smarty (smarty.php.net).

 
zberke

Joined: 2006-03-16
Posts: 1
Posted: Thu, 2006-03-16 21:42

Hi,

I've got gallery-2.0.2-full. I can't find a global.tpl file (find . | grep global) ... has this process changed?

Thanks,
-zb

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2006-03-16 22:56

yes, notice this thread is from 2004. look for themes/{yourtheme}/templates/theme.tpl and find more info by clicking "documentation" at the top of this page.

 
phatass

Joined: 2006-03-20
Posts: 4
Posted: Fri, 2006-03-24 16:07

Look at my site and see if the gallery there is what you are trying to do. www.phatasscycles.com/gallery

I had some help with it but you may be able to look at the code and see how to set your template up.