Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adding a link to the top menu

ithcyithcy New
edited September 2010 in Vanilla 2.0 - 2.8
So this should be a functioning plugin:
<?php $PluginInfo['JustAMenuLink'] = array( 'Description' => 'Adds a link to the top menu.', 'Version' => '1.0', 'Author' => 'ithcy', 'AuthorEmail' => 'blah@example.com', 'AuthorUrl' => 'http://example.com' ); class JustAMenuLink implements Gdn_IPlugin { public function Base_Render_Before(&$Sender) { $Sender->Menu->AddLink('Blah', T('Blah'), '/blah/', FALSE); } public function Setup() { //nope } }

It looks to me like I'm using the API correctly, and it works great with the default vanilla theme. It does not work with other (approved) themes like Vanilla MEGA or Joie, which seem to be using a smarty template with a {custom_menu} tag. I can't tell whether the core is broken or whether the themes just need updating. Either way something ain't right here. Those themes should not be approved if they don't follow the API rules.

Can anyone tell me what I'm doing wrong?
Tagged:

Comments

Sign In or Register to comment.