Help: Adding a new link in the user account page

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

Post Reply
rkarmann
Posts: 66
Joined: Nov 24, 2017 5:00 am
Location: Lille, France

Help: Adding a new link in the user account page

Post by rkarmann » Mar 09, 2018 6:09 am

Hi all,

I'd like to know how can we add a new item in the user account page ?

I know that we must trigger the EVENT_MENU_ACCOUNT, but I don't know the exact syntax for the output function. This should be an array...

Code: Select all

function hooks() {
	return array(
		"EVENT_MENU_ACCOUNT" => "print_menu",
			);
}

function print_menu() {
# return array(????);
}
Thanks to those who can help me ! :D
Currently working on a wiki-based plugin for MantisBT 2.X. If you'd like to test it, contact me or see the plugin section.

atrol
Site Admin
Posts: 7682
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Help: Adding a new link in the user account page

Post by atrol » Mar 09, 2018 2:15 pm

Please use Search before posting and read the Manual

rkarmann
Posts: 66
Joined: Nov 24, 2017 5:00 am
Location: Lille, France

Re: Help: Adding a new link in the user account page

Post by rkarmann » Mar 11, 2018 11:35 am

Thanks, it helps a lot :)

Code: Select all

function print_menu() {
	
	$t_returns = array();
	
	$page = plugin_page( 'config_user' );
	$label = plugin_lang_get( 'my_theme' );
	
	$t_returns[] = "<a href=\"{$page}\">{$label}</a>";
	
	return $t_returns;
}
Currently working on a wiki-based plugin for MantisBT 2.X. If you'd like to test it, contact me or see the plugin section.

Onetaluko
Posts: 7
Joined: Nov 15, 2018 7:08 am

Re: Help: Adding a new link in the user account page

Post by Onetaluko » Oct 18, 2019 9:16 am

This helped me today, thank you.

Post Reply