No Thumbs or Images after embedding into PhpNuke 7.5

madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Thu, 2005-04-14 07:58

The gallery works fine as long as I don't view it through php nuke.

Problem: No Thumbs or Images.
Error: --> location to images show --> "modules.phpmodules" w/o quotes.
example -->http://localhost/phpnuke75/modules.phpmodules/gallery2/
blah blah blah.....

If I remove the ".phpmodules" from the image link in the browser then it works.

Info:
PhpNuke 7.5
Gallery2beta2
CVS phpnuke intergration.
Currently running on a test machine WinXp, IIS-5, Php 5

Question --> Where is "modules.phpmodules" coming from?

I know its in the embed files somewhere I just got tired of looking... ;-)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-14 08:54

what do you use as embedPath, embedUri, relativeG2Path?
where is gallery2 installed? i see phpnuke is installed in /phpnuke75/

 
madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Fri, 2005-04-15 06:02

<?
$g2embedparams = array (
'embedphpfile' => 'c:\inetpub\wwwroot\phpnuke75\modules\gallery2',
'embedUri' => 'http://localhost/phpnuke75/modules.php?name=gallery2',
'relativeG2Path' => '/gallery2/',
'loginRedirect' => 'modules.php?name=Your_Account',
'activeUserId' => '0',
);
$g2mainparams = array (
'showSidebar' => 'true',
);
$g2configurationdone = 'false'; ?>

The gallery is installed in the phpnuke75/modules/gallery2

Reinstalled nuke and gallery ->
Standalong Gallery still works fine.
Embeded Gallery into phpnuke does not show thumbs or images.

The location of the thumbs and images now show this -->
[ http://localhost/phpnuke75/modules.php/gallery2&g2_] blah blah blah.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-04-15 09:28

ah, I checked the config file of the cvs version of the phpnuke integration.

<?
$g2embedparams = array (
  'embedphpfile' => '/mypath/to/gallery2',
  'embedUri' => 'http://mywebsite.com/modules.php?name=gallery2',
  'relativeG2Path' => '/gallery2/',
  'loginRedirect' => 'modules.php?name=Your_Account',
  'activeUserId' => '0',
);
$g2mainparams = array (
  'showSidebar' => 'true',
);
$g2configurationdone = 'false'; ?>

i'm not too happy with that code.

drumicube, could you please make use of 'embedPath'?
And please advice your users to not use a full 'embedUri' (not with the http://domain.com/ part, in the above case just embedUri => 'modules.php?name=gallery2').

 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Sun, 2005-04-17 17:28

To be honest, i'm also not really happy with it !!! :lol:
It was a problem still the very beginning, and even if i have now simplify it, i believe this isn't perfect yet !

Here is my new personnal config file after activation:

<?
$g2embedparams = array (
  'embedphpfile' => 'C:/www/gallery2',
  'embedUri' => 'modules.php?name=gallery2',
  'embedPath' => '/phpnuke/',
  'relativeG2Path' => '../gallery2/',
  'loginRedirect' => 'modules.php?name=Your_Account',
  'activeUserId' => '0',
);
$g2mainparams = array (
  'showSidebar' => 'true',
);
$g2configurationdone = 'true'; ?>

For your information:
- WWWROOT is c:\www
- g2 is installed in c:\www\gallery2
- phpnuke is installed in c:\www\phpnuke

-1- Absolute URI is now fixed thanks to the embedPath parameter, no more needs for mywebsite.com

-2- loginRedirect & activeUserId had never been used since the beginning !
I have removed them from the admin interface, but temporary kept an hidden input in the form that generate the config file. If they are really unnecessary i will remove them !

-2- The same to embedUri, as this value is not custom and only obtained by the module installation folder.

-3- I have also rename fields in the admin page to be more user friendly, as i'm quite sure a casual user have no ideas of what embedURI could means. Finally only 3 parameters remains in the admin page:

Gallery2 Installation File Path: C:/www/gallery2
PhpNuke Root URI: /phpnuke/
Relative G2 URI from PhpNuke: ../gallery2/

It's really better, but not perfect, I would like to get rid of the last absolute field 'C:/www/gallery2' but i didn't managed to success, and i don't even know if this is possible. And by the way, if i'm not wrong G2 main installation ask for it too, no ?

Valiant, What do you think of it ?
Do you advice me to remove loginRedirect & activeUserId from the configfile ? I don't see how they are used ! Perhaps on some forbidden albums permissions ?

Cheers.

 
drumicube

Joined: 2005-01-07
Posts: 32
Posted: Sun, 2005-04-17 17:32

Madvoc, for your problem try this:

'relativeG2Path' => '/phpnuke75/modules/gallery2/'

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-04-17 18:38

drumicube,
@loginredirect: keep it, could be useful.
@activeUserId: well, you don't need it in the config file, as long as you hand a activeUserId over to G2 in the init call. the config file is all yours, do with it what you want :)
the loginredirect should not be dynamic, it should just point to the url that points to a phpnuke login page. the activeUserId should not be settable in the admin interface. i see no reason why it should be. the activeUserId is just the phpnuke user id.
@spaces in your source code between GalleryEmbed and the "::" : why??
@PhpNuke Root URI: /phpnuke/ in the admin page: that's ok. usually, you could find something like that out. so the user has not to set it. but it's ok.
@getting rid of absolute path: first, i did not differentiate between the "Relative G2 URI from PhpNuke" and the "Gallery installation path". Both were relative and the same. Then I figured out, that they can be different. So I ended up with a solution for xaraya, were "Relative G2 URI from PhpNuke" is required and "Gallery Installation path" was optional. If it was not set, then my code would just copy the value from "Relative G2 URI from PhpNuke".
But it's perfect like you have it right now. It's safer to have the "Gallery Installation path" absolute.

Quote:
And by the way, if i'm not wrong G2 main installation ask for it too, no ?

G2 standalone installation asks for the g2data path. It makes a pretty good guess automatically so most people don't have to edit it.

I thinks it's good as it is.

I'm still working from time to time on a generic synchronization code, this will be the solution for the updated user/deleted user synchronization which phpnuke can't provide.

 
madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Mon, 2005-04-18 09:04
drumicube wrote:
Madvoc, for your problem try this:

'relativeG2Path' => '/phpnuke75/modules/gallery2/'

Thanx for the help on this....

Yes I did try the above.. it appending anything I put into 'relativeG2Path'.

Seem like its not trimming back far enough ... this is what it's showing for the location of the thumbs:

--> http://localhost/phpnuke75/modules.php/phpnuke75/modules/gallery2/main.php?g2_view=
blah blah blah.....

 
madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Mon, 2005-04-18 09:59

Shit.. I just got it to work...

This is what I did...

-->
Removed 'relativeG2Path' from the gallery2.cfg
Removed 'relativeG2Path' => $g2embedparams[relativeG2Path] from index.php line 101

Added 'embedPath' => '/phpnuke75/modules/gallery2' to the gallery2.cfg
Added 'embedPath' => $g2embedparams[embedPath] to index.php

So the working code for me -->

<?
$g2embedparams = array (
'embedphpfile' => 'c:\inetpub\wwwroot\phpnuke75\modules\gallery2',
'embedUri' => 'http://localhost/phpnuke75/modules.php?name=gallery2',
'embedPath' => '/phpnuke75/modules/gallery2/',
'loginRedirect' => 'modules.php?name=Your_Account',
'activeUserId' => '0',
);

TESTING -->
-everything seems to be ok.. all thumbs work now... as an Admin and Guest..
-Gallery admin panel shows all images..

cool :lol:

Now to get the phpnuke gallery configuration panel set with embed path... 8)

 
madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Mon, 2005-04-18 10:22

ahhh dammit just when I thought all is good.. lol

There is only one problem with above.. the dam themes... its only using the Gallery matrix theme and not the phpnuke theme..

well guess it will need to relativeG2Path anyway... lol

wtf it works for now... :lol:

 
madvoc
madvoc's picture

Joined: 2005-04-14
Posts: 6
Posted: Thu, 2005-04-21 05:31

OK Finally...

For those who have this similar problem -->

1 - Just at the EmbedPath to both the cfg, and index integration files..
2 - Now in order to get the phpnuke theme to work with the gallery, do this -->

a - go to the gallery/themes/matrix folder.
b – backup the theme.css then edit it..
c – once opened remove any setting with colors including backgrounds colors.
Example -> color: #333 and background-color: #e7e7e7.
d – do not delete the background images.. you can still use them…

Well hope this helps… here the code that is working for me...->

GALLERY CFG

<? 
$g2embedparams = array ( 
  'embedphpfile' => '/mypath/to/gallery2', 
  'embedPath' => 'root path of phpnuke',
  'embedUri' => 'http://mywebsite.com/modules.php?name=gallery2', 
  'relativeG2Path' => 'modules/gallery2/', 
  'loginRedirect' => 'modules.php?name=Your_Account', 
  'activeUserId' => '0', 
); 
$g2mainparams = array ( 
  'showSidebar' => 'true', 
); 
$g2configurationdone = 'false'; ?> 

INDEX.PHP


$ret = GalleryEmbed::init(array(
 'embedphpfile' =>$g2embedparams[embedphpfile],                 
 'embedPath' =>$g2embedparams[embedPath],
 'embedUri' => $g2embedparams[embedUri],
 'relativeG2Path' => $g2embedparams[relativeG2Path],
 'loginRedirect' => $g2embedparams[loginRedirect],
 'activeUserId' => "$uid",
 'activeLanguage' =>$g2currentlang));
 
cybrax

Joined: 2008-02-08
Posts: 2
Posted: Fri, 2008-02-08 10:56

Hi...Im havin a problem getting the images to show in my embedded gallery...
Its prob a stupid question bt goin to ask it anywhay...
I would just like to know
Where i would find the following code or where i shoudl put it in

$g2embedparams = array (
'embedphpfile' => 'c:\-----\wwwroot\phpnuke75\modules\gallery2',
'embedUri' => 'http://localhost/phpnuke75/modules.php?name=gallery2',
'relativeG2Path' => '/gallery2/',
'loginRedirect' => 'modules.php?name=Your_Account',
'activeUserId' => '0',
);
$g2mainparams = array (
'showSidebar' => 'true',
);
$g2configurationdone = 'false'; ?>

 
cybrax

Joined: 2008-02-08
Posts: 2
Posted: Fri, 2008-02-08 11:20

Hey thanks working now..:)
actually not....the pics are showing but the whole look ad feel of the gallery is gone and the header is not showing....
PLS HELP

i used the same code from above

 
SnyperBob
SnyperBob's picture

Joined: 2006-01-13
Posts: 10
Posted: Sat, 2008-03-15 13:24

Hmmm, I'll have to try this out. I just saw the post from 02-2008 from ocybrax saying he had to use this code still.

My 1.4.4 Gallery install isn't working correctly anymore, I tried 1.5.7 and it won't embed into 7.5 patched correctly, same with Gallery2.

I'll try this code out when I get a chance and post up if it works for me! Thanks guys