Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Latest Discussions Prime
Latest Discussions Prime extension
Hi. I'm new to Vanilla, and I've been experimenting with customizing my installation. I wanted to install the Latest Discussions extension, but I noticed that it wasn't generating friendly URLs (which I had enabled -- I am an aesthetics/consistency freak ), so I took a look at the code, and found that it was quite poorly written indeed. It was actually making its own MySQL connection, querying for a list of topics, and manually generating links to comments.php. (Plus the code had no indentation and almost no spaces, so it was very hard to read.) Latest Discussions Prime is my attempt at rewriting it to better use Vanilla's API. (It also extends the original functionality slightly, by displaying the time since the last comment in each discussion.)
In this version, the number of discussions listed is hardcoded (10). It's easy to change if you look at the source, but if I revise this extension, I'll probably add that as a user preference.
If anyone has any comments about the functionality or especially about my code (since this is my first extension), I'd appreciate it!
Hi. I'm new to Vanilla, and I've been experimenting with customizing my installation. I wanted to install the Latest Discussions extension, but I noticed that it wasn't generating friendly URLs (which I had enabled -- I am an aesthetics/consistency freak ), so I took a look at the code, and found that it was quite poorly written indeed. It was actually making its own MySQL connection, querying for a list of topics, and manually generating links to comments.php. (Plus the code had no indentation and almost no spaces, so it was very hard to read.) Latest Discussions Prime is my attempt at rewriting it to better use Vanilla's API. (It also extends the original functionality slightly, by displaying the time since the last comment in each discussion.)
In this version, the number of discussions listed is hardcoded (10). It's easy to change if you look at the source, but if I revise this extension, I'll probably add that as a user preference.
If anyone has any comments about the functionality or especially about my code (since this is my first extension), I'd appreciate it!
0
Comments
As for the indentation thing, I don't think it's my text editor. Other source files look fine.
(By the way, to any of the three people who have downloaded version 1.0 of this extension -- please redownload it, now version 1.0.1, as I made a couple of slight bugfixes.)
It would be great to add an option for this.
Edit: Looks like it also creates errors with the panel order extension, but it may come from my semi-randomly hacked installation.
That sounds great, I'm looking forward to the next version
Good job, Pol!
I get this error when I try to preview a comment:
Fatal error: Call to a member function on a non-object in ../extensions/LatestDiscusssionsPrime/default.php on line 19