Roundcube Community Forum

 

Adding links in the task bar

Started by tpothen, January 21, 2009, 09:13:48 AM

Previous topic - Next topic

tpothen

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.


Julius Caesar

Please post the code you've added
Julius Caesar

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

rosali

#2
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!
Regards,
Rosali

tpothen

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.

tpothen

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.

rosali

./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

raztybaby

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..

Nepherim

#7
Here's how I added a 'change password' icon in the taskbar. Steps should be the same for what you want.
~ ~ Dave

tech | photography | journal | MR2

mspicer

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