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.
Options

Vote It

edited November 2006 in Vanilla 1.0 Help
I am totally new to PHP, but have been actively hosting or creating blogs and HTML based websites for the past 2 to 3 years.

Besides having a few requests (which I'll start a discussion separately for each), how would one create a "vote-it-to-the-front-page" extension or add-on similiar to Digg.com? For those unfamiliar with Digg, users are contiually submitting news and information and other users can vote "yay" or "nay" for the posting. Those postings that reach the minumum threshold limit and a beat-out all the other posts make it to the frontpage.

I am looking for something like this, where the admin can control the number of top-voted discussions to appear on the mainpage that loads when you go to the forum. As well, the admin would have to be able to set the threshold (i.e. when you have 15 votes you get thrown in the pool to make it on the frontpage).

I think this method of displaying top discussions would be powerful and make the site more interactive.

Does anyone out think they can help a beginner or even program an extension to meet these requirements?

Thank you in advance for any help.

Comments

  • Options
    mm sounds good, maybe they could be shown where the notices go or something?
  • Options
    lechlech Chicagoland
    This would probably be the companion to the sink extension in the form of an anti-sink extension. Not sure how you would go about creating it but it sounds interesting for an extension idea either way. The only issue you would need to consider is that it shouldn't really disrupt the way the forum on the whole displays discussions at all.
  • Options
    would the poll extension be a good starting point?
  • Options
    I'm looking at building this very functionality into my site. I'm planning to manipulate the bookmark functionality and runn queries against how many people have bookmarked a discussion. Doesn't it seem that this is really all that digg is doing. You bookmark (aka digg) a link and it gets added to your list of bookmarks (diggs). When enough people bookmark (digg) the link it promotes. With a little tweaking of the bookmark code and the front page code it shouldn't be too terribly difficult (in theory) to implement in vanilla.
  • Options
    With the way you describe it, it doesn't sound too difficult. If you develop this add-on, would you please keep me informed.
  • Options
    OMG! Just what i've been thinking so! Somthing like digg is what i want. But an extension for users to vote in each discussions would be good. the more vote it gets the longer it stays up top on main page! Would be wicked if your code guru make one!
  • Options
    The only problem that I now see with the bookmark method of doing a "vote it" or digg-like voting add-on is that users can also unbookmark a discussion. This would give a user the ability to unbookmark any competing postings, so his would possibly gain higher access to the frontpage. However, it is possible to create a similiar system based on the bookmark feature?
  • Options
    hmm.... isn't that the same as the undigg option in digg? can you unbookmark a discussion you haven't bookmarked? also, it seems you will want to turn off the sink permisison.
  • Options
    I guess you are right, it would be the same thing. But thats a good question, is it possible to unbookmark a discussion that one hasn't already bookmarked? Maybe Mark will know that.
  • Options
    this sounds like an awesome idea. personally i would prefer it if it was a seperate tab though. that way the current discussions list can still be used for the most active discussions and then users can visit the top discussions list to view those as well.
  • Options
    MarkMark Vanilla Staff
    In order to accomplish this, rather than creating a whole new table, I'd probably add a new column to the LUM_DiscussionUserWatch table - the table that tracks which discussions you've read. I'd make it an enum field with '0', '1', '2' and make the default '1'. If someone gives a discussion a thumbs down, it is a 0, thumbs up is 2, and 1 is default. The point of this column is only to record what you voted on it (so you can change your vote if need be).

    In order to calculate a discussion's popularity / votes, I'd add a new column to the discussion table that keeps a running tally of the votes. If someone gives a +1, it adds one, If they change their vote to a -1, it removes a vote. It's default value is 0. You can then run a query on the discussion table sorted by the votes descending where the vote must be greater than zero.

    I'd also have an expiry date in the logic somewhere - so that discussions that got a lot of votes but haven't been active for a certain number of days disappear from the list.
  • Options
    Mark,

    Thank you for the detailed explanation you provided. I understand what you are getting at, I just wish I was more knowledgeable when it comes to PHP, databases and Vanilla, cause if I were, I'd tackle the project myself.
  • Options
    bump. this would be so good.
  • Options
    I'm also wondering what happened with this. It kinda ties in with the Voting extension but there's still some coding to be done it seems... this kind of extension could really open up Vanilla for use in a different way though :)
  • Options
    TomTesterTomTester New
    edited November 2006
    bump (isn't this bump business the simplest way of moving discussions to the front page?)

    like the rating thing though, especially in combination with some filter to hide unrated or negatively rated things.
This discussion has been closed.