Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Login via LDAP + Sort album names  (Read 23130 times)

0 Members and 1 Guest are viewing this topic.

Vincent

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
    • AEGEE-Nijmegen
Login via LDAP + Sort album names
« on: June 12, 2004, 04:43:13 pm »

Hello developers,

I just installed CPG 1.3.0 and you did a great job! Especialy the e-mail notification and multiple file uploads.

After installing I made some quick-and-dirty modifications to customize the gallery. It would be great if I don't have to do these modifications anymore in the next release. They are too 'dirty' to publish them as hacks, sorry. But I will give a short description.

The modifications I made are:
- Login via LDAP
In short: Bind using the supplied username/password. Do a ldap search on a person using the supplied username (=cn) and copy the name and e-mail to the cpg_users table.
- User galleries also in other categories (already requested by someone as: Allowing registered users to create albums in "public" catagories)
I've added a new category field in cpg_albums table. Use this new category field in index.php to display categories. I'm aware of the fact that this modification has big implications for the whole system. I can put user galleries by hand (any sql client) in the correct category.
- Sort album names Changed in index.php sort by 'pos' to sort by 'title' DESC. Maybe nice to add this feuture in the config?

Thanks for all your efforts!

Many greetings,
 Vincent de Groot
 Webmaster AEGEE-Nijmegen
 http://www.ru.nl/aegee

« Last Edit: January 04, 2005, 07:02:53 am by GauGau »
Logged

edalquist

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Login via LDAP + Sort album names
« Reply #1 on: January 04, 2005, 05:18:06 am »

On your sorting albums by name I'd like to second that it would be a very usefull feature to have the option to sort by title and the sort order. Here is a diff of my changes to index.php for CPG 132 to get sorting by title working:

Code: [Select]
diff index.php.bak index.php
407c407
<            ' ORDER BY a.pos '.
---
>            ' ORDER BY a.title DESC '.
551c551
<            "WHERE category = $cat ORDER BY a.pos ".$limit;
---
>            "WHERE category = $cat ORDER BY a.title DESC ".$limit;
560c560
<            ' ORDER BY a.pos '.
---
>            ' ORDER BY a.title DESC '.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Login via LDAP + Sort album names
« Reply #2 on: January 04, 2005, 07:02:41 am »

I agree that LDAP authentification would be very usefull on intranets. Your second suggestion should have gone somewhere else though, as our "one issue/question per thread" policy is meant to make things easier manageable. In the future, please do only post one issue per thread.

Joachim
Logged

Binerf

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Login via LDAP + Sort album names
« Reply #3 on: March 19, 2006, 11:26:38 am »

Hi,

Is ldap auth is envisaged in next Coppermine version please ?

THX.
Binerf
Logged

twobee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Login via LDAP + Sort album names
« Reply #4 on: April 30, 2006, 05:53:58 pm »

Sorry, for bringing up the old topic.

But, after working several ours on a alternative login script, I figured out that the best way to integrate a LDAP login is to modify the 'bridge/coppermine.inc.php'.
I already having a working LDAP-Login, but the session registration isn't implemented, yet. Maybe in some days I will release the final version, I have to get it working anyways. ;)

Logged

twobee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Login via LDAP + Sort album names
« Reply #5 on: May 12, 2006, 08:01:54 pm »

Ok it's ready now, sorry for only partial usage of the coppermine api.
The file is replacing the login.php, you also should deactivate registration.
It's completly passing the authorization to LDAP, if you not have a LDAP
Account you can't login.

You will need to add following to your include/config.inc.php

   $CONFIG['ldapserver'] = 'your.ldapserver.com';
   $CONFIG['ldapdn'] = 'ou=group,dc=ldapserver,dc=com';
   $CONFIG['ldapforcehttps'] = '1'; // or '0' to deactivate

and following to your language file, search for login.php and add this at the end. ->

  'ldap_warning' => 'Warning: LDAP authorization is not active.',
  'ldap_group_failure' => 'Error while login:',
  'ldap_group_failure_msg' => 'You are lacking rights to access this area.',
  'ldap_user_created_msg'] => 'User created  in database, please log in again.';


have fun,

twobee.
Logged

Binerf

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Login via LDAP + Sort album names
« Reply #6 on: May 21, 2006, 08:31:40 pm »

Thanks a lot but I've a problem with login.php:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/login.php.ldap on line 229

And nothing else.

Matt
Logged

jjhat1

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 17
Re: Login via LDAP + Sort album names
« Reply #7 on: May 30, 2006, 07:43:15 am »

I am interested in this feature but my test servers do not have access to a LDAP server and I only have my production server which I dont always have access to to test this out on.  Is there going to be some type of official plugin / bridge that will add support for LDAP to Coppermine or are users still resorting to hacks?
Logged

twobee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Login via LDAP + Sort album names
« Reply #8 on: May 31, 2006, 05:03:51 pm »

Thanks a lot but I've a problem with login.php:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/login.php.ldap on line 229

And nothing else.

Matt

Sorry for the late answer, but which Webserver (&Version) and PHP Version do you use?

The script were tested with Apache 2.0.58 and PHP 5.1.1 with a very restrictive php.ini.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Login via LDAP + Sort album names
« Reply #9 on: May 31, 2006, 05:06:13 pm »

Thanks a lot but I've a problem with login.php:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/login.php.ldap on line 229

And nothing else.

Matt
Did you use a WYSIWYG editor?
Logged

twobee

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Login via LDAP + Sort album names
« Reply #10 on: May 31, 2006, 05:08:37 pm »

Is there going to be some type of official plugin / bridge that will add support for LDAP to Coppermine or are users still resorting to hacks?

First I planned to make a inofficial bridge, but I couldn't get in touch with the bridging stuff. From my side I will not write a LDAP bridge in the near future. Other projects are in schedule, so this have to wait.
Logged

Binerf

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Login via LDAP + Sort album names
« Reply #11 on: June 06, 2006, 10:11:03 pm »

Sorry for the late answer, but which Webserver (&Version) and PHP Version do you use?

The script were tested with Apache 2.0.58 and PHP 5.1.1 with a very restrictive php.ini.
I use Apache 1.3.34 with php 4.4.2-1.

Perhaps it's my problem...

Matt
Logged

Binerf

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: Login via LDAP + Sort album names
« Reply #12 on: June 06, 2006, 10:12:11 pm »

Did you use a WYSIWYG editor?
"a WYSIWYG editor" ? To do what ?

Matt
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Login via LDAP + Sort album names
« Reply #13 on: June 07, 2006, 12:10:20 am »

Logged

HanOverFist

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Login via LDAP + Sort album names
« Reply #14 on: August 04, 2006, 05:10:54 pm »

Just wondering if LDAP has been rolled into a plug-in yet.
I tried the hack in this thread but all I get is a white screen.
dl'ed the new login.php and modified my include\config.ini.php and my lang\english.php
put all my ldap info into config.ini.php and modified login.php to include my bindings.

no dice.

cpg ver 1.4.8
linux sles ver 10
apache ver 2.2.0
php ver 5.1.2
mysql ver 5.0.18

GauGau, where should I post for help on this?
or am I on my own on this?

tia,
HanOver

edit>>>>>>>>
or is this currently the best method?
http://forum.coppermine-gallery.net/index.php?topic=19568.0
« Last Edit: August 04, 2006, 05:30:02 pm by HanOverFist »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Login via LDAP + Sort album names
« Reply #15 on: August 04, 2006, 08:27:49 pm »

Just wondering if LDAP has been rolled into a plug-in yet.
No, it hasn't been released.

GauGau, where should I post for help on this?
Nowhere, it goes unsupported.

or am I on my own on this?
exactly.

Read NO SUPPORT in FEATURE REQUESTS
Logged

HanOverFist

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
Re: Login via LDAP + Sort album names
« Reply #16 on: August 07, 2006, 02:43:57 pm »

I was not asking for support!
I asked if it had been rolled into a plug-in.
If it had, I was asking where to go!
I didn't think that was bad karma!

Thanks for the reply.

Jay

(this post probably is though, figured I earn it)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Login via LDAP + Sort album names
« Reply #17 on: August 07, 2006, 02:52:41 pm »

"post for help" equals "ask for support". You have asked for support, and I posted the answers to your questions. What's the use of your reply ::)? Don't clutter this board with meta discussion about karma!
Logged

vimets

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 8
Re: Login via LDAP + Sort album names
« Reply #18 on: January 15, 2013, 10:04:26 am »

Fatal error: Call to a member function login() on a non-object in C:\wamp\www\cpg132\login.php on line 154

i know it's old and outdated but we use this version and we need a ldap bridge working :( and there is no more info on the internet about the topic

i'm using
php: 5.2.2
apache: 2.2.22
mysql: 5.5.24

if ($USER_DATA = $cpg_udb->login( addslashes($_POST['username']), isset($_POST['remember_me'])))

is this line, the object cpg_udb is not initalized anywhere :(

need some light over here.

Thanks in advance.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4704
    • Windsurf.me
Re: Login via LDAP + Sort album names
« Reply #19 on: January 15, 2013, 10:55:36 am »

Sorry, but we cannot help you. Your version is just too old. In addition we cannot really support local/self hosted installations as they can cause problems we cannot control.
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1] 2   Go Up
 

Page created in 0.026 seconds with 20 queries.