Forum Index > FlashYourWeb OS Support > Gallery 2 Bridge New Topic Post Reply
 g2bridge as index page in center block?
 |  Printable Version
tgc
 January 23 2010 11:38 AM (Read 2463 times)  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

Hi there,
I think I posted this already but I can't find it anymore and I did not receive an answer.

Again:
Is it possible to set G2Bridge as the center block of the index page the same way like a static page?

Thanks/Frank


 
Profile Email
Quote
suprsidr
 January 23 2010 11:42 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Not without the use of an iframe, but you can use autotags in a staticpage centerblock for the same effect.

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 23 2010 13:19 PM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

Thank you, I am going to look into it.

Frank


 
Profile Email
Quote
tgc
 January 24 2010 05:15 AM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

The problem with the staticpage page and the autotags is that I don't get the description and I also want to link to the album and not the image.
Iframe is no option at all.
But I put in a redirect into my htaccess file and that works (at least from what I can see now) for everything but for the stories. My other content is all in staticpages so this seems to be a workaround I can live with, at least for this site.

One problem I have is that the breadcrumbs disappear for anonymous users in the gallery2 menu. So I get into the album or image but I can not go back. When I am logged in as admin everything is there. Do you have an idea where to look at this. This also happens in the standalone gallery2.

Thank you/Frank


 
Profile Email
Quote
suprsidr
 January 24 2010 05:39 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

I also have a jQuery/Gallery2 driven mediaBlock.
G2Bridge ships with mediaBlock, just not the jQuery version.

One problem I have is that the breadcrumbs disappear for anonymous users in the gallery2 menu. So I get into the album or image but I can not go back. When I am logged in as admin everything is there. Do you have an idea where to look at this. This also happens in the standalone gallery2.

Which G2 theme?

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 24 2010 06:14 AM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

I use Classic and Matrix but I don't think it is not the template. I disabled my local templates and cleared the template cache to see if it works with the unmodified gallery template but it is still the same. Maybe I need to reeinstall?

Frank


 
Profile Email
Quote
suprsidr
 January 24 2010 06:24 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Gallery breadcrumbs disappearing sounds strange. I don't know of any permission to disallow anon users' view of breadcrumbs.
We can set the breadcrumb root and I've added the option in G2Bridge config (/admin/configuration.php)

Otherwise I'd check my server's error logs for gallery related php errors.

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 26 2010 12:58 PM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

After I re-installed G2 for the third time and absolutely from scratch with new database, etc. the breadcrumbs are working normally again. Puh.

But I think my htaccess redirect is causing some php errors although everything seems to work fine. Do you know of a way to just turn off the the event logging? Otherwise I fear that my database is getting clogged with all these error messages.

....

I just deleted the g2_EventLogMap table in phpmyadmin and still everything works. I know this is a kind of crass remedy but I like it...

Frank


 
Profile Email
Quote
suprsidr
 January 26 2010 13:15 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

try:

PHP Formatted Code
$display = '';
G2B_G2_init();
global $_G2B_CONF,$_USER,$gallery,$authToken;
if (!isset($authToken)) {
    $session = &$gallery->getSession();
    GalleryUtilities::putRequestVariable('authToken', $session->getAuthToken());
}

if ($_USER['uid'] < 2 && isset($_G2B_CONF['defaultBreadCrumbIdAnon'])) {
    $gallery->setConfig('breadcrumbRootId', $_G2B_CONF['defaultBreadCrumbIdAnon']);
} else if (isset($_G2B_CONF['defaultBreadCrumbIdUser']) && !SEC_inGroup('G2Bridge Admin')) {
    $gallery->setConfig('breadcrumbRootId', $_G2B_CONF['defaultBreadCrumbIdUser']);
}
if ($_USER['uid'] < 2 && isset($_G2B_CONF['defaultAlbumIdAnon'])) {
    $gallery->setConfig('defaultAlbumId', $_G2B_CONF['defaultAlbumIdAnon']);
} else if (isset($_G2B_CONF['defaultAlbumIdUser']) && !SEC_inGroup('G2Bridge Admin')) {
    $gallery->setConfig('defaultAlbumId', $_G2B_CONF['defaultAlbumIdUser']);
}

$g2data = GalleryEmbed::handleRequest();

if ($g2data['isDone'])
    exit;

GalleryEmbed::done();
$display .= $g2data['headHtml'];
$display .= $g2data['bodyHtml'];
echo $display;


in a staticpage centerblock set to execute php

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 26 2010 13:39 PM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

Thank you, I just tried it but I get this error:

PHP Formatted Code
Parse error: parse error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM or '(' in /home/x/xxx.net/glf/plugins/staticpages/functions.inc(1156) : eval()'d code on line 5


Frank


 
Profile Email
Quote
suprsidr
 January 26 2010 13:55 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Did you enable php in staticpages?

admin/configuration.php -> staticpages
set Allow PHP => true

/admin/group.php -> edit Static Page Admin
check staticpages.PHP and save

and make sure you copied my code correctly that should be all that's in the staticpage
don't use fckeditor

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 26 2010 14:11 PM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

php is enabled and in the groups also. And I copy/pasted your whole code. I renamed my g2date directory and I also chaged the name in the code to my directory but all the same...

Frank


 
Profile Email
Quote
suprsidr
 January 26 2010 14:28 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

I renamed my g2date directory and I also chaged the name in the code to my directory but all the same...

Huh? there was no instruction to do that.
The php variable I created has nothing to do with your directory.

Not only does my code work on my dev site, but this site as well.
http://www.flashyourweb.com/staticpages/index.php?page=g2_centerblock

-s


There will always be...
 
Profile Email Website
Quote
tgc
 January 26 2010 14:32 PM  
Forum Junior
Junior

Status: offline

Registered: 01/15/10
Posts: 15

I just tried it with different names, but the original does not work here for sure.


 
Profile Email
Quote
suprsidr
 January 26 2010 14:38 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

For IE I had to switch around the globals, try the code above now.... I updated it.

-s


There will always be...
 
Profile Email Website
Quote
Content generated in: 0.65 seconds
New Topic Post Reply



 All times are PDT. The time is now 11:21 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content