Add my website's left menu to the Gallery section.
blacksburgpoker
Joined: 2005-11-26
Posts: 108 |
Posted: Thu, 2006-10-12 15:18 |
Can anyone help me out here? I want to add the left menu of my website to the gallery section. Is it possible? Thanks |
|
Posts: 108
I found this: http://gallery.menalto.com/node/15625
but i have another question. Does PHP INCLUDE function work in gallery? mine doesnt seem to work. Any idea why?
Thanks
==================================
www.nimaheydarian.com
www.blacksburgpoker.com
Posts: 108
This is what im doing:
<table width="100%">
<tr>
<td>
<?php include("header.php"); ?>
</td>
</tr>
<tr>
<td>
<?php include("left_menu.php"); ?>
</td>
<td>
Gallery Stuff
</td>
<td>
<?php include("right_menu.php"); ?>
</td>
</tr>
<tr>
<td>
<?php include("footer.php"); ?>
</td>
</tr>
==================================
www.nimaheydarian.com
www.blacksburgpoker.com/gallery
www.wallpapers63.com
Posts: 108
Anyone can help me here please?
==================================
www.nimaheydarian.com
www.blacksburgpoker.com/gallery
www.wallpapers63.com
Posts: 108
I finaly got it to work.
http://blacksburgpoker.com/gallery/main.php
However, I wish I could use "PHP Includes" instead of hard html code in the theme.tpl.
Cheers,
Nima
==================================
www.nimaheydarian.com
www.blacksburgpoker.com/gallery
www.wallpapers63.com
Posts: 1
Great solution! I love this. Keep doing good job to make gallery more usable!
Sorry about my bad english
------------------------------------------------------
| Best way to help - share your knowledge |
------------------------------------------------------
| Everything for the creative mind - all in one head |
------------------------------------------------------
Posts: 108
Here is what I did:
You have to edit the theme.tpl file in your Theme directory. Copy that file into a new folder called "local" inside the "themes" folder. Gallery will treat it as the main theme.tpl file. This is done so that the original theme.tpl file stays un-touched. So in case you screw something up, you always have the original file.
Read this page: http://codex.gallery2.org/index.php/Gallery2:How_to_visually_embed_Gallery_in_your_own_website_by_editing_theme_templates
Most importantly this section:
<html>
<head>
<!-- HTML and Smarty tags -->
<!-- YOUR OWN CSS AND JAVASCRIPT -->
</head>
<body>
<!-- YOUR HTML / INCLUDE HEADER -->
<!-- more HTML and Smarty tags -->
{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"}
{elseif $theme.pageType == 'progressbar'}
{g->theme include="progressbar.tpl"}
{/if}
<!-- more HTML and Smarty -->
<!-- YOUR HTML / INCLUDE FOOTER -->
</body>
</html>
Also, keep in mind that:
If you need to insert JavaScript code, you will have to add {literal}your JavaScript code{/literal} tags around it.
Cheers,
Nima
==================================
www.nimaheydarian.com
www.blacksburgpoker.com/gallery
www.wallpapers63.com