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 It has "3 columns" 1 for default sidebar 1 for gallery and 1 for "another sidebar" . |
|
Posts: 27300
it is a customized theme.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8
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 ?
Posts: 27300
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
Posts: 8
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 ?
Posts: 27300
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
Posts: 8
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
Posts: 27300
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'
URL?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8
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
Posts: 27300
try:
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
Posts: 8
WOW , thank you very very much, it works perfectly ^_^