admin options sidebar hardcoded?

lobos

Joined: 2004-11-24
Posts: 14
Posted: Wed, 2009-10-07 10:18

for the life of me I can't find a way to have the admin options sidebar separated from the main content area - like the other blocks / sidebar works. from looking around it seems that this is hardcoded into certain templates... the trouble is that I don't want to hack the core when embedding, but it seems the only way to move the admin options sidebar out of the main area is do this - although I from reading very OLD posts I have heard that it was planned to abstract this out, maybe I have missed something? or is it still the case that you need to hack the core to achieve the above?

Thanks!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-10-07 16:03

Well what exactly do you want done? Take a look at the carbon theme as it uses CSS to hide and display the sidebar. Is that what you're looking for?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
lobos

Joined: 2004-11-24
Posts: 14
Posted: Wed, 2009-10-07 16:51

thanks for that, what I am looking for is to have that admin options area come up in a block in the cms I am using. The sidebar portion of the array:

$g2data = GalleryEmbed::handleRequest();

$head = GalleryEmbed::parseHead($g2data['headHtml']);

$g2data['bodyHtml']

namely this area:
$g2data['sidebarBlocksHtml'];

from what I have seen there are a few sidebar areas that don't seem to be come up here, not sure if I am missing something though. I have heard that the admin options is hard coded in a template so I am guessing that when I set up the installer for the bridge I will need somehow override these templates, or overwrite them with custom code to abstract the sidebars out of that main area.

as it stands I cannot really have the admin options coming up like that because there is not enough room in the middle area, this area needs to be put in the cms blocks.

Thanks again!

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-10-07 16:58

So outside of Gallery? Yeah, I don't know if that's possible or not.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Rash

Joined: 2006-03-04
Posts: 54
Posted: Wed, 2009-10-14 22:34

here's what we use to display the sidebar in an e107 menu:

if (!defined("e107_INIT")) { exit; }

$caption = "Gallery Menu";
$g2sidebar = getcachedvars("sidebarcache");
$sidebarnotfound = getcachedvars("sidebarnotfound");

if ( $g2sidebar == "" )
{
        $content = 'Not receiving any data from Gallery2, make sure you disabled the -display sidebar- option in the gallery2 plugin, and that the menu is displayed on the same page as the gallery. ';
}
else if($sidebarnotfound='0')
{
   $content = 'Gallery did not return a sidebar, did you enable it in the gallery2 theme options.';
}
else
{

$numSidebars = count( $g2sidebar );
$sidebarHTML = array();

for ( $i = 0; $i < $numSidebars; $i++ )
        {
                $html = trim( $g2sidebar[$i] );
                if ( $html == '' ) continue;
                $sidebarHTML[] = $html;
        }

$numSidebars = count( $sidebarHTML );


        $content = "<div id='gsSidebar'>";
        // now display the ones left over
        for ( $i = 0; $i < $numSidebars; $i++ )
                {
                  $content .= "<div class='g2embeddedsidebarblock'>";
                  $content .= $sidebarHTML[$i];
                  $content .= "</div>";
                }
        $content .= "</div>";
}

$ns -> tablerender($caption,$content);

It's pretty basic, and a bit quirky... but maybe a place for you to start.