How can i create a new sidebar

FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Sat, 2008-12-20 17:04

Look like this site
http://www.swindongallery.org.uk/gallery2/main.php?g2_view=html:Home

It has "3 columns" 1 for default sidebar 1 for gallery and 1 for "another sidebar" .

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-12-21 00:15

it is a customized theme.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Sun, 2008-12-21 03:01

Thanks for replying
But , could you tell me how to do that ? i mean i want to add new sidebar at the right (or the bottom ) of the gallery , so which file i should edit ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-12-21 04:15

matrix theme?
edit album.tpl and photo.tpl if you want the sidebar on photo pages as well
add the bold:

  
    <td id="gsSidebarCol">
      your new sidebar content goes here
    </td>
  </tr>
</table>

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Sun, 2008-12-21 10:26

Thanks so much , i have created a new right sidebar , but another thing is that how can i modify it in the admin cpanel. I have created a new sidebar.tpl, and i could not find where to add new block options in admin settings . My new sidebar.tpl is

{*
* $Revision: 17075 $
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}
<div id="gsSidebar2" class="gcBorder1">
{* Show the sidebar blocks chosen for this theme *}
{foreach from=$theme.params.sidebarBlocks item=block}
{g->block type=$block.0 params=$block.1 class="gbBlock"}
{/foreach}

</div>

I think the bold is what i must change. Is it right ?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2008-12-21 17:21

I don't understand. Just by adding a new table cell to the album.tpl does not allow you to add block to it from the admin page.
You will have to add blocks manually:
http://codex.gallery2.org/Gallery2:Themes:Reference:Blocks

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Mon, 2008-12-22 08:50

For example : When i use matrix theme :

http://img361.imageshack.us/my.php?image=sidebar1hq0.jpg

And then when i change to Ebony theme :

http://img187.imageshack.us/my.php?image=sidebar2zk0.jpg

Ebony theme has 2 more "Blocks to show" , so how could i add more "Blocks to show" ?

Also ,

I added :
.one-image {
display: inline;
padding-left : 2px;
}

Into theme.css

And then i add those code to album.tpl in order to show random image horizontally

<div class="one-image">
{g->block type="imageblock.ImageBlock" blocks="randomImage" repeatBlock=5 showDate=0 showOwner=1 showViews=1 showTitle=1 showHeading=0 useDefaults=0}
</div>

But the images are not horizontal and still vertical

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-12-22 14:33
Quote:
Ebony theme has 2 more "Blocks to show" , so how could i add more "Blocks to show" ?

You are going to have to look at the code for that theme.
if you compare theme.inc from both themes you will see how the ebony theme added a new 'blocks to show'

Quote:
But the images are not horizontal and still vertical

URL?

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Mon, 2008-12-22 19:50

Thanks for your advice :) . I just install it in my localhost using xampp 1.6.7 , maybe i will try it in my host

here is my main site
http://huuyaa.com/gallery2

And those 2 links below are the album.tpl and theme.css
http://huuyaa.com/gallery2/themes/matrix/templates/local/album.tpl
http://huuyaa.com/gallery2/themes/matrix/local/theme.css

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2008-12-22 20:41

try:

.one-image {
	display: inline;
float: right;
	padding-left : 2px;
}

or you might want to use the media block as it has more flexability:
http://www.flashyourweb.com/staticpages/index.php?page=mediaBlockIncludes

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
FighterVn

Joined: 2008-12-20
Posts: 8
Posted: Tue, 2008-12-23 04:29

WOW , thank you very very much, it works perfectly ^_^