Support Forums | Demo Gallery [1.x] [2.x] | Downloads | News | Site Map ]
Nuked Gallery
  Create a FREE account or Login   As a guest, you don't have access to our FULL navigation system.
 Forum FAQForum FAQ   StatisticsStatistics   SearchSearch   UsergroupsUsergroups   FavoritesFavorites  

Are there still problems with auto-exporting users?

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
OmahaVike

Beginner
Beginner


Joined: Oct 25, 2005
Posts: 6

PostPosted: Sat Oct 29, 2005 12:31 am    Post subject: Are there still problems with auto-exporting users? Reply with quote

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.

any and all information is *greatly* appreciated.
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: Are there still problems with auto-exporting users?  

Back to top
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Mon Oct 31, 2005 7:45 am    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

create a new dummy phpnuke test user and visit the gallery again in the integrated mode and see if the error recurs.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
OmahaVike

Beginner
Beginner


Joined: Oct 25, 2005
Posts: 6

PostPosted: Mon Oct 31, 2005 2:11 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

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.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Mon Oct 31, 2005 2:51 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

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.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
OmahaVike

Beginner
Beginner


Joined: Oct 25, 2005
Posts: 6

PostPosted: Mon Oct 31, 2005 3:37 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

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.");
                                }


best of luck to everyone.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Mon Oct 31, 2005 3:39 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

ok, the needed code has been re-added and should show up in anonymous CVS in a few hours. this should resolve users not being added dynamically.

Regarding the admin username issue...i've got to come up with a more elegant solution to this.
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
OmahaVike

Beginner
Beginner


Joined: Oct 25, 2005
Posts: 6

PostPosted: Mon Oct 31, 2005 4:30 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

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.

just trying to help.
Back to top
Offline View user's profile Send private message
dari

Site Admin
Site Admin


Joined: Mar 03, 2003
Posts: 6284
Location: Washington Township, NJ, USA

PostPosted: Tue Nov 01, 2005 2:00 pm    Post subject: Re: Are there still problems with auto-exporting users? Reply with quote

hmm...good idea Smile
_________________
Back to top
Offline View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » PHP-Nuke Integration » Gallery 2 Integration View previous topicPrinter friendly versionView next topic

 
Jump to:  
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
All times are GMT - 5 Hours

Powered by phpBB © phpBB Group



Sponsors: Web HostingDedicated ServersDomain NamesDomain Name RegistrationDedicated Web HostingSEO Search Engine OptimisationSEOWeb Design New YorkSEO Web DesignWeb hosting AustraliaCheap Web Design

6th year online! 2003-2009
Legal • Use of this site consitutes agreement to the Acceptable Use Policy
Hosted by Implosion WorksSourceForge.net Logo • Theme by TonicMedia