Identification of gallery elements

nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Tue, 2009-08-04 10:39

Apolgoies if I have missed this from any of the tutorials. I am attempting to move the "sidebar" from one div to another. I cannot however find where the location of the sidebar is defined. In my template tpl the smarty tags (which I am not that knowledgable on) appear to dynamically generate each section.

{* 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}

I think that is the bit.

How do I make each section appear where I want it to on the page so that I can then easily integrate it into my webdesign.

The elements that I want to know about (so I can then reloctate them) are in the picture attached.

1- the album name
2- the side bar
3- the main gallery items (ps the rectangle is supposed to go round all the items but i messed up) :D

Thanks in advance for your help!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Tue, 2009-08-04 12:08

looks like the matrix theme.
in album.tpl and photo.tpl {g->theme include="sidebar.tpl"}

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Wed, 2009-08-05 03:12
Quote:
1- the album name

http://codex.gallery2.org/Gallery2:Quick_Start_Guide#Configure_the_Root_Album

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Thu, 2009-08-06 13:15

I do not understand. Gallery keeps adding stuff into the output that is not in the TPL files. Where does this information come from? For instance the overall talbe strcuture is not defined in the tpls. I am so confused with the theming of G2 I am going to give up and go back to G1. At least I could hack up the albums.php and get the ouput I wanted. <td id="gsSidebarCol"> has been moved from my album to my theme.tpl yest it still appears in my album view. :(

Thanks for the help so far!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Thu, 2009-08-06 13:40
Quote:
Gallery keeps adding stuff into the output

Each module has its own templates for its particular output. Kinda modularizes output so to say.
Have you embedded your gallery?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Thu, 2009-08-06 20:44

Hi i embedded my gallery but that seems to be rather pointless. I give my website inside my website. I might be missing the point though. http://www.adamkimber.net/gallery/gallery2Embedded.php . Plus how do I link to this? See links on left.

The whole getting the theme to work as you want it seems really complex. I understand html coding but the final generated page does not resemble the template instructions I am giving it. It just arbitrarily adds things that I cannot seem to get to remove. I am going to give up with this. Gallery2 is waaaay to complicated to customise. This is what I did with gallery 1 - http://www.adamkimber.co.uk/gallery/architecture - pretty much seamless, a little slow loading but hey its pictures. This is my revised attempt with gallery 2 - not seamless at all http://www.adamkimber.net/gallery/architecture/ I have removed all references to the sidebar from the templates apart from the theme.tpl where it puts it in my sidebar. It does that, then goes and adds the thing back. Plus it adds the logo at the top. Cannot seem to find where that code comes from. Hence my post. Anyway sorry about going on. </rant>.

Once I get how gallery2 renders the page I can start moving things around and getting to the output to look nice. But at the moment its foxing me. Thanks for your help guys!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Fri, 2009-08-07 03:28
Quote:
I might be missing the point though. http://www.adamkimber.net/gallery/gallery2Embedded.php

I think this will work just fine if you remove your customizations on the theme.tpl files.

Quote:
revised attempt with gallery 2 - not seamless at all http://www.adamkimber.net/gallery/architecture/ I have removed all references to the sidebar from the templates apart from the theme.tpl where it puts it in my sidebar.

Why not just: edit album -> theme tab, and remove all 'blocks' to show in the sidebar. You are forcing gallery to be a fixed width and have a sidebar already.

FWIW: G3 is easier with more html and no smarty tags, similar to G1.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Tue, 2009-08-11 08:37

Brilliant. The combination of the above advice spurred me on. I have re-edited the theme.tpl files to get gallery to look much more like my website. I still have a couple of tiny problems. I would like to remove the name of the album owner and also would like to know if you can have more than one instance of a smarty tag? i.e. so it prints out for instance the name of the album twice?

Lastly can I speed gallery up? It's a tad slow in loading?

Thank you for your time and answers! It's starting to look good! http://www.adamkimber.net/gallery/architecture

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Tue, 2009-08-11 14:26

One question at a time is a lot easier to answer and understand from both ends:
@album owner: It depends on the theme you are using but look for something similar to:
showOwner=$theme.params.showAlbumOwner in theme.tpl you can force it to false or change it in the album settings.

Quote:
can have more than one instance of a smarty tag?

Yes.
{$theme.item.title|markup} will give you the title of the item you are viewing. Should work on the album.tpl and photo.tpl

@speed: FAQ: Is it my imagination, or is G2 slower than G1?
& http://codex.gallery2.org/Gallery2:Performance_Tips

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Tue, 2009-08-11 18:33

Brilliant. And even more brilliant. Its coming together at last. Thank you thank you for your time and advice.

One last question (i hope - i keep finding something else that bugs me....), can you remove the gallery section of the breadcrumbs? So that for instance gallery/artwork becomes just artwork? I can get at the root by typing the url if i need it

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Tue, 2009-08-11 20:43
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Tue, 2009-08-11 20:44

Remember you can rename the root album, it does not have to be 'gallery'

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Tue, 2009-08-11 22:22

floridave you are a star! Can I be cheeky and take up a little more of your time.

I am attempting to watermark my pictures with my logo. Set up the watermark etc but I cannot see it on the final images. I rebuilt the thumbs thinking that might trigger the watermarking process. That didn't however. I did import from a G1 gallery if that makes a difference. Any clues?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22888
Posted: Wed, 2009-08-12 00:11

I rarly used the watermark module so I suggest you start a new thread with the issue are are having

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Wed, 2009-08-12 07:59

OK! Thank you again for your help!!

 
nlao
nlao's picture

Joined: 2005-08-06
Posts: 18
Posted: Sat, 2009-08-22 12:02

Sorted the watermark module thing. I needed to "apply" the watermark to all photos from the edit album bit. just missed the tab at the top of the page with it on!