how to hide the whole sidebar ?

Creating and modifying plugins.
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

how to hide the whole sidebar ?

Post by bogus »

Hi,

how can I hide the whole sidebar ?
Not like the hide-sidebar-plugin, which seems to hide only single sidebar-plugins.

I included my dokuwiki with wrapURL into my blog,
and now I want to hide the sidebar... to get more space for the wiki !

The g2_embed-Plugin does exactly what I want:
After login into the embedded gallery, the sidebar gets disabled !

How can I achieve this ?
Any ideas ?

- bogus -
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

You could just remove all the sidebar plugins, or move them into the hidden column, from "Configure Plugins" on the admin page.

Or you could edit your index.tpl and remove the sidebar, which will also avoid calling all the sidebar plugins.
Judebert
---
Website | Wishlist | PayPal
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

temporary sidebar removal, not permanent !

Post by bogus »

Sorry, but I do NOT want to remove the sidebar permanently !

- dokuwiki is embedded via wrapURL into s9y.
- I only want to hide the sidebar if this wrapped Url is called !
- when clicking back to the blog (s9y), the sidebar should show up again.

As already mentioned, the g2embed-Plugin shows this behaviour:
- once I login into my embedded gallery2, the sidebar vanishes.
- if I logout from gallery2, the sidebar appears.

Any hints how to realize this ?

--
bye
bogus
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: temporary sidebar removal, not permanent !

Post by garvinhicking »

Hi!

For the other sidebars to "vanish" you would need to patch the wrapURL plugin.

I just did that in version 0.5 of the wrapurl plugin which should be avaialable latest tomorrow, where you can now configure whether to hide the sidebars.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

Hi,
i'm using v0.6 of garvin's wrapUrl-plugin.
The wrapUrl-Option hides sidebar-items, but not the whole sidebar.

Would it be possible to apply the ccs-property "display: none" to serendipityLeftSideBar+serendipityRightSideBar while displaying the wrapUrl-iframe ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Sadly that's not possible, because a plugin cannot simply insert CSS into the HTML output at that place. And it can't insert it into the main CSS file, because that one is cached and valid for all files. So you would need an extra template file for your wrapurl plugin.

Instead, just patch your index.tpl template file and use:

Code: Select all

{if $staticpage_pagetitle != 'pagetitle_of_your_wrapurl_plugin'}
{serendipity_printSidebar...}
{/if}
Using this IF-Statement, sidebars will then only be shown when the pagetitle is not the one of your wrapurl page.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bogus
Regular
Posts: 12
Joined: Thu Jun 29, 2006 9:17 pm

Post by bogus »

You're da man 8) , thanks a lot !

That did the trick:

Code: Select all

{if $staticpage_pagetitle != "name-of-my-wrapurl-page"}
    {if $leftSidebarElements > 0}
        <td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
    {/if}
{/if}
{if $staticpage_pagetitle != "name-of-my-wrapurl-page"}
    {if $rightSidebarElements > 0}
        <td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
    {/if}
{/if}
(index.tpl in template-dir)

I'm happy now :lol: !
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Post by Ianardo »

I'm trying to do this on the 'Bulletproof' template.
Please could someone tell me where I should insert this piece of code.

Many thanks
Ian
75% of people make up three quarters of the World's population!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi Ianardo!

Search for "printSidebar" inside the bulletproof index.tpl file. It might happen on multiple places because bulletproof has different layout variants.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Post by Ianardo »

Thanks Garvin
You're right - 16 variations of sidebar!!!

Am I right in thinking that I totally replace

Code: Select all

{if $rightSidebarElements > 0}{serendipity_printSidebar side="right"}{/if}
with the new code?
75% of people make up three quarters of the World's population!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, exactly. Maybe also the leftsidebar?

REgards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Post by Ianardo »

Thanks Garvin
I'll try it tomorrow.
75% of people make up three quarters of the World's population!
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Post by Ianardo »

No, couldn't get it to work.

It just gave exactly the same result as turning off the sidebar in the WrapUrl plugin :-(
75% of people make up three quarters of the World's population!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Ah. Hehe. You're right, turning off the sidebar was added some time ago, this thread is already ages old.

So, what do you want to achieve then? Is hiding the sidebar not your goal? :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Post by Ianardo »

Yes I want to hide the sidebar, but it's pointless unless the content fills the whole width and uses the space left by the sidebar - It's for a forum and I could with the extra room.
75% of people make up three quarters of the World's population!
Post Reply