RoundCube Webmail Forum  

Go Back   RoundCube Webmail Forum > Miscellaneous > Roundcube Discussion

For more information about the ads and why they're here, please see the FAQ
Reply
  #1  
Old 09-08-2006, 11:02 AM
Registered User
 
Join Date: Sep 2006
Posts: 6
Downloads: 0
Uploads: 0
Default Free LDAP Server

Is some LDAP server ?
Like free DNS server GraniteCanyon ?
(My Hosting dont have LDAP support)

Thanks to all !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 09-08-2006, 01:23 PM
Registered User
 
Join Date: Sep 2006
Posts: 6
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

If "NO" global contact exist, I have created a method.

INSERT into database ROUNDCUBE, table "contacts", contacts with user_id = empty,

INSERT INTO `contacts` ( `contact_id` , `user_id` , `changed` , `del` , `name` , `email` , `firstname` , `surname` , `vcard` )
VALUES
(NULL , '', '0000-00-00 00:00:00', '0', '', 'guillermolococo1@domain.com', '', '', ''),
(NULL , '', '0000-00-00 00:00:00', '0', '', 'guillermolococo2@domain.com', '', '', ''),
.....

AND then modify /program/steps/mail/compose.inc in line 753

$sql_result = $DB->query("SELECT name, email
FROM ".get_table_name('contacts')." WHERE user_id=?
AND del<>1",$_SESSION['user_id']);

.. to ..

$sql_result = $DB->query("SELECT name, email
FROM ".get_table_name('contacts')." WHERE ( user_id=? OR user_id='' )
AND del<>1",$_SESSION['user_id']);

and now GLOBAL CONTACTS have been installed without LDAP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 09-13-2006, 02:21 PM
Registered User
 
Join Date: Sep 2006
Posts: 4
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Hmm, this gave me an idea.
How about adding a 'public' flag to each contact entry, so that when a user adds a contact he can chose to tick the 'public' checkbox and make the contact available for all?

This would of course mean that we would have to make two separate views, one for personal contacts and one for public, but that's more or less trivial I think.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 09-15-2006, 08:46 AM
Registered User
 
Join Date: Sep 2006
Posts: 6
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Good idea !

Nice !
Change the Query, add 1 row in mysql, and change addcontacts.

(I try that the next week. Now Im with problems opening attachments.
Im running RoundCube in 150 email client company and open PDF is high priority.)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 10-12-2006, 07:17 PM
Registered User
 
Join Date: Oct 2006
Posts: 8
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Just to update this:

The user_id field is required, and defaults to 0 (for MySQL at least)
To make this work, I had to change
Code:
( user_id=? OR user_id='' )
to
Code:
( user_id=? OR user_id=0 )
because user_id defaults to 0

The code in compose.inc was located on line 783 in my install (0.1-beta2)

Edit
You will also need to change line 128 of compose.inc if you want to be able to send to global contacts from the address book
this bit:
Code:
    $sql_result = $DB->query("SELECT name, email
                 FROM ".get_table_name('contacts')."
                 WHERE user_id=?
                 AND  del<>1
                 AND  contact_id IN (".$_GET['_to'].")",
                 $_SESSION['user_id']);
change line 128 to
Code:
WHERE ( user_id=? OR user_id=0 )


Just changing /program/steps/mail/compose.inc means that the global contacts will only appear when someone composes a message (in the autocomplete).
If you want the global contacts to appear in the addressbook, then modify all instances of
Code:
( user_id=? OR user_id='' )
to
Code:
( user_id=? OR user_id=0 )
in /program/steps/addressbook/func.inc
Edit
You will also have to modify /program/steps/addressbook/list.inc in order to see more than one page of contacts

This will allow viewing the list of contacts, but not the contact details for shared contacts.
If you want to enable viewing details of the shared contacts, then modify the same code in /program/steps/addressbook/show.inc
when a user tries to edit a shared contact, they will see contact not found.

to enable editing modify: /program/steps/addressbook/edit.inc
to enable deletion modify: /program/steps/addressbook/delete.inc

I tried modifying /program/steps/addressbook/list.inc but I didn't see any changes. If anyone knows what that file does, then let me know.

Also when you enable view of the shared contacts in the address book, selecting a contact and choosing compose mail to does not work. I will let you guys know if I find out how to fix that.
Edit
I fixed it, see above



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 10-13-2006, 03:06 AM
Registered User
 
Join Date: Oct 2006
Posts: 8
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Quote:
Originally Posted by rocky
Hmm, this gave me an idea.
How about adding a 'public' flag to each contact entry, so that when a user adds a contact he can chose to tick the 'public' checkbox and make the contact available for all?

This would of course mean that we would have to make two separate views, one for personal contacts and one for public, but that's more or less trivial I think.
Rocky,

I really like your idea here. I would like to figure out how to do this, but I am somewhat of a newbie. I have been looking over the code now for 4 hours and still have no clue what I need to do to accomplish this. I actually would like to have a set of radio buttons where one is Public and the other is Private. If you have any pointers for me please let me know.

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 10-17-2006, 05:00 PM
Registered User
 
Join Date: Oct 2006
Posts: 6
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

This is fascinating, especially as I was looking for something just like this!

I'm a newbie to roundcube, and would like to ask: we have a hundred or so users that I'd like to include in the db. If I do, for example, this ..

INSERT INTO `contacts` ( `contact_id` , `user_id` , `changed` , `del` , `name` , `email` , `firstname` , `surname` , `vcard` )
VALUES
(NULL , '', '0000-00-00 00:00:00', '0', '', 'guillermolococo1@domain.com', '', '', ''),
(NULL , '', '0000-00-00 00:00:00', '0', '', 'guillermolococo2@domain.com', '', '', ''),
.....


... as already mentioned.... can I put other values in those lines where there are commas? Sort of like..

(NULL , '', '0000-00-00 00:00:00', '0', '', 'guillermolococo1@domain.com', ''his_first_name ''his_second_name''),


..?

Would that work?

Also, roundcube on my FreeBSD system was installed via the ports collection. To change the compose.inc, do I need to compile by hand?

Thanks..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 10-17-2006, 07:21 PM
Registered User
 
Join Date: Oct 2006
Posts: 8
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

PhpMyAdmin is a good tool to use to modify the db. You can import from a properly formatted .csv file Export the addressbook db to a .cvs file to see the format.

all of the files that rouncube uses are plain text files, just mod them with a text editor, and refresh the page. Make sure to backup the originals.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 01-11-2007, 04:54 AM
Registered User
 
Join Date: Jan 2007
Posts: 9
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Just to let everyone in this thread know, I've taken parts of these steps and combined them with another method here - http://roundcubeforum.net/forum/inde...sg5057#msg5057

Works pretty good on my server.

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 03-22-2007, 07:53 PM
Registered User
 
Join Date: Mar 2007
Posts: 1
Downloads: 0
Uploads: 0
Default Re: Free LDAP Server

Hi,

Thanks qpmailman for your post about global addressbook.

you said:
Also when you enable view of the shared contacts in the address book, selecting a contact and choosing compose mail to does not work. I will let you guys know if I find out how to fix that.

Abou that, i found the solution. in ../steps//mail/compose.inc a line like:

/****** get contacts for this user and add them to client scripts********/

$sql_result = $DB->query("SELECT name, email
FROM ".get_table_name('contacts')." WHERE (user_id=? OR user_id=0)
AND del<>1",$_SESSION['user_id']);

add the condition again there.

bye!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

For more information about the ads and why they're here, please see the FAQ

All times are GMT. The time now is 03:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright © 2006-2008 RoundCube Webmail Community