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 notifications menu item
I like how the profile page displays a "notifications" link on the left-side menu bar. If possible, I'd like to include that link on the left-side menu bar on all pages.
I'm using bittersweet theme. When I look in bittersweet's master.default.tpl file, I see the code {asset name="Panel"} that I believe controls the side menu; however, I'm not sure where to go from here to find the necessary HTML to adjust.
Thanks for pointing me in the right direction, once again.
Tagged:
0
Comments
next time post an image detaling what you would like to do.
my guess is this.
do you know the basics of writing a plugin?
if not see the docs and the wiki.
here is a function (it might have things you want) change as you wish).
to experiment with.
future questions regarding this - you can search forum
then answer is probably there.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I don't know the basics of writing a plugin. I am currently looking at some of the docs here: http://docs.vanillaforums.com/developers/plugins/ to try to get more familiar with them.
In what file should the above function be placed?
Thank you for your help.
yes read the docs.
either default.php or the name of the file you based your plugin class on.
there is a pattern look at a few plugins.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
some older stuff here.
http://vanillawiki.homebrewforums.net/index.php/Main_Page
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I believe I found another possible option, but I'm not sure it's the best thing to do. Is there a reason why a plugin would be a better (or maybe safer) choice than changing applications/vanilla/views/modules/discussionfilter.php to include the link you provided?
I'm giving up on you! you ignore advice.
Haven't you read any discussions that say
Don't Modify the Core!
you have everything you need for a plugin.
http://docs.vanillaforums.com/developers/plugins
read the quickstart and the wiki.
and make an attempt to write the plugin.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I'm not sure what constitutes the core, but there's a good chance I've modified it already.
I'd love to develop the plugin. I guess that way other people can use it as well.
all you need to do is wrap the code I gave you into a plugin (you need the plugin info array
put it in a folder with the same name as plugin and use default.php (or class.nameofyourplugin.plugin.php) for the name of the file.
its quite simple if you spend a bit of time.
anything that came with the vanilla download.
http://vanillaforums.org/addon/vanilla-core
since it will get overwritten when you try to update vanilla and you go down a path you wish never went.
that is why some people still use 8 year old vanilla 1 - because they programmed themselves into a corner by modifying the core.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
here is a simple example.
http://vanillaforums.org/discussion/comment/232796/#Comment_232796
and another.
http://vanillaforums.org/discussion/28241/who-can-i-change-the-background-and-font-color-of-category-heading-as-shown-on-the-pic
and some more
click on the numbers in the top discussion of the link here:
http://vanillaforums.org/discussion/28246/snippet-plugins
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
You're right, that ended up not being so painful:
I was wondering how I might place this link below the "Activity" link in the side menu instead of at the very bottom?
I think the hard part about doing it this way versus working with the core is the need to figure out where I can learn what kind of "Base_AfterDiscussionFilters_Handler" options are available.
there is a Before or After option as far as event.
another option - overriding a view in a cloned theme. if link position is critical and you don't want to move it with jquery.
overriding view and cloning themes is discussed in the forum - just a search away.
see tutorials category as well.
be careful about outdated and stale views when you upgrade vanilla to new versions, what you copied and overrode - may be out of date after upgrade.
next time you want something post a marked up image of exactly what you want with stringent specs. (e.g. link position above activity - lol).
someone else will have to field future questions.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
You can user the eventi plugin (it has some bugs, but is still helpful) to get an impression what handlers are available.
You can also do a full text search in the source code for FireEvent(). Where ever you find that, you can influence what is happening. Simplified, they will be either in controllers or models. If you found some fireEvent in the discussion controller you can use
DiscussionController_TheEventYouFound_Handler($Sender, $Args) {}
. $Sender is the DiscussionController. Just trydecho($Sender->ControllerName);
! The decho() function shows its output only to admins. Before the FireEvent you'll see some code likeEventArguments['Something'] = 1234;
. In your function you can access those arguments with $Args['Something']You have not used ...controller or ...model, but base_... This will be called for every page.
Hope that gave you a small help to understand what you did