Layout-No sidebar

RoyceH

Joined: 2004-12-15
Posts: 2
Posted: Wed, 2004-12-15 14:46

I'm trying to figure out how to have all the links up top instead of on the left side. I want everything up top so it will easily integrate into my site which already has a left sidebar. Thanks for any help.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Wed, 2004-12-15 21:15

You need to edit the sidebar.tpl file located in gallery2/templates and move that stuff to some of the other tpl files depending on where you want the stuff to be. I don't know how your site looks but you might want to integrate some if not all of them into your existing bar. On my site I moved all the actions to the top next to the login button. You can see it .http://www.lvthunder.com/gallery2

Take the advise and copy the .tpl to .tpl.local in case you mess it up beyond repair you can easily go back.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-12-15 23:50

docs/EMBEDDING can help you do real integration of your site and G2, if desired, including making it possible to drop the G2 sidebar into your own sidebar.
The more UI only approach is as lvthunder described.

 
RoyceH

Joined: 2004-12-15
Posts: 2
Posted: Thu, 2004-12-16 00:56

Great thanks. What lvthunder did is exactly what I want to do. I don't want to do a "real" integration until G2 is at least beta so I don't have to do it again if something changes.

 
Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Sun, 2004-12-19 10:45

Can developers or some advanced users make a layout with out left side bar.

Also it will be coll if, for example, man is looking for FULL sized picture then left side bar switched off. Smth like that.
Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-12-19 16:41

you can design a layout or modify an existing layout yourself to do this.
or, just put GalleryCapabilities::set('showSidebar', false); in your config.php

 
augustz

Joined: 2004-03-20
Posts: 6
Posted: Tue, 2004-12-21 07:37

Old gallery 1.x user. Very happy all around. Gallery 2 looks INCREDIBLE.

Registered to request this exact thing. Nice to see others have a similar thoughts. I really like a nice clean uncluttered look for my pictures.

All the best

 
thumb
thumb's picture

Joined: 2004-05-26
Posts: 238
Posted: Sun, 2005-01-09 23:27

Yes, it would be nice to devote more room to the display of images. Two things could accomplish this.

1. A new layout with the sideBar up top.

2. A JavaScript that would show/hide the sidebar. I'll look into adding this to the Matrix layout. SitePoint has added this to their article layout and it works great.

http://www.sitepoint.com/article/core-relationship-strategy

Here's an example (right side of page) http://zepfanman.com/toggle.php

Here's a non-sideBar example: http://www.scriptygoddess.com/archives/2002/10/04/show-hide-sidebar-gadgets/

 
Kirill
Kirill's picture

Joined: 2004-12-22
Posts: 53
Posted: Fri, 2005-01-14 06:50

I wholeheartedly agree, it'd be awesome if you implemented that, thumb70.

 
Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Sun, 2005-03-06 03:19
mindless wrote:
you can design a layout or modify an existing layout yourself to do this.
or, just put GalleryCapabilities::set('showSidebar', false); in your config.php

Thank you for reply.
I have just add a new line at the end of config.php
GalleryCapabilities::set('showSidebar', false);
and all work ok :)
Very strange that there is no such option in Site Admin.

One little question.
There is code in file /themes/veloria/styles/theme.css

#gsAlbumContents, #gsAdminContents {
        float: left;
        border-left: 4px solid #000000;
        width: 78%;
        padding: 0;
  background-color: #eee;    

Where I can see values for "float"?

I found about float here:
http://www.w3.org/TR/REC-CSS2/visuren.html#float-position

some text here
http://www.w3.org/Style/CSS/Test/CSS1/current/sec5525.htm

 
syotr

Joined: 2005-03-10
Posts: 14
Posted: Mon, 2005-03-14 16:57

I tried hiding the left sidebar by adding
GalleryCapabilities::set('showSidebar', false);
to my config.php but I get an error message saying that the gallerycapabilities variable is unregistered.
What am I doing wrong?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 17:09

syotr, maybe copy/paste the line right from your config.php.. you didn't put a $ on the front did you?

 
syotr

Joined: 2005-03-10
Posts: 14
Posted: Mon, 2005-03-14 18:41

Fatal error: Undefined class name 'gallerycapabilities' in /home/seeyou2/public_html/gallery2/config.php on line 148

Here is the text I pasted in the config.php file:
GalleryCapabilities::set('showSidebar', false);

I am thinking that the editor may be corrupting the file somehow. I am using the editor that is part of the file manager on the Lunarpages control panel.

 
Makc666
Makc666's picture

Joined: 2003-12-26
Posts: 78
Posted: Mon, 2005-03-14 19:41

mindless, realy in core 0.9.0 I use
GalleryCapabilities::set('showSidebar', false);
with out any $ in the beginning :)

mindless, you want to say that in core 0.9.3 we have to put line like:
$GalleryCapabilities::set('showSidebar', false);
?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-14 19:53

no, in 0.9.3, you can't set GalleryCapabilities::set('showSidebar', false); in config.php.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 21:22

Makc666, no I'm saying if you put a $ then that's an error.
valiant, why not? a quick skim over the code and i don't see what changed with this.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-14 21:26

mindless, tried it? i did :-D
what's new since beta 1? bootstrap.inc. don't know how much this changed things.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 22:12

hm, no. i just looked in init.inc and saw where we include config.php after require of GalleryCapabilities. turns out bootstrap.inc now includes config.php earlier and this leftover code in init.inc is including it a second time.. i'll remove that.

if you want to change a GalleryCapabilities entry in config.php then add
require_once(dirname(__FILE__) . '/modules/core/classes/GalleryCapabilities.class');
before using GalleryCapabilties::set.

 
syotr

Joined: 2005-03-10
Posts: 14
Posted: Mon, 2005-03-14 23:11

I added the 2 lines to config.php and the left sidebar is now hidden but when I try to log in, I get this error message:
Warning: Cannot modify header information - headers already sent by (output started at /home/seeyou2/public_html/gallery2/config.php:152) in /home/seeyou2/public_html/gallery2/main.php on line 411

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 23:22

syotr, delete any blank lines or spaces you added at the end of config.php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-15 06:43

no lines/spaces after
?>
[here
no spaces
and no lines]

 
syotr

Joined: 2005-03-10
Posts: 14
Posted: Tue, 2005-03-15 13:17

It looks much cleaner. Now I just need to turn off some of the other items displayed under the photos.

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sat, 2005-03-26 23:28

I can't find that config.php back in the latest version of G2.

Quote:
G2/current.gallery2.zip 7612K 03-26-2005 03:34:25 AM

Found it on http://galleryupdates.jpmullan.com/

Can anyone confirm this???

I've added that line
GalleryCapabilities::set('showSidebar', false);
directly in the layout.inc from matrix.

It does work half, because all text is gone, but still there is space left on the left side??? Take a look at http://www.militaryaircraftcollection.info/Dbase3/gallery2/main.php?g2_view=core:ShowItem&g2_itemId=6

Anyone with a solution????

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-27 01:54

yup, just switched to fixed width sidebar instead of fit to content.. so now with no sidebar content it still shows that empty space.. you can make a local layouts/matrix/templates/albumBody.tpl that doesn't have width="170" for that column.
and btw, config.php is created by the installer so you won't find it in the nightly snapshot.

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 12:41

This is becoming very complicated

I tried it and came with the following problems

When I changed that
<td width="170">
into
<td width="10"> (10 could be 0 also, same result even when I erase that whole line, still with same result

then I saw the left side disappear, but when you look then at the drop dwon menu the <<album actions>> is changed to ?album actions? :(
Does I do something wrong here????

Besides that, when you look at http://www.militaryaircraftcollection.info/Dbase3/gallery2/main.php
is it know possible to aline those folders on the left side like on this page http://www.militaryaircraftcollection.info/Dbase/gallery/????

I know I ask a lot, but it's going the right way for me

Keep up the good work guys

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-27 12:54

you might have to run
yourgalleryurl/lib/tools/test/
FlushTemplates and FlushCache

such that the changes take effect.

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 13:05

Did that, with the same result, nothing has changed, stille same ? in place off <<

This I receive when I click on FlushCash

Test: core :: FlushCache [1 iteration(s)]
Timing: 0.0018 elapsed, 550.3614 per second
Status: Success 

and the same for FlushTemplates

Test: core :: FlushTemplates [1 iteration(s)]
Timing: 0.0021 elapsed, 473.7185 per second
Status: Success 

Anything else I can do???

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-27 13:14
Quote:
I saw the left side disappear, but when you look then at the drop dwon menu the <<album actions>> is changed to ?album actions?

you mean the action list of the sidebar menu? of course this should be gone with the sidebar menu. the other item action drop down lists look ok on your website.

leftaligning: that's ordinary html/css stuff... it should be possible.

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 13:23
valiant wrote:
you mean the action list of the sidebar menu? of course this should be gone with the sidebar menu. the other item action drop down lists look ok on your website.

K, so the action list is gone on the left side.
No problems with that anymore.

But when you look in the dropdown menu under the folders you shall see that album actions is between 2 ? and before it wass between 2<>

Before : <<Album actions>>
After the adjustment : ?album actions?

How can this be???

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-27 13:34

i see, are you sure you haven't changed anything else? what about reverting to the original version of albumBody.tpl and applying the changes again?
of course i would make a copy of your customized albumBody.tpl before.

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 13:37

I've changed nothing else, not on that page

The original file is still located in de templates file and the one that I use now is located in a local folder

When I upload the original file the ? is gone, but when I try to change the width I've receive this 'problem'

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 14:34

very strange thing, because when I look in the code of the page I found this

"& album actions &"

hm doesnt want to look the way I want

I fact the code still excist for << and >>

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Sun, 2005-03-27 15:37

Found a solution

On 1 of the files where the data is stored for your pics etc you'll find a folder called smarty.

In that folder I found a file albumbody.tpl

There I removed the tags for << >> or ? ? so what's left inside the tag is just album actions

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-27 20:20
mindless wrote:
yup, just switched to fixed width sidebar instead of fit to content.. so now with no sidebar content it still shows that empty space.. you can make a local layouts/matrix/templates/albumBody.tpl that doesn't have width="170" for that column.

i'm about to commit a change that sizes the sidebar div to a fixed width instead of the column.. once this is in place then removing the sidebar using GalleryCapabilities will only leave 1px of empty space.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-27 21:22

oh well, opera didn't like that change.. had to go with 1% instead of 1px.. with that amount of space you'll probably still want to remove the column.. an alternative to a local tpl is to add #gsSidebarCol { display: none; } to layouts/matrix/layout.css

 
FlyFort

Joined: 2004-11-07
Posts: 145
Posted: Mon, 2005-03-28 11:52

Is there a way to make this sidebar only visible for the admin???