Hide all sidebar blocks for embedded g2 admin pages?

Veazer

Joined: 2005-09-27
Posts: 13
Posted: Mon, 2008-04-28 08:31

I made the mistake of setting up URL rewrites from the G2 standalone page instead of doing it from within D5. Mostly I did this because the admin pages don't fit inside my theme's 560px center column (and not fully reading the docs, doh!). It messed up the site but I was eventually able to trace it down to faulty .htaccess files. To avoid having this happen again, i'd like to block the standalone version (overkill?) or at the very least find a solution that allowed the G2 admin pages to be usable within my drupal theme.

I was hoping to be able to just hide all sibebar blocks by changing the page specific visibility settings to exclude pages with "*view=core.SiteAdmin*" or something to that effect, but it doesn't work. Is there a PHP code snippet i could use instead? Something that checks to see if the current page is a G2 site admin page?

Any ideas or suggestions are appreciated.

On a side note, is it ok use the standalone version for other basic admin tasks, like just updating/adding media? Is it only the URL rewrites that must be done from within Drupal?

 
Veazer

Joined: 2005-09-27
Posts: 13
Posted: Mon, 2008-04-28 10:22

OK, I used the following PHP snippet to hide the rightside blocks, that seems to give me enough room for G2 administration. I wanted to hide the right blocks during site admin or item admin, so I'm just checking the URL for 'Admin&'. Is this ok?

<?php
$match = TRUE;

$url = request_uri();
if (strpos($url, "Admin&")) {
  $match = FALSE;
}

return $match;
?>