Forum Index > FlashYourWeb OS Support > Gallery 2 Bridge New Topic Post Reply
 G2Bridge
 |  Printable Version
suprsidr
 February 16 2009 17:58 PM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

We don't create a gallery admin block. We create the sidebar. Which I never liked in geeklog anyways.
I prefer gallery to manage its own sidebarblocks. That said, if you want to keep it, I can modify the block function to only show in /G2Bridge.

As for G2Image. I have an 2 ideas.
I noticed you only used the relative path

Full sys path to gallery2= /gallery2

Try the full system path as directed.

Or... when I was working with Kirk the author of G2Image, he warned against trying to use too many ../../../../'s for relative paths as some systems would not like it.(yours would be the first BTW)
so in /fckeditor/editor/plugins/G2Image/config.php lines 36 and 38 try the full system path to lib-common.php

-s


There will always be...
 
Profile Email Website
Quote
maab
 February 17 2009 00:11 AM  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

We don't create a gallery admin block. We create the sidebar. Which I never liked in geeklog anyways.
I prefer gallery to manage its own sidebarblocks.
-s



Perhaps I don't understand what the sidebar is? There is a gallery tool bar on the side of the gallery page which is all inside geeklog.

Quote by: suprsidr


As for G2Image. I have an 2 ideas.
so in /fckeditor/editor/plugins/G2Image/config.php lines 36 and 38 try the full system path to lib-common.php

-s


I changed the /fckeditor/editor/plugins/G2Image/config.php as below. I created a test php file with the below and added echo to see if it enters into the if statement, which it does. I believe it is finding lib-common.php but the test did also prove that the default file also successfully finds lib-common.

PHP Formatted Code
if (file_exists('/GL/lib-common.php')) // we have geeklog
    {
//        require_once ('../../../../lib-common.php');
        require_once ('/GL/lib-common.php');
    }


 
Profile Email
Quote
suprsidr
 February 17 2009 04:15 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

SO its finding lib-common. Without a peak at your apache error log, I have no idea what other error may be stopping the script.

-s


There will always be...
 
Profile Email Website
Quote
maab
 February 17 2009 07:29 AM  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

SO its finding lib-common. Without a peak at your apache error log, I have no idea what other error may be stopping the script.

-s


Thanks for all the help.

There is nothing in error.log or access.log from G2Image Gallery or G2Bridge.

Is there a php function that will tell me the full system path of files? The only path I can find is relative to my ftp user account. I've tried the following code to find out what is the path and if I have the path to lib-common:

PHP Formatted Code

echo realpath('.');
print "\n\n\n";

if (file_exists('../../../../lib-common.php')) // we have geeklog
//if (file_exists('/GL/lib-common.php')) // we have geeklog
    {
    echo "lib_common found!  ";
//        require_once ('../../../../lib-common.php');
        require_once ('/GL/lib-common.php');
    }else{
    echo "lib not found";
    }

header("content-type:text/plain");

$keys = array(
    "PATH_INFO",
    "PATH_TRANSLATED",
    "PHP_SELF",
    "REQUEST_URI",
    "SCRIPT_FILENAME",
    "SCRIPT_NAME",
    "QUERY_STRING"
);


$info_row = "<tr><td>$_SERVER[SERVER_SOFTWARE]</td><td></td><td></td>\n";
print "Path Information for $_SERVER[SERVER_SOFTWARE]\n\n";

foreach($keys as $key) {
    print '$_SERVER["'.$key.'"] = '.$_SERVER[$key]."\n";
    $info_row .= "<td>$_SERVER[$key]</td>\n";
}

print '__FILE__ = '. __FILE__;
$info_row .= "<td>".__FILE__."</td>\n</tr>";

print "\n\n\n" . $info_row;
 


Output

/GL/fckeditor/editor/plugins/G2Image


lib_common found! Path Information for Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.6b FrontPage/5.0.2.2510 mod_fastcgi/2.4.2

$_SERVER["PATH_INFO"] =
$_SERVER["PATH_TRANSLATED"] =
$_SERVER["PHP_SELF"] = /GL/fckeditor/editor/plugins/G2Image/test.php
$_SERVER["REQUEST_URI"] = /GL/fckeditor/editor/plugins/G2Image/test.php
$_SERVER["SCRIPT_FILENAME"] = /GL/fckeditor/editor/plugins/G2Image/test.php
$_SERVER["SCRIPT_NAME"] = /GL/fckeditor/editor/plugins/G2Image/test.php
$_SERVER["QUERY_STRING"] =
__FILE__ = /GL/fckeditor/editor/plugins/G2Image/test.php


<tr><td>Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.6b FrontPage/5.0.2.2510 mod_fastcgi/2.4.2</td><td></td><td></td>
<td></td>
<td></td>
<td>/GL/fckeditor/editor/plugins/G2Image/test.php</td>
<td>/GL/fckeditor/editor/plugins/G2Image/test.php</td>
<td>/GL/fckeditor/editor/plugins/G2Image/test.php</td>
<td>/GL/fckeditor/editor/plugins/G2Image/test.php</td>
<td></td>
<td>/GL/fckeditor/editor/plugins/G2Image/test.php</td>
</tr>


 
Profile Email
Quote
suprsidr
 February 17 2009 07:55 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

There is nothing in error.log or access.log from G2Image Gallery or G2Bridge.

Not GL logs. Apache logs. Your host's control panel usually allows you to view logs related to your service.

Geeklog error.log would not have any entries we don't program beforehand. PHP errors get written to the web server's logs.

-s


There will always be...
 
Profile Email Website
Quote
GDL
 February 17 2009 10:24 am  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 79

Hey maab,

Here are some samples of the Gallery nav in 2 themes –Carbon and Matrix. I have also shown what it looks like if you turn on the Gallery Block. And lastly, their is an image of the Gallery Admin nav. The Admin nav would and should only appear when you are in the Admin area of Gallery. You would do this by clicking Site Admin in Gallery. You may also create a menu item that quickly goes there from anywhere on your site. This menu item should only be visible by Site Administrators.

Themes effect where your User/Member Navigation is, and how it looks.


Carbon Sidebar
 
 

Carbon


Matrix Sidebar
 
 

Matrix


Gallery GL Block
 
 

Geeklog Gallery Block


Admin Sidebar
 
 

Gallery Admin Nav

-gdl


"The Dude abides."
 
Profile Email Website
Quote
maab
 February 17 2009 22:13 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

There is nothing in error.log or access.log from G2Image Gallery or G2Bridge.

Not GL logs. Apache logs. Your host's control panel usually allows you to view logs related to your service.

Geeklog error.log would not have any entries we don't program beforehand. PHP errors get written to the web server's logs.

-s



Here is what the ISP's scripts.log shows:

[18-Feb-2009 05:56:04] PHP Parse error: parse error, unexpected '(', expecting '}' in /GL/fckeditor/editor/plugins/G2Image/g2image.php on line 892



Line 892 of /GL/fckeditor/editor/plugins/G2Image/g2image.php is:
PHP Formatted Code
                               
$html .= "                <option value='{$urlGenerator->generateUrl(array('view' => 'core.DownloadItem', 'itemId' => $resize->getid()), array('forceFullUrl' => true))}|{$resize->getWidth()}|{$resize->getHeight()}'";
 


Any Ideas?


 
Profile Email
Quote
maab
 February 17 2009 22:53 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Hey GDL,

Thanks for the screen shots, they help a lot.

I will post some screen shot of my sytem or you can see it at

http://www.boatracingr11.com/GL/G2Bridge/index.php

I'm using the theme Floatrix, but matrix and hybrid are nice too. I am looking for the behavior in your screenshot "Geeklog Gallery Block" but I can't make that happen. Currently I have "Put Gallery2 sidebar in a geeklog block " on.

Edit:
Added some screenshots (theme Floatrix):

http://www.boatracingr11.com/GL/G2Bridge/index.php?g2_itemId=2846

http://www.boatracingr11.com/GL/G2Bridge/index.php?g2_itemId=2842


 
Profile Email
Quote
suprsidr
 February 18 2009 06:02 am  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Any Ideas?

Yup, new version up.
Only file to change is g2image.php

-s


There will always be...
 
Profile Email Website
Quote
maab
 February 18 2009 07:15 am  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

Any Ideas?

Yup, new version up.
Only file to change is g2image.php

-s



It is so very close to working. The g2image.php generates a page that lists all the Gallery's and lets you navigate. Problem is the photos never appear to allow you to select them.

Screenshot here:

http://www.boatracingr11.com/GL/G2Bridge/index.php?g2_itemId=2836&amp;g2_imageViewsIndex=1


My error log still indicated problems in the file g2image.php on line 892.


[18-Feb-2009 07:13:01] PHP Fatal error: Call to a member function on a non-object in /GL/fckeditor/editor/plugins/G2Image/g2image.php on line 892



Thanks for all the help!


 
Profile Email
Quote
suprsidr
 February 18 2009 07:40 am  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Again, just a minor change to g2image.php, new version up.
This is the second time I've run into this problem, this should fix it for everybody.
Thanks for your feedback.

-s


There will always be...
 
Profile Email Website
Quote
suprsidr
 February 18 2009 21:37 pm  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

@maab, you know G2Bridge also comes with autotags now too?
http://www.flashyourweb.com/staticpages/index.php?page=autotags

Easy-peasy way to add content to your articles/blocks/forums/staticpages......

Sunny Highlands
 
 
Arthurs Seat
 
 
Crocus
 
 
Eye In The Sky
 
 
New York City
 
 
Colorful Place
 
 
Summer Wood
 
 
Blue Sunrise
 
 
Newcastleridge
 
 
In The Lake
 
 
Ansesourced Agent
 
 


-s


There will always be...
 
Profile Email Website
Quote
maab
 February 18 2009 22:54 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

Again, just a minor change to g2image.php, new version up.
This is the second time I've run into this problem, this should fix it for everybody.
Thanks for your feedback.

-s



Excellent, seems to be working however when I submit the images are not there. I'm guessing it due to something not set correctly in the geeklog configuration. I checked what html is allowed and here is the list:

Allowed HTML Tags:
<p>, <b>, <strong>, <i>, <a>, <em>, <br>, <tt>, <hr>, <li>, <ol>, <ul>, <code>, <pre>, <font>, <img>, <style>, <a href>, <div>, <span>, <table>, <tr>, <th>, <td>, [code], [raw], [page_break], [story:], , [event:], [g2bridge:], [mini:], here, , [staticpage:], [staticpage_content:], [form:], [showblock:], [phpfunction:], [pageindex:],


 
Profile Email
Quote
maab
 February 18 2009 22:55 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

@maab, you know G2Bridge also comes with autotags now too?
http://www.flashyourweb.com/staticpages/index.php?page=autotags

Easy-peasy way to add content to your articles/blocks/forums/staticpages......

Cloudslikesilk
 
 
Sunset Beach
 
 
Melancholicrodeo
 
 
Californianfarmsunset
 
 
Mandown
 
 
Sunny Highlands
 
 
Woodlandhill
 
 
New York City
 
 
Giants Causeway
 
 
Mushroom Satjubilee Nature Trail Park
 
 
Manhattan
 
 


-s



Just started to play with this and it's such a great feature. Also I like how you have the option of lightbox in g2Image.


 
Profile Email
Quote
suprsidr
 February 18 2009 23:20 pm  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

I'm guessing it due to something not set correctly in the geeklog configuration

We always use "Skip HTML Filter for Root" otherwise you need to add every attribute to each element you want.
img src alt title height width border style........

Also I like how you have the option of lightbox in g2Image.

Never actually used it myself. Kirk added that.

-s


There will always be...
 
Profile Email Website
Quote
maab
 February 18 2009 23:54 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

I'm guessing it due to something not set correctly in the geeklog configuration

We always use "Skip HTML Filter for Root" otherwise you need to add every attribute to each element you want.
img src alt title height width border style........

-s



That fixed it, thanks you guys rock!


 
Profile Email
Quote
maab
 February 23 2009 07:36 am  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Ok new problem,

I was playing with allowing user the ability to post to the gallery.

In configuration-->G2Bridge ,I set "User albums module active" to true and the setting successfully saved. When I navigated to a another page on the site, the whole site is not available and only shows a white page.

In my stie's script log I get the following error:

[23-Feb-2009 07:27:04] PHP Fatal error: Undefined class name 'gallerycoreapi' in /private_GL/plugins/G2Bridge/functions.inc on line 1440


which is the following in line:

PHP Formatted Code
list ($ret, $modules) = GalleryCoreApi::fetchPluginStatus('module');


When I comment this line out the site is backup and working where I can then set "User albums module active" to false and uncomment line 1440 in functions.inc.


 
Profile Email
Quote
suprsidr
 February 23 2009 07:51 am  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Not sure how its possible, but your gallery wasn't instantiating before the call.
add a couple of lines just above 1440 so it looks like:

PHP Formatted Code

    function hasUserAlbum ($uid) {
        global $gallery, $_USER, $_G2B_CONF;
        if(!isset($gallery)){
            G2B_G2_init(true);
        }
        if ( $_G2B_CONF['user_albums'] ){ .....
 


-s


There will always be...
 
Profile Email Website
Quote
maab
 February 23 2009 23:03 pm  
Forum Junior
Junior

Status: offline

Registered: 02/16/09
Posts: 15

Quote by: suprsidr

Not sure how its possible, but your gallery wasn't instantiating before the call.
add a couple of lines just above 1440 so it looks like:

PHP Formatted Code

    function hasUserAlbum ($uid) {
        global $gallery, $_USER, $_G2B_CONF;
        if(!isset($gallery)){
            G2B_G2_init(true);
        }
        if ( $_G2B_CONF['user_albums'] ){ .....
 


-s



That did it! Awesome!!! Thanks again.


 
Profile Email
Quote
Content generated in: 1.54 seconds
New Topic Post Reply



 All times are PST. The time is now 04:32 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