How to setup a profil setting page for my plugin
Hello,
i'm trying to setup a settings page for my plugin in the user profil settings. But i only get a white page, when i click the link.
I'm using the functions below. I looked into another plugin to figure out how this works, but the only thing i could get working is to setup the
link in the side menu in the edit profil section.
And i'm having some problems working with the Sender Parameter... is there a way to find out which function and informations the sender contains?
public function ProfileController_AfterAddSideMenu_Handler(&$Sender) {
$SideMenu = $Sender->EventArguments['SideMenu'];
$SideMenu->AddLink('Options', T('GamerTags Einstellungen'), '/profile/gamertags', FALSE);
}
public function ProfileController_GamerTags_Create(&$Sender) {
echo "test";
}
Maybe someone has an idea 
Best
Verdemis
0
Comments
don't use
&$Senderobject are already passed by reference in php just$Sender. using&is redundant, and will break in future versions.You need to select a view and you can place in the views folder of your theme, something has to call ->Render() at some point, or it won't render a view in a master template.
There are actually a fair few examples, in the pluign is you search around. There is more than one way to do it.
grep is your friend.
I had similar questions answered here: http://vanillaforums.org/discussion/25532/kindly-asking-for-help-with-a-plugin#latest
The plugin that resulted from that adds a page to the user profile, so it might be a help for you, too: https://github.com/R-J/ProfileVisitors
In order to get more information about "$Sender" you can do two things:
a) insert
decho($Sender);and you (only if logged in as admin) will see a lot more information than you are happy withb) find out what "$Sender" really is and dig into the code. If you have the function
public function ProfileController_AfterAddSideMenu_Handler($Sender) {, $Sender is an instance(? don't know if that is the right term) of ProfileController. Take a look at/applications/dashboard/controllers/class.profilecontroller.phpand you'll learn what you are dealing with. Find the place whereAfterAddSideMenuis fired and you'll see what EventArguments you can use.Und ansonsten: fragen, fragen, fragen