Help: Adding a new link in the user account page

General discussion about MantisBT Plugins

Moderators: Developer, Contributor

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

Help: Adding a new link in the user account page

Post by rkarmann »

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: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

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

Post by atrol »

Please use Search before posting and read the Manual
rkarmann
Posts: 66
Joined: 24 Nov 2017, 10:00
Location: Lille, France

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

Post by rkarmann »

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: 15 Nov 2018, 12:08

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

Post by Onetaluko »

This helped me today, thank you.
Post Reply