Posted: Sat Oct 29, 2005 12:31 am Post subject: Are there still problems with auto-exporting users?
nice work to the ng team. very nice work. slick code, amigos.
have a slight problem:
grabbed the snapshot from three days ago. implemented integration package with very few hiccups. while testing my install with no live users:
1) installed per directions and exported users: no problems. they can access the gallery fine.
2) when a new user registers with phpnuke, they can access all of the modules with no problems (thus, confirming a successful user add to phpnuke). however, when they attempt to pull up the gallery, we see an oopsie:
Fatal error: Call to undefined function g2addexternalMapEntry() in /var/www/html/modules/gallery/index.php on line 112
so, for grins and giggles, i manually exported the users through the modules administration / g2 panel. now the user can get to the gallery and breeze right through.
i read in a previous thread (like two months ago), that this has been resolved. if you need me to dig deeper, i most certainly can.
Posted: Mon Oct 31, 2005 2:11 pm Post subject: Re: Are there still problems with auto-exporting users?
still the same error.
Call to undefined function g2addexternalMapEntry() in /var/www/html/modules/gallery/index.php on line 112
in testing, i used a brand new username/password/email.
when i grepped the directories, the only place i could find the function its referring to (g2addexternalMapEntry) is in admin/index.php. yet in index.html, there is no such function. is that right?
[[[ update ]]]]]]
got it working. it boiled down to the whole admin/administrator issue.
in index.php, i changed the following:
Code: ›
if (is_admin($admin)) {
// we log as an admin
$uid='admin';
}
TO:
Code: ›
if (is_admin($admin)) {
// we log as an admin
$uid='administrator'; // or whatever you chose it to be.
}
and it worked. thanks for your help though, dari! hope this helps others.
one thing of note, i didn't see this admin/administrator issue in the readme. you might consider slapping 'er on in there.
Joined: Mar 03, 2003 Posts: 6284 Location: Washington Township, NJ, USA
Posted: Mon Oct 31, 2005 2:51 pm Post subject: Re: Are there still problems with auto-exporting users?
hmm..i took it out of index.php in the gallery2 directory. i guess i'll have to re-add it. i will do that shortly.
re: your code change, yes, i should add that to the README...that $uid variable should be the admin username you entered into the initial G2 setup. _________________
Posted: Mon Oct 31, 2005 3:37 pm Post subject: Re: Are there still problems with auto-exporting users?
one other thing of note for documentation sake...
even with the above mentioned change, there is one more you might have to make. when a new user signs up for the very first time, and they jump right into the gallery, they'll still get that error. if they click on the link a 2nd time, it gets cleared up. i'm guessing it's a php buffer thing. whatever it is, make the following change IF, and only if, you're still getting that error.
in index.php, find the following lines (hint: search for "g2addexternalMapEntry". its the only occurence of that string.) :
Code: ›
if (!g2addexternalMapEntry($nukeuser_uname, $uid, 0)) {
return false;
}
and replace it with....
Code: ›
// pmf 2005.10.31
// this keeps erroring out on a brand spanking new user.
// so, i have to first check if its defined, then call it.
if (function_exists('g2addexternalMapEntry'))
{
if (!g2addexternalMapEntry($nukeuser_uname, $uid, 0)) {
return false;
}
}
else
{
echo("There is an error with new users.<br>");
echo("Please click the link one more time.<br>");
echo("If the error persists, please contact the webmaster.");
}
Posted: Mon Oct 31, 2005 4:30 pm Post subject: Re: Are there still problems with auto-exporting users?
can't you just ask the database? i know there's a special g2 database api (which i haven't found yet).
Code: ›
// WARNING: this is not actual code.
$strPulledAdmin = g2->query("select g_userName from g2_User where g_fullName = 'Gallery Administrator'");
or something else similar to that? i know the syntax isn't correct, but the method should be clear. shouldn't be too hard to dynamically pull that in, regardless of what the installation admin name was.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum