Vanilla developer kickstart
Hi. First of all I want to thank Vanilla team and the community for great work on this project.
Vanilla finally brings common sense to forum software and it's exactly what forum should look like.
However the problem that we encountered during the work on our project was lack of full documentation for developers.
We're currently building an online social game community and need to develop a custom theme for our forums and also add some custom functionality which is not included in the basic package or plugins.
Our team didn't find the required information in the documentation area so we had to purchase a few custom premium themes to disassemble them and see how they're made. Basically we're now reading the source code and trying to figure out how things work.
My questing for the team and dev community is how does a vanilla developer get started?
Where to refer when basic CSS editing is not enough?
Any tips would be appreciated. Thanks!
Best Answers
-
whu606 MVP
Have you checked through this:
http://vanillawiki.homebrewforums.net/index.php/Main_Page
I've made css changes to my theme for the most part, with a bit of php fiddling thrown in.
I think taking something that works and adapting it to your needs is pretty much the way most Vanilla developers have gone about things.
2 -
Yeah, I know, I just wonder how "stuff that works" was made.
I've also had some challenges with the documentation. The Wiki referenced above is a nice start, but there's still not much available there. One thing I suspect is happening is that a handful of developers have worked long and hard developing their niche of expertise, and have built a cottage industry around "premium" flavors of Vanilla. I also think Vanilla is putting a lot of effort into its hosting and wants more people to move that way. Unfortunately, both of these "trends" (if they are really happening) could destroy an awesome Open Source platform and community.
Vanilla isn't my "core business", so if you have any questions about how to do something specific, feel free to @ me in your post or message me directly. I'm not ten percent as knowledgeable as @x00, @Mark, and a dozen others here, but I've been hacking away at Vanilla for more than a year now.
I may have enough notes to do a "How to Get Started Hacking Vanilla" presentation. It might even be fun!
3 -
peregrine MVP
6apxat said:
Drop it guys, let's just focus on the discussion:>I did drop it. I said I was dropping it.
So yeah, the Wiki has some basic information on how to get started with plugin development and even write a simple HelloWorld plugin
It also describes some fundamentals (like routing, controllers etc.) which might help understand the whole Vanilla architecture. But still there's much mystery about this (even though I'm quite familiar with MVC architecture).1) How do I know the correct event function names (e.g. DiscussionsController_AfterDiscussionTitle_Handler) to include inside my plugin?
Where's the list of all of them?>grep -r FireEvent *
2) A deeper understanding of the $Sender concept is needed and how to pass data between controllers.>
var_dump($Sender);
3) A comprehensive list of Garden functions is required (to know for example, how Gdn_Format::Url() works).
http://www.vanilla-wiki.info/vdocs/annotated.html
If you find any of these answers useful - feel free to add them to the wiki - if you want to add to the wiki - maybe create How To Get Started Title - and maybe people will add to it.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
2
Answers
Have you checked through this:
http://vanillawiki.homebrewforums.net/index.php/Main_Page
I've made css changes to my theme for the most part, with a bit of php fiddling thrown in.
I think taking something that works and adapting it to your needs is pretty much the way most Vanilla developers have gone about things.
Hey, thanks for the reply.
Yeah, I know, I just wonder how "stuff that works" was made.
Anything you find, please add it to the Vanilla Wiki.
Make a start page and document all the things you needed. We'll help you find the information as long as you want to document it.
There was an error rendering this rich post.
@6apxat,
I've also had some challenges with the documentation. The Wiki referenced above is a nice start, but there's still not much available there. One thing I suspect is happening is that a handful of developers have worked long and hard developing their niche of expertise, and have built a cottage industry around "premium" flavors of Vanilla. I also think Vanilla is putting a lot of effort into its hosting and wants more people to move that way. Unfortunately, both of these "trends" (if they are really happening) could destroy an awesome Open Source platform and community.
Vanilla isn't my "core business", so if you have any questions about how to do something specific, feel free to @ me in your post or message me directly. I'm not ten percent as knowledgeable as @x00, @Mark, and a dozen others here, but I've been hacking away at Vanilla for more than a year now.
I may have enough notes to do a "How to Get Started Hacking Vanilla" presentation. It might even be fun!
What I don't understand is the following:
You guys are working at a Vanilla site. You are wondering things, so look in the documentation (Wiki!). Something is missing, meaning the documentation is lacking.
Why on earth aren't you adding that to the Wiki?
Maybe this thread isn't the right place to ask this, but it's a start and we might split the thread if necessary.
Just add a piece of text to the Wiki that you're missing documentation on... and ... (maybe add it to the forum as well). Someone will have the answer and add your answer to the Wiki. That's the exact functionality of the Wiki. Anyone can join, so that won't have to be a problem. Anyone can type their question (and hopefully their solution), so that won't have to be a problem either.
It's nice that @CurtisOden has his notes, but if you want to share them, I think the Wiki is the right place to share those notes.
There was an error rendering this rich post.
@UnderDog try googling "vanilla forums custom theme" (probably first thing every new developer does after looking through the documentation), the Wiki mentioned above is not among first 20 results and those results themself are not too helpful.
I think most fresh devs like me are looking for some kind of "recipes" or step-by-step guides.
Maybe the reason for the lack of information is that Vanilla is quite a young project.
I agree that we should share knowledge, as it can really stimulate the popularity of the product.
@UnderDog
I'm happy to add to the Wiki, but does it really need comments like:
If you're building your own theme, don't. Steal, borrow, or exercise some Open Source license on a theme you like that's structurally close to what you want to do. Use Find/Replace (at least in Dreamweaver) to change all instances of the theme name. And don't forget to rename any files that contain the them name. Oh, don't forget to give yourself credit for your new awesome theme in the "about.php".
Smarty is a pain in the (self censored) for PHP developers (even if some designer somewhere said he/she loves it). When building your own custom theme, delete deafault.master.tpl from your theme's "views" directory and replace it with a copy of default.master.php (found in the "/[your-vanilla-root]/applications/dashboard/views" directory)
Vanilla's stylesheet "strategy" can get messy fast. Create a "custom.css" in the "[your-theme]/design/" directory. As you modify classes, copy the whole class you want to use from "/[your-vanilla-root]/applications/dashboard/design/style.css".
When trying to build a simple plugin on a tight deadline, sometimes it's easier just use ten lines of PHP to query the database and echo the results where your want them, rather than using a few hundred lines across several files to build to MVC design patterns.
Milk and popcorn don't go together, but chocolate milk and Cracker Jacks do.
If you can't figure out where the (self censored) Vanilla is adding a particular element (embedded deep within a module, inside of an enigma, wrapped in a mystery), don't be afraid to commit CSS assassination (visibility: hidden !important). Just remember to come back to it once you've done your product demo.
If these kind of notes belong in the Wiki, I'll be happy to drop them in today!
I offered to do a step by step - but it requires some work by the user.
see:
http://vanillaforums.org/discussion/20160/ignore-discussions#latest
surprisingly or not so surprisingly
this would have been a kickstart. I am nowhere as adept as x00 and a lot of other here but the plugins do end up working and not crashing and burning your system (at least I haven't seen any comments that indicate so).
My gut feeling is alot of questioners don't really have the time to invest in learning, they want it to appear by magic, or by someone else's sweat.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine of course we all have deadlines
I agree that any product requires that you invest some time in learning it.
But let's face it: for many devs building a forum isn't a typical daily routine.
I personally come from a frontend world and I feel that my programming skills might not be deep enough to use Vanilla's advanced features. This is where a little help would be useful.
I mean it's not a bad thing to expect the software to be easy to use. For example Wordpress or Drupal appear more friendly to new developers.
With Vanilla as @CurtisOden mentioned above it's more "hacking" than "building from blocks".
For example Wordpress or Drupal appear more friendly to new developers
Wordpress is harder to write a plugin than vanilla in my opinion.
so I would say vanilla is easier for developers. however, it is easier to drag boxes in wordpress, but i wouldn't call that developing that's end-user stuff.
So, in wordpress lets say I want to build a form and write to the database and do someother thing that a lot of users request here - it is just as hard if not harder in wordpress, not to mention the insane way of executing php in wordpress.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine Maybe you're right. Can't say exactly as I've never developed any plugins for wordpress. At least I've had an impression that it was well documented and if I had to, I would be able to.
I'm going to post a topic soon where I'll describe my current task and I hope I'll get some directions on that
Well, there's a bit of a catch-22 there. If you're looking for an answer to a question, you need information, and don't have something to show other people, kind of by definition. So going to the wiki or here to look for something means that you don't really have information to add. I mean, I understand what you're saying about adding a stub to the wiki, but, for me at least, it's often the case that I not only don't know how to do something, I'm not exactly sure how to get started, and wouldn't know what kind of stub or where to add to the wiki. Kind of a waste of everyone's time, and I worry that things like that would degrade the usefulness of the wiki for everybody, and make more work for people who then have to go in and clean up.
That said, I will try in future, personally, to add things to the wiki if I have potentially useful things to add.
In terms of Wordpress, I've been developing on WP for years, slightly longer than I've been working with Vanilla, building custom plugins and themes and all the rest, and perhaps it's me, but I find it extremely easy to work with compared to Vanilla -- that may be familiarity more than anything else, perhaps, and the huge number of code examples available all over the web, as well as the relatively comprehensive documentation available. But regardless of the reason, whenever I dive in to the guts of Vanilla, I tend to come away utterly mystified and frustrated. So it goes, though. It's all opinions at the end of the day.
That's pretty unfair to a lot of people. This is the kind of snide, unnecessary comment I've mentioned seeing too often before, here (and it's particularly annoying because it is apparently at least partly directed at me, despite my attempts to be friendly about it despite your rather preremptory statement of your 'terms'). That sort of thing isn't helping anyone. Also, if you're going to talk about me in threads I'm not participating in, a courtesy @ mention would be appreciated. Thanks.
Not so much, actually, although the 2.x Monster Rewrite is only, what, a couple of years old now?
I've been running a fairly busy site on Vanilla 1.x (and am here these days trying to find solutions to issues related with moving to 2.x and preserving user-expected functionality, because it seems like 2.x is getting close to being able to do that now, without too much pain in the process) since I think 2007. So, yeah, Garden is relatively young, but Vanilla itself has been around in its various incarnations for a fairly long time in Internet Years.
@stavthewonderchicken Buddy, "you've got a chip on your shoulder." Tell you what this is directed to you, but I will not reply to you or mention you again, If you want to do like wise - feel free. I'm finished responding to you, so don't expect one. If they put ignoreuser plugin on this site - you would be the one I would add to it. No offense, just the way it is.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That's just worryingly weird, man. Really. But: fair enough. I appreciate your slightly-demented honesty, but am bewildered by your over-the-top aggro.
I mean, you really did specifically mention me in that comment, so I'm not sure how I have a chip on my shoulder.
Heck, I was just being honest -- I'm not that organized. You can say whatever you like about me, that's cool, but painting other users with a broad brush, that they 'want [things] to appear by magic, or by someone else's sweat', you know, that's not so cool.
Drop it guys, let's just focus on the discussion:
So yeah, the Wiki has some basic information on how to get started with plugin development and even write a simple HelloWorld plugin
It also describes some fundamentals (like routing, controllers etc.) which might help understand the whole Vanilla architecture. But still there's much mystery about this (even though I'm quite familiar with MVC architecture).
For example, disassembling a simple plugin Front Page Discussion Pagination by @stavthewonderchicken I've noticed some dark spots which aren't just described anywhere:
1) How do I know the correct event function names (e.g. DiscussionsController_AfterDiscussionTitle_Handler) to include inside my plugin?
Where's the list of all of them?
2) A deeper understanding of the $Sender concept is needed and how to pass data between controllers.
3) A comprehensive list of Garden functions is required (to know for example, how Gdn_Format::Url() works).
This is EXACTLY what is needed. In the Documentation, all of the developer documents seem to be abstracts of what a larger chapter should be discussing. Is someone at Vanilla writing a book and just holding out on us?
Oh, I hat being so cynical, especially about the best Open Source (or black box) forum platform I've found.
I did drop it. I said I was dropping it.
grep -r FireEvent *
var_dump($Sender);
http://www.vanilla-wiki.info/vdocs/annotated.html
If you find any of these answers useful - feel free to add them to the wiki - if you want to add to the wiki - maybe create How To Get Started Title - and maybe people will add to it.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine Thanks!