It's been awhile since I messed with editing a theme.tpl file. I've followed all of the instructions to try and make gallery look like a part of my page, but its not working now. It seem so easy before. I now have a new website, and the old one no longer exist (including the working .tpl file) and I have to start over again.
My problem is when I edit the .tpl file, all I get is a blank page when I try to load gallery. If I erase it and out of local, it will read the original .tpl file and everything works fine, but of course without the look of my website. I'm wondering if someone can help me with this, I'll copy and paste the code below and you may also want to take a look at what's happening on my site as well.
Thank you for any help.
gallery url: http://www.chansata.com/gallery2/main.php
Code:
{*
* $Revision: 15342 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" dir="ltr">
<head>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<title>atalifeskills.com - Home</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
{literal}<script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script>{/literal}
<meta name="description" content="ATA Life Skills" />
<meta name="keywords" content="ATA Life Skills, karate, training, oklahoma, OK, martial, arts, martial arts, oklahoma karate, oklahoma martial arts, oklahoma ATA Life Skills training, OK ATA, oklahoma karate training, oklahoma karate schools, oklahoma martial arts schools" />
<meta name="Generator" content="Copyright (C) 2007" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="templates/ata/css/template_css.css" rel="stylesheet" type="text/css" />
<link href="templates/ata/css/header.css" rel="stylesheet" type="text/css" />
<link href="templates/ata/css/splitmenu.css" rel="stylesheet" type="text/css" />
<link href="templates/ata/css/footer.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {
font-size: 16px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FF0000;
}
.style2 {color: #0000FF}
.style4 {font-family: Arial, Helvetica, sans-serif}
.style5 {
font-family: Arial, Helvetica, sans-serif;
font-style: italic;
font-size: 24px;
color: #7C90E4;
font-weight: bold;
}
.style8 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
{* 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"}"/>
</head>
<div {g->mainDivAttributes}>
<body id="page_bg" class="w-wide f-default">
<div id="mainbg">
<div class="wrapper">
<div id="mainbg-2">
<div id="mainbg-3">
<div id="mainbg-4">
<div id="mainbg-5">
<div id="header">
<div id="access">
<div id="selectors">
<span class="font-selector"> </span>
<span class="width-selector"> </span> </div>
</div>
<a href="index.html" title=""><span id="logo"> </span></a>
<div id="top"> </div>
</div>
<? require_once("header.html"); ?>
{*
* 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}
{include file="gallery:`$theme.moduleTemplate`" l10Domain=$theme.moduleL10Domain}
{elseif $theme.pageType == 'progressbar'}
<div id="gsHeader">
<img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
</div>
{g->theme include="progressbar.tpl"}
{else}
<div id="gsHeader">
<a href="{g->url}"><img src="{g->url href="images/galleryLogo_sm.gif"}"
width="107" height="48" alt=""/></a>
</div>
<div id="gsNavBar" class="gcBorder1">
<div class="gbSystemLinks">
{g->block type="core.SystemLinks"
order="core.SiteAdmin core.YourAccount core.Login core.Logout"
othersAt=4}
</div>
<div class="gbBreadCrumb">
{g->block type="core.BreadCrumb"}
</div>
</div>
{* Include the appropriate content type for the page we want to draw. *}
{if $theme.pageType == 'album'}
{g->theme include="album.tpl"}
{elseif $theme.pageType == 'photo'}
{g->theme include="photo.tpl"}
{elseif $theme.pageType == 'admin'}
{g->theme include="admin.tpl"}
{elseif $theme.pageType == 'module'}
{g->theme include="module.tpl"}
{/if}
<div id="gsFooter">
{g->logoButton type="validation"}
{g->logoButton type="gallery2"}
{g->logoButton type="gallery2-version"}
{g->logoButton type="donate"}
</div>
{/if} {* end of full screen check *}
</div>
{*
* Give Gallery a chance to output any cleanup code, like javascript that needs to be run
* at the end of the <body> tag. If you take this out, some code won't work properly.
*}
{g->trailer}
{* Put any debugging output here, if debugging is enabled *}
{g->debug}
<table class="mainbody" cellspacing="0">
<tr valign="top">
<td class="left">
<div class="moduletable">
<p align="left"><span class="style2">Upcoming Events</span></p>
<p align="left"><a href="xma.php"><img src="XMA web pic.jpg" alt="ATA X-treme" width="150" height="232" border="0"></a></p>
<p align="left"><a href="http://www.ataonline.com/the_ring/events/worlds2008/"><img src="2008worlds.png" alt="Worlds 2008" width="168" height="141" border="0"></a></p>
</div>
<div class="moduletable">
<p align="center"><strong> <a href="contact.php" class="style2">School Locations</a> </strong><br />
</p>
</div>
<div class="moduletable">
<table width="150" align="left">
<tr>
<td><div align="center">
<? require_once("scrolling_left_side.html"); ?>
</div>
<p align="center"><a href="http://ataonline.com/kidznpowerpage1.html"><img src="realkidz.gif" alt="Real Kids" width="130" height="141" border="0" /></a></p>
<p align="center"> </p>
<p align="center"><br />
<a href="school.php" class="style1">Safety Tips! </a></p>
<p align="center"><a href="loser.php" class="style8">Ten Ways to Get and Stay In Shape</a></p> </td>
</tr>
</table>
</div> </td>
<td class="mainbody"><div class="padding">
<div id="inset">
<p><a target="_blank" title="ATA Online" href="http://www.ataonline.com/"><img width="631" height="40" border="0" title="" alt="" src="images/stories/ATAbanner.jpg" /></a> </p>
</div>
</div></td>
</tr>
</table>
</div>
<div id="footer">
<div class="padding">
<table class="footer" cellspacing="0">
<tr valign="top">
<td class="footer">
<div class="moduletable">
<p><img style="margin: 0px;" width="250" height="100" title="" alt="" src="images/stories/lowerbox1.jpg" /><br />
</p> </div> </td>
<td class="footer">
<div class="moduletable">
<p><img style="margin: 0px;" width="250" height="100" src="images/stories/lowerbox2.jpg" alt="" title="" /><br />
</p> </div> </td>
<td class="footer">
<div class="moduletable">
<p><img style="margin: 0px;" width="250" height="100" title="" alt="" src="images/stories/lowerbox3.jpg" /><br />
</p> </div> </td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="wrapper">
<div id="mainft-2">
<div id="mainft-3">
<div id="the-footer">
<div class="padding">
<br />
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Posts: 27300
you don't need literal tags here:
{literal}<script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script>{/literal}
you have to wrap your css info with {literal} and {/literal}tags.
Why add css to the template? Why not add it to the css file?
More info:
http://www.smarty.net/manual/en/language.function.literal.php
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 3
thank you for the quick response, I'll try that.
Posts: 3
OK, after doing what you suggested, it is not longer a blank page, but I don't see any of the changes. I even went in and cleared the cashe out. Do I need to copy in the images? I'll give that a try real quick.
Posts: 27300
use firefox and the dev tool. You will find that you are missing a few images. One :
http://www.chansata.com/gallery2/images/stories/lowerbox1.jpg
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team