Home | Support Forums | Your Account | Gallery [2] | 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  

How to make g2Img point to users album

 
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Issues » Olympus (phpBB3) / Gallery 2 Integration View previous topicPrinter friendly versionView next topic
Author Message
jettyrat

Moderator
Moderator


Joined: Nov 28, 2005
Posts: 908

PostPosted: Mon Nov 26, 2007 5:32 pm    Post subject: How to make g2Img point to users album Reply with quote

Here is how to make g2image start in a users specific album instead of the root album. Thanks to schwim for working with me on this for the phpBB2 integration!
Code: › #
#-----[ OPEN ]------------------------------------------
#
g2image/init.php

#
#-----[ FIND ]------------------------------------------
#
$g2h->init($user);

#
#-----[ AFTER, ADD ]------------------------------------------
#
if (empty($_SESSION['g2ic_last_album_visited'])) {
   $sql = 'SELECT user_gallery FROM ' . USERS_TABLE . ' WHERE user_id = ' . $user->data['user_id'];
   $row = $db->sql_fetchrow($db->sql_query_limit($sql, 1));

   if (!empty($row['user_gallery'])) {
      $_REQUEST['current_album'] = $row['user_gallery'];
   }
}

#
#-----[ OPEN ]------------------------------------------
#
g2image/g2image.php

#
#-----[ FIND ]------------------------------------------
#
require_once('init.php');
session_start();

#
#-----[ REPLACE WITH ]------------------------------------
#
session_start();
require_once('init.php');
Back to top
Offline View user's profile Send private message
AdBot
   Post subject: How to make g2Img point to users album  

Back to top
IngerK

User
User


Joined: Jan 19, 2006
Posts: 34

PostPosted: Tue Nov 27, 2007 3:29 am    Post subject: Re: How to make g2Img point to users album Reply with quote

Very nice, I think I will try that Very Happy
We have more than 300 user albums, I think it will be easyer if g2Img points to users album.
Back to top
Offline View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NukedGallery.net Forum Index » phpBB Issues » Olympus (phpBB3) / 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 HostingDomain NamesDedicated ServersDedicated Web HostingDomain Name RegistrationWeb hosting AustraliaSEO Web DesignWeb Design New YorkSearch Engine OptimizationSearch Engine Optimisation

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