Gallery2 at NukedGallery.net

dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2005-03-08 14:57

I've done an install of G2-Beta 1 at NukedGallery.net to show what an embedded G2 installation will look like:
http://www.nukedgallery.net/modules.php?name=gallery2

Of note to the devs: the layout of the Gallery page is no where near as pretty as it is in standalone:
http://www.nukedgallery.net/modules/gallery2/main.php

I have a feeling this has to do with CSS conflicts, etc.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 15:34

it's not CSS conflicts, but missing CSS.. it doesn't look like you're including G2's header content in your page headers.. make sure you're using $data['headHtml'] that is returned from GalleryEmbed::handleRequest().
looks great otherwise!
also fyi, i'll soon be committing some CSS changes to help G2 not conflict with embedded apps, ie we won't apply CSS to top level tags like form, h1, etc but only to #gallery form, #gallery h1, etc.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2005-03-08 15:35

actually, I didn't do the embedding myself, I followed the embedding HOWTO in the CVS repository...

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-03-08 16:05

in that case file a bug :)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 16:07

dmolavi, I'm not the author of the *nuke / G2 modules, but I'm in charge of instructing the guys who do these modules.

referring to https://sourceforge.net/tracker/?func=detail&atid=107130&aid=1159804&group_id=7130

Is nukedgallery using postnuke (hope so) or phpnuke?
I'm quite sure I could fix it, but I'd rather delegate the issue to the author of the module, see the sticky embedding thread.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Wed, 2005-03-09 16:09

valiant, nukedgallery uses PHPNuke, not postnuke.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 16:29
dmolavi wrote:
valiant, nukedgallery uses PHPNuke, not postnuke.

My condolences ;)

However, i just took a look at the Readme.txt of the phpnuke integration.
Did you replace localhost in the css urls?
Can't help you there. It's up to drumicube , the author. G2 returns the css links, he has to paste them into the header somehow.

If you take a look at the html source of http://www.phpnuke-web.com/modules.php?name=gallery2 , it's the demo site of drumicube, then you see that the css links are there, but outside the <head> part of the html page, which is wrong.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Wed, 2005-03-09 16:34

replace localhost in CSS urls? that's not in the readme anywhere...i noticed that the CSS isn't being imported into my embedded install at all....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 16:46

we are both talking about the phpnuke G2 module from the sf.net cvs, right?
in the foldercvs integration/gallery2/phpnuke/html is a second Readme file, and there are instructions about the css links.
But this css links won't work at all if you don't replace the "localhost" part in the url by your own domain or ip.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Wed, 2005-03-09 16:50

ah...gotcha..didn't see the second readme..

got the CSS imported, but it's hijacking the CSS for the rest of the site, too....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 17:15

well, no1 said this hardcoded hack was a good thing. i didn't see drumicube in the forums lately, hope he will return. maybe you could send him a wake-up-on-pm message :)

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2005-03-15 16:32

i upgraded to the lastest G2 in CVS, stuck the CSS includes in the phpnuke header file as required in the integration README, and the results are the same...G2 hijacks the CSS style for the entire site. i've tried reordering the calling of the css files, but to no avail.

any advice?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-03-15 20:33

try contacting drumicube, the author of this particular integration. if you get no response for a certain time, tell me and i'll look into it.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2005-03-15 20:37

will do...i'll let you know if i get anywhere.

 
c4actbe
c4actbe's picture

Joined: 2004-09-01
Posts: 83
Posted: Tue, 2005-03-15 23:21

I tried to create 2 blocks for G2, one is somewhat working, another one is not.
What doesn't work - Block Random Image:

<?php
if (eregi("block-G2_Random_pictures.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
@readfile('http://localhost/cpg8/gallery/main.php?g2_view=imageblock:External&g2_blocks=randomImage');
 ?>

Problem: Image shows up, but it is outside the actual block space and ,of course, it opens non-embedded photo, after clicking on thumbnail.

++++++++++++++++++

Gallery search is ugly, but i am not a programmer and it works:

<?php
if (eregi("block-SearchGallery.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
$content  .= "<form id=\"SearchSystemContent\" action=\"index.php?name=gallery2\" method=\"post\" onsubmit=\"return checkForm()\">";
$content  .= "<div align=\"center\"><input type=\"hidden\" name=\"g2_returnName\" value=\"album\">";
$content  .= "<input type=\"hidden\" name=\"g2_return\" value=\"name=gallery2&g2_view=core:ShowItem&amp;g2_itemId=17\">";
$content  .= "<input type=\"hidden\" name=\"g2_formUrl\" value=\"name=gallery2&g2_view=core:ShowItem&amp;g2_itemId=17\">";
$content  .= "<input type=\"hidden\" name=\"g2_view\" value=\"search:SearchScan\">";
$content  .= "<input type=\"hidden\" name=\"g2_form[formName]\" value=\"SearchSystemContent\">";
$content  .= "<input type=\"text\" value=\"Search gallery\" onFocus=\"if(this.value=='Search gallery')this.value='';\" name=\"g2_form[searchCriteria]\" id=\"searchCriteria\" size=\"18\" onblur=\"mblur()\">";
$content  .= "&amp;";
$content  .= "<input type=\"hidden\" name=\"g2_form[useDefaultSettings]\" value=\"1\">";
$content  .= "<input type=\"submit\" name=\"Submit\" value=\"Submit\"><br>or<br>\n";
$content  .= "<a href=\"index.php?name=gallery2&g2_view=search:SearchScan&g2_form[useDefaultSettings]=1&g2_return=%3Fg2_view%3Dcore%3AShowItem%26amp%3Bg2\">\n";
$content  .= "<input type=\"submit\" name=\"Submit\" value=\"Advanced Search\"></a></div></form>;\n";

?>
 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Fri, 2005-03-18 18:01

Sorry for the long delay guys, but i was outside France for an urgent mission concerning my job...

I'm back now, and i'm still there:
Just give me one or two more days to update my status about the project, i will also do my best to reply everybody as far as i can about phpnuke & G2.

By the way, nice to see the software is now in beta !

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-03-18 19:41

Yay, good to have you back :)

 
husui

Joined: 2005-03-21
Posts: 1
Posted: Mon, 2005-03-21 15:52

dmolavi,

on my site (v7.5), i could not get it to work by following the readme either. try using the following code instead at the same location of the header.php:

echo "<LINK REL=\"StyleSheet\" HREF=\"/gallery2/layouts/matrix/layout.css.php\" TYPE=\"text/css\">\n\n\n";
echo "<LINK REL=\"StyleSheet\" HREF=\"/gallery2/themes/matrix/styles/theme.css\" TYPE=\"text/css\">\n\n\n";
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-21 16:07

if you're using current G2 code then remove "styles/" from the path to theme.css.. that file has moved. also remove ".php" from the first one.. that file is now just layout.css

 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Mon, 2005-03-21 20:02

Right !
I modified the CSS to the new one, and it works.
But this CSS is still hijacked and it is in total conflict with the one used by the portal...
Concerning layout.css i can't find it, but there is a layout.inc instead...
I'm using gallery2.2005-03-21-09-35-30.zip

Changed to this:

<style type="text/css" media="all">@import url(http://localhost/gallery2/templates/layout.css);</style>
<style type="text/css" media="all">@import url(http://localhost/gallery2/themes/matrix/theme.css);</style>
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-21 20:26

remember that you could use the headHtml in combination with the parseHead() method from embed.php, no hardcoded styles are necessary.

 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Mon, 2005-03-21 20:30

Thanks for the tip i'm investigating this right now. :wink:

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-03-21 20:33

take a look at the xaruser/main.php in the xaraya integration which is now available as a nightly snapshot, see the link in my signature.

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Tue, 2005-03-22 20:54

the problem is, at least on mine, that $g2moddata doesn't have headHTML set, so the parseHead() has nothing to work with...

 
dmolavi
dmolavi's picture

Joined: 2002-12-05
Posts: 573
Posted: Mon, 2005-03-28 20:43

A real fix, putting the head html in the header:
http://www.nukedgallery.net/modules/gallery2/index.phps

"Dirty hack" *cough*cough* taken from Gallery 1.