HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Which way is better to do an application?
peregrine
MVP
It seems that the technique used in Members List 1.1 is clearly much easier to add an application, then using custom pages plugin or writing an application and placing in the applications directory. I hadn't seen this technique used before,but I like it.
Any comments by the vanilla developers or any others?
also a question about this statement. Where and what does default reference? And can you explain this statement a little bit better.
$Sender->MasterView = 'default';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
0
Comments
How about elaborating on "the technique used in Members 1.1"? I have no idea what that is.
Vanilla Forums COO [GitHub, Twitter, About.me]
'default' refers to the master template name. Look in applications/dashboard/views
Vanilla Forums COO [GitHub, Twitter, About.me]
thanks Tim. the plugin is here.
http://vanillaforums.org/addon/memberslist-plugin
essentially just adds a menu item in the plugin
and a view
class MembersListPlugin extends Gdn_Plugin{
Which seems so easy. compared to doing a custom page messing with routes, or fooling around in the application directory.
My question is primarily because - although I understand some of the basics of vanilla, many things still elude me.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
so if I wanted to just to understand this better.
create a file called peregrine.master.php
and set the view this way to use the peregrine.master.php
$Sender->MasterView = 'peregrine';
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
My test is that I build an application if I need multiple controllers (multiple sets of grouped actions). Otherwise, I use a plugin.
We create very few new applications and when we do they are major. Plugins can do a lot and is what I'd recommend. The render call in the above function isn't exactly how I'd do it.
In this case you'd put the view in
/plugins/MemberList/views/memberlist.php
.But yeah, the way you showed there is exactly right: attach a new method to the PluginController and use it as your own entry point.
What @Todd said about the view is 100% right and also applies beyond this example: If you find yourself doing dirname(FILE) anywhere, you've probably done it wrong and should be using a constant like PATH_PLUGINS, or a convenience method.
Vanilla Forums COO [GitHub, Twitter, About.me]
Wow! hit the trifecta of developers here. thanks.
@csakip thanks for the plugin. learned alot on this one.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.