smarty and templates

sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2005-05-19 15:40

i'm trying to customize global.tpl

simply change the logo and link it to the home page.

i replaced the gallery logo with my site logo :)

i was unsuccessful in making it a link :-?

after reverting to the original global.tpl i assumed it would work as it previously did. it didn't :cry:

what is this:

http://www.origin-studio.com/events/gallery2/main.php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-05-19 16:05

when you change something in the layouts and you don't see the change taking effect, go to site admin -> maintenance -> and Flush the template cache.

changing the logo and making it a link is easy. just us plain old html.
and copy global.tpl to local/global.tpl as it says.

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2005-05-19 16:14
Quote:
...go to site admin -> maintenance -> and Flush the template cache.

i can't login to do this

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-05-19 16:24

you can find direct links to login and site admin in README.html
you can also do 'touch global.tpl' to make smarty use the default file instead of its cached version of your local/global.tpl.. or simply copy global.tpl to local/global.tpl

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2005-05-19 16:54

the links in readme.html didn't work, they linked to the same error message.

Quote:
you can also do 'touch global.tpl' to make smarty use the default file instead of its cached version of your local/global.tpl.. or simply copy global.tpl to local/global.tpl

i don't understand the instructions above. that's okay, i just uploaded the original template directory and it works again.

about the html image link:
i can't get it to work. initially i changed the gallery image to mine by opening it in photoshop and pasting mine on top of it. now it's the same size as the original. and it works. i didn't change the code in global.tpl. it still looks like this:

<div id="gsHeader">
<img src="{g->url href="images/galleryLogo_sm.gif"}" alt=""/>
</div>

when i change it to:

<div id="gsHeader">
<a href="../../../index.php"><img src="../images/galleryLogo_sm.gif""}" alt="" width="107" height="48"images/galleryLogo_sm.gif/>
</a>
</div>

it breaks. do i need to change #gsHeader?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-05-19 17:06

remove your extra "}"

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2005-05-19 17:14

i fixed the html but i got this error:

Quote:
Fatal error: Smarty error: [in gallery:templates/global.tpl line 1]: syntax error: invalid attribute name: 'none" width="80" height="15"/> url' (Smarty_Compiler.class.php, line 1516) in /home/origin/public_html/events/gallery2/lib/smarty/Smarty.class.php on line 1088

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-05-19 18:03

you still have some syntax error.. maybe post what you changed. or carefully check what you did and make sure you have valid html with no extra { or } in there.

 
sarcasticprick
sarcasticprick's picture

Joined: 2003-04-08
Posts: 63
Posted: Thu, 2005-05-19 18:37

here is my code:

<div id="gsHeader">
<a href="../../index.php"><img src="../images/galleryLogo_sm.gif" /></a>
</div>

and i get:

Fatal error: Smarty error: [in gallery:templates/global.tpl line 1]: syntax error: invalid attribute name: 'none" width="80" height="15"/> url' (Smarty_Compiler.class.php, line 1516) in /home/origin/public_html/events/gallery2/lib/smarty/Smarty.class.php on line 1088