From: Christian M. <h0...@p0...> - 2004-08-28 00:03:18
|
Got this from Vince, or vjl323 in the forums/irc. Is the changes he mentions a potential 1.4.5 candiate? -----Original Message----- From: Vince LaMonica [mailto:vj...@cu...] Sent: 26. august 2004 16:14 To: Christian Mohn Subject: Integrating Geeklog and Gallery document Hi Christian, Here's the long-promised document for helping out folks who might want a bit more integration within Gallery/Geeklog. Note that with 1.4.4, Gallery is very easy to integrate, as the problems I was having before were due to the integration scripts not working well with an earlier version of Gallery. Anyway, it's 7am...I'm going to catch some sleep before the entire morning is wasted. :) Hope this comes in handy... /vjl/ Integrating Gallery within Geeklog - A Few Tips ----------------------------------------------- Long ago, putting Gallery into the Geeklog CMS was quite a challenge. With Gallery 1.4.4, and Geeklog 1.3.9sr1, it is quite easy. However, I found a tip which makes the integration even slicker. As it currently stands, only a Geeklog admin can create/edit albums within Gallery, using Gallery's supplied integration scripts. However, there's a way to allow all Geeklog users or just some Geeklog users the ability to create their own albums, yet not be a Geeklog *or* Gallery admin. Read on for instructions on how to do this. First off, make sure you have a working Geeklog installation. Make sure you've followed all of the Geeklog docs, and have a working installation. Note the location of your public geeklog directory. For example's sake, I'm going to use this directory as the main, public geeklog install directory: /var/www/html/geeklog/ Now you need to download Gallery. Once you do, move the tar.gz file into the above directory and untar/ungzip it there. You should now have another directory within your geeklog directory: /var/www/html/geeklog/gallery You'll need to follow the wonderful instructions that come with Gallery - set it up using whatever prefs you want, but make sure that you pick "Geeklog" from the "Embed gallery" setting. This tells Gallery to use your Geeklog user database instead of its own to handle the authentication. If you've gotten this far, you'll notice that when you login as the Geeklog admin user, you are also logged in as the Gallery admin user. You can create/edit/delete albums, change permissions to existing albums to match your geeklog users, etc. However, none of your normal Geeklog users will be able to create albums, or edit/delete their own albums. In order to enable that feature, you will need to get your favorite text editor out [probably the same one you used to configure Geeklog with], and edit a text file. Assuming a directory structure like this example, you will need to edit the follow file: /var/www/html/geeklog/gallery/classes/geeklog/User.php. You will need to scroll down to approximately row 60, looking for this line of text: function loadByUserName($uname) { Once you spot that, look a few lines down, and notice this line: $this->canCreateAlbums = $this->canCreateAlbums(); You will want to change this line. Or better yet, comment it out, by putting a "#" [without the quotes] in front of it. Then type EITHER on of the following two lines: $this->canCreateAlbums = 1; or $this->canCreateAlbums = SEC_inGroup('PhotoGallery Admin', $this->uid); The first line allows ALL of your Geeklog users the ability to create albums, and edit/delete their own albums. The 2nd line allows only members of the group, "PhotoGallery Admin" to create albums and edit/delete their own albums. You must pick one or the other. If you pick the 2nd line, you will need to go into Geeklog, as admin, and create a new group, named exactly: "PhotoGallery Admin". Then you can assign that group to as many [or as few] users as you want within Geeklog. Any user belonging to that group will be able to create albums, and edit/delete their albums. If you need any help, please feel free to e.mail me: vj...@vj.... Vince LaMonica <vj...@vj...> |