What is it and how do I use it? Basically the page I'm calling the embedded calendar from is password protected and seperate from the file that everyone else views. I simply want the user to be able to use the admin functions. If there viewing the site there already authnticated and have Administration rights. How do I get into the admin panel with the gallery embedded in this administrator section. Thanks.
Posts: 32509
so you want to embed g2 only in an administrative page of another application and you only want to show the site admin section of g2.
1. find out what userId the user in the other application has that should
2. insert a row into db table g2_ExternalIdMap externalId = userId from your application, entityId = 6 (admin id in gallery2), entityType = GalleryUser.
3. in your page, include embed.php, call $ret = GalleryEmbed::init(array('activeUserId' => userId from your application, 'embedUri' => ..., 'embedPath' => ..., 'relativeG2Path' => ...));
4. then do $view = GalleryCoreApi::getRequestVariables('view'); if (empty($view)) { GalleryUtilities::putRequestVariable('view', 'core.SiteAdmin'); }
5. $data = GalleryEmbed::handleRequest();
rest:
see sample wrapper in the embedding & integration sticky topic, 1st post.