+ Reply to Thread
Page 6 of 8 FirstFirst ... 4 5 6 7 8 LastLast
Results 51 to 60 of 72

Thread: Calendar PlugIn

  1. #51
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Lightbulb

    Ok here is my hack. It works, but I do want to figure out a better way to make this work so that there is no hacking of the code needed.
    After installing webcalendar make the following changes:


    1. First to get the current RoundCube user ID I opened the RoundCube file program/include/rcube_user.php and went to line 47 just inside the _construct function. After this line: $this->db = rcmail::get_instance()->get_dbh();
    I set a cookie by adding this line: setcookie("webcal_user_id",$id);

    so it now looks like:
    Code:
      $this->db = rcmail::get_instance()->get_dbh();
      setcookie("webcal_user_id",$id);


    2. Then in the webcalendar file at plugins/webcalendar/app/includes/config.php I grab the current roundcube user id.
    Around line 207 you will find a line that like:
    Code:
    $single_user_login = $settings['single_user_login'];
    Change that line to:
    Code:
    $single_user_login = $_COOKIE['webcal_user_id'];

    3. Open the webcalendar file plugins/webcalendar/app/includes/settings.php
    and set the following lines to look like this:
    Code:
    user_inc: user.php
    use_http_auth: false
    single_user: true

    Now it should work seamlessly, but there is one small problem left to fix. Right now every new user will have full admin privileges. Until I figure out the fix for this all new users will need to be manually changed in the db to not be admins.


    I have not tested this from scratch so hopefully I didn't miss something that I did. So let me know if this doesn't work for you and I will try to see what I missed.
    Last edited by flattery; 11-18-2009 at 05:12 PM.

  2. #52
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default

    A modification to step one would be to set the user_id in the webcalendar.php file.

    in the function init() find the line:
    Code:
    $rcmail = rcmail::get_instance();
    and change it to:
    Code:
    $rcmail = rcmail::get_instance();
      $user = $rcmail->user;
      setcookie("webcal_user_id",$user->ID);

    Still working on making it all work nicely from install to end.

  3. #53
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default

    Here is the final hack to make users not have admin privileges:

    Open the file plugins/webcalendar/app/includes/classes/WebCalendar.class
    and at line 631 you should find the line:
    Code:
    array ( $single_user_login, md5 ( $single_user_login ), 'Y' ) ) )
    change the Y to a N so it should look like this:

    Code:
    array ( $single_user_login, md5 ( $single_user_login ), 'N' ) ) )

  4. #54
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,394
    Downloads
    36
    Uploads
    0

    Default

    The following simple fix stopped all my trouble with the integrated login:

    webcalendar.php
    PHP Code:
        $rcmail->output->set_env('webcal_user'$rcmail->user->data['username']);
        
    $rcmail->output->set_env('webcal_enc_user'substr(base_convertmd5(trim($rcmail->user->data['username'])), 1636 ),0,25));
    //Begin fix
        
    if($rcmail->user->data['password'])
          
    $rcmail->output->set_env('webcal_pass'$rcmail->user->data['password']);
        else
          
    $rcmail->output->set_env('webcal_pass'$_SESSION['password']);
    //End fix
        
    $langs $rcmail->config->get('cal_language');
        
    $lang $langs[$_SESSION['language']]; 
    Check @ RoundCube Webmail :: Welcome to RoundCube Webmail ... demo user login and first time login of a new registered user should work now.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  5. #55
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default

    Great, I will have to try your fix out. I was just packaging mine up along with some changes I made to the installation.

    I was taking out all the unnecessary installation stuff such as the authorization type, since people are downloading it as a RoundCube plugin there really isn't the need for a choice there... it just confuses people. I also want to get rid of the sql settings and just use RoundCube sql settings, or give an option or have RoundCube sql be already filled in my default.

    Also I made some modification to get rid of all those dumb scroll bars that appear on every day of the month when there is nothing to scroll.

  6. #56
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,394
    Downloads
    36
    Uploads
    0

    Default

    Please feel free to post the result of your adjustments when finished. Improvements are welcome every time.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  7. #57
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default

    First to get rid of the scroll bars the way I found to fix it was to get rid of the box around the day of the month or set it to float.

    Since I could not find where this class was set I worked around it by going into the functions.php file and around line 4411 (just search for "dayofmonth") and I changed "dayofmonth" to "dayofmonths" and then I added a new class in a class file I could find which was theme.css, but then you have to add this to all your themes.

    I set mine to float like this:
    Code:
      .dayofmonths {
    	float:left;
        border:1px solid;
        border-width:0 1px 1px 0;
        padding:0 2px 0 3px;
        font-weight:bold;
        text-decoration:none;
        vertical-align:top;
      }
      .dayofmonths:hover {
        border-right:1px solid #0000ff;
        border-bottom:1px solid #0000ff;
        color:#0000ff;
    	background-color:yellow;
    	
      }
    The other way is to take is to take out the border then just remove the float and border lines.


    Also as for the installation I just took the lines that didn't need options and set them to <input type="hidden" with the value already set

  8. #58
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,394
    Downloads
    36
    Uploads
    0

    Default

    hmmm ... I don't see unnecessary scrollbars. Which browser? Which resolution? Could you please attach some screenies?
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

  9. #59
    flattery is offline Registered User
    Join Date
    Nov 2009
    Posts
    17
    Downloads
    0
    Uploads
    0

    Default

    I use Google Chrome and I notice this doesn't seem to affect Firefox, but here is a screen shot:


  10. #60
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,394
    Downloads
    36
    Uploads
    0

    Default

    Did you use a demo account of mail4us.net? I can't even reproduce it with recent Chrome on XP. If I can't reproduce it it's hard to fix it. Please register an account at mail4us.net. Configure the Calendar with your preferences and PM'me the login data.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

+ Reply to Thread
Page 6 of 8 FirstFirst ... 4 5 6 7 8 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts