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.

How do I display the amount of comments on one discussion on another part of my website?

Hi! I'm back with another question. I hope you have the time to answer it. Thanks in advance.

How do I display the amount of comments on one discussion on another part of my website?

Answers

  • I think you need to clarify something: what do you mean with "website"? The forum itself is a website, but, often, people have additional websites, to which the forum is an "addon".

  • @businessdad said:
    I think you need to clarify something: what do you mean with "website"? The forum itself is a website, but, often, people have additional websites, to which the forum is an "addon".

    I'm sorry that I wasn't clear enough, I though I had put my website url in my spoiler and therefore people would understand what I wanted to do. I have vanilla embeded into MediaWiki and I want to display the amount of comments on a discussion on my MediaWiki frontpage. Here's the website URL: http://epicnuts.com

  • Anyone? I would really appreciate some help on this. Thanks!

  • peregrineperegrine MVP
    edited December 2012

    @medelsvensson said:
    Anyone? I would really appreciate some help on this. Thanks!

    at the very least.

    you could do a sql select in vanilla write out the file to an html or text file
    and read it in with an include on your home page. or put a sql select in your home page that read the vanilla database and displays in your home page. or do a rss feed into your site.

    not really sure what you are talking about. either way it would require coding on your part.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • mcu_hqmcu_hq ✭✭✭
    edited December 2012

    or put a sql select in your home page that read the vanilla database and displays in your home page

    This is how I would do it. Connect to your database using your framework or whatever and then grab the details that way.

    SMF has something called, "Server Side Includes" which I think Vanilla could adopt since it would be VERY useful for common things like this.

  • x00x00 MVP
    edited December 2012

    Vanilla already has an json api. you can just fetch with ajax.

    example
    http://vanillaforums.org/discussion.json/22108/

    look at the CountComments field.

    Or you could simply take the count from the database.

    grep is your friend.

Sign In or Register to comment.