Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: tpothen on January 21, 2009, 09:13:48 AM

Title: Adding links in the task bar
Post by: tpothen on January 21, 2009, 09:13:48 AM
I am trying to add a link in the taskbar to my calendar. I have the image in the spot I want but cannot get rid of the brackets from the text and cannot get the link to the calendar to work. Please see the attached screen print. Any ideas what file I need to edit to make an external link?

I did try Myroundcube with the calendar with no luck, does anyone have that version working?

Thanks.

(http://www.canoemn.com/d/1370-1/img1.jpg)
Title: Adding links in the task bar
Post by: Julius Caesar on January 21, 2009, 09:28:32 AM
Please post the code you've added
Title: Adding links in the task bar
Post by: rosali on January 21, 2009, 09:58:54 AM
I guess you have just adjusted the RoundCube XML statements in ./skins/default/includes/taskbar.html ... something like:



Right?

If you go this way, you have to add a "calender" label in the files located in ./program/localization/{lg_code}/labels.inc. Then you have to create a class definition for "button-calendar" in the css stuff (common.css). Finally you have to adjust ./program/js/app.js to accept the command "calendar".

P.S.: I have MyRoundCube with the Calendar plugin running on a test environment. PM'me for a test account if interested!
Title: Adding links in the task bar
Post by: tpothen on January 21, 2009, 12:38:35 PM
I did add the code you listed to ./skins/default/includes/taskbar.html and in the common.CSS. I missed the other 2 files, I'll give that a try. Thanks

PS: I will PM you later for a test account as I would like to have the calendar with RoundCube so I only have to login once.
Title: Adding links in the task bar
Post by: tpothen on January 21, 2009, 04:32:20 PM
The following is the code I have added:

./skins/default/includes/taskbar.html


./skins/default/common.css
a.button-calendar
{
  background-image: url(images/buttons/calendar.gif);
}

./program/localization/en_US/labels.inc
$labels['calendar']   = 'Calendar';

./program/js/app.js
This one I need help with as it is out of my league.

I did get the RCCalendar working but I need the full functions of WebCalendar as I use it as a group calendar.

Thanks.
Title: Adding links in the task bar
Post by: rosali on January 22, 2009, 09:27:00 AM
./program/app.js

Find and modifiy accordingly:

.
.
.
// enable general commands
this.enable_command('logout', 'mail', 'addressbook', 'settings', 'calendar', true);
.
.
.

      case 'login':
        var input_user = rcube_find_object('rcmloginuser');
        var input_pass = rcube_find_object('rcmloginpwd');
        var input_tz = rcube_find_object('rcmlogintz');

        if (input_user)
          input_user.onkeyup = function(e){ return rcmail.login_user_keyup(e); };
        if (input_user && input_user.value=='')
          input_user.focus();
        else if (input_pass)
          input_pass.focus();

        // detect client timezone
        if (input_tz)
          input_tz.value = new Date().getTimezoneOffset() / -60;

        this.enable_command('login', true);
        break;

      case 'calendar':
        document.location.href("url to calendar") // or window.open for a popup
        break;



... not tested, but this should do the trick!
Title: Adding links in the task bar
Post by: raztybaby on February 05, 2009, 10:01:59 PM
Quote from: rosali;16576./program/app.js

Find and modifiy accordingly:

.
.
.
// enable general commands
this.enable_command('logout', 'mail', 'addressbook', 'settings', 'calendar', true);
.
.
.

      case 'login':
        var input_user = rcube_find_object('rcmloginuser');
        var input_pass = rcube_find_object('rcmloginpwd');
        var input_tz = rcube_find_object('rcmlogintz');

        if (input_user)
          input_user.onkeyup = function(e){ return rcmail.login_user_keyup(e); };
        if (input_user && input_user.value=='')
          input_user.focus();
        else if (input_pass)
          input_pass.focus();

        // detect client timezone
        if (input_tz)
          input_tz.value = new Date().getTimezoneOffset() / -60;

        this.enable_command('login', true);
        break;

      case 'calendar':
        document.location.href("url to calendar") // or window.open for a popup
        break;



... not tested, but this should do the trick!

hi rosali

i've tried this code but it does'nt work..
Title: Adding links in the task bar
Post by: Nepherim on February 07, 2009, 12:22:26 PM
Here's how I added a 'change password' icon in the taskbar (http://www.roundcubeforum.net/general-discussion/1766-please-i-need-change-password-module.html). Steps should be the same for what you want.
Title: Adding links in the task bar
Post by: mspicer on February 16, 2009, 07:41:31 PM
This is almost exactly what I am trying to accomplish, but I need to display the user who is logged in email address.  I can't seem to find anywhere I can get this data.  

Thanks,

Mike
Title: Adding links in the task bar
Post by: rosali on February 17, 2009, 12:55:54 AM
http://www.roundcubeforum.net/recycle-bin/2839-show-email-address-taskbar.html