Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: mspicer on February 14, 2009, 05:21:17 PM

Title: Trying to add custom link to task menu to import address books from old system
Post by: mspicer on February 14, 2009, 05:21:17 PM
I am trying to add a custom link to the task to import address books from our old webmail system.  The only thing I am having trouble with is getting the user's id.  I would like the link to be
import old where the [email protected] is the users email.  Since round cube uses template processing () I can't find a way to get the email or where I could grab it from.  

Any help would be great!

Thanks,

Mike
Title: Trying to add custom link to task menu to import address books from old system
Post by: mspicer on February 19, 2009, 09:53:27 PM
I figured out how to do this.  It was a little complicated, but I received help from http://www.roundcubeforum.net/general-discussion/4133-adding-links-task-bar.html (http://www.roundcubeforum.net/general-discussion/4133-adding-links-task-bar.html).  I will try to lay this out as an easy to follow guide.  

You start by editing your round cube template generator to have the ability to create new objects.
$this->add_handlers(array(
            'loginform'       => array($this, 'login_form'),
            'username'        => array($this, 'current_username'),
            'message'         => array($this, 'message_container'),
            'charsetselector' => array($this, 'charset_selector'),
        ));