Author Topic: Adding links in the task bar  (Read 6906 times)

Offline tpothen

  • Newbie
  • *
  • Posts: 2
Adding links in the task bar
« 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.

« Last Edit: January 21, 2009, 09:17:04 AM by tpothen »

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Adding links in the task bar
« Reply #1 on: January 21, 2009, 09:28:32 AM »
Please post the code you've added
Julius Caesar

You can download the Groupvice4 theme here.
Sie können Groupvice4 hier he

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Adding links in the task bar
« Reply #2 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!
« Last Edit: January 21, 2009, 10:01:48 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline tpothen

  • Newbie
  • *
  • Posts: 2
Adding links in the task bar
« Reply #3 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.

Offline tpothen

  • Newbie
  • *
  • Posts: 2
Adding links in the task bar
« Reply #4 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.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Adding links in the task bar
« Reply #5 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!
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline raztybaby

  • Newbie
  • *
  • Posts: 9
Adding links in the task bar
« Reply #6 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..

Offline Nepherim

  • Jr. Member
  • **
  • Posts: 12
Adding links in the task bar
« Reply #7 on: February 07, 2009, 12:22:26 PM »
Here's how I added a 'change password' icon in the taskbar. Steps should be the same for what you want.
« Last Edit: February 07, 2009, 12:24:44 PM by Nepherim »
~ ~ Dave

tech | photography | journal | MR2

Offline mspicer

  • Newbie
  • *
  • Posts: 8
Adding links in the task bar
« Reply #8 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

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Regards,
Rosali
__________________
MyRoundcube Project (commercial)