How to add two blocks to album and photo pages?

Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Thu, 2009-12-03 19:17

For album and photo pages, I was wondering how I can just put two blocks at the bottom of the page, Item Actions and Search Box? Separate from the sidebar.

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-12-03 19:37

You can only have 1(one) search box on the page. Only the first one will work, the 2nd one won't work.

But if you go to Site Admin > Themes you can manage the blocks on the sidebar and the pages there. If you need more help post a link to your site.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Thu, 2009-12-03 21:01

So the only search box that would work is the one in the sidebar? If I just drag the sidebar to the bottom of the page, then that would work, right?

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-12-03 22:01

Drag? Are you using G2 or G3?

If you go to Site Admin > Themes you can remove the search box from the sidebar and add it to the album and photo pages, which by default in most themes will add it to the bottom of the page.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Fri, 2009-12-04 00:00

Sorry, my slang--Drag as in cut and paste the sidebar html somewhere else. I'm using G2.

I had removed the search box from the sidebar before, but it hadn't showed up on the bottom of the page. I'm using X_treme. Do I just go into another theme and search for "search" in album.tpl and photo.tpl, and then copy and paste into the ones in x_treme/templates/local?

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-12-04 01:25

Good luck wading through the X_tream maze of code.
http://codex.gallery2.org/Gallery2:Themes:Reference:Blocks
The search also requires some JS to be added to the page.

I have answered that before in the forums so you can search for that.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Twilight4Ever
Twilight4Ever's picture

Joined: 2006-08-07
Posts: 130
Posted: Fri, 2009-12-04 02:50

It certainly is a maze, but I'm an html junkie, and persistent at that. I've spent the last few days hacking the template (and cursing most the while), but I think I've mostly got it now.

Thank you for the link, it's an extremely handy page. I generally have a lot of trouble finding anything in documentation.

I'm sorry, I still have a few more questions.

I am having a bit of trouble finding the Javascript for for the search button. I found the block code in the Ajaxian template earlier, but I can't find the javascript, and I couldn't find it in Gallery2's forum search.

Other than the javascript, is the anything else I need to do? I noticed in the Ajaxian theme that there are some "$ret = $this->preloadBlock($template, 'search.SearchBlock');" lines in the theme.inc, do I need to do that for my theme too? Would that conflict with the line that says:

array('search.SearchBlock', array('showAdvancedLink' => true)),

for the x_tremeTheme() function, $this->setStandardSettings array?

Sorry about my lack of knowledge here, I'm still learning.

________________________________________________
NOT a "Twilight" fan... Just a fan of sunsets. :)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-12-04 14:28

You should just have to do:

<script type="text/javascript" src="{g->url href='modules/search/SearchBlock.js'}"></script>
{g->block type=search.SearchBlock}

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team