1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Kier can you post your most liked post mod?

Discussion in 'Add-on Requests [Archive]' started by Miko, Oct 6, 2010.

  1. Miko

    Miko Well-Known Member

    Kier can you post your most liked post mod? Thank you :)
    dutchbb, Dragonfly, CyberAP and 2 others like this.
  2. Sir nick

    Sir nick Well-Known Member

    agree liked that mod that took what 5 minutes to make.
  3. dmnkhhn

    dmnkhhn Active Member

    Where did he talk about it? I remember reading about it but I forget where it was. :)
  4. Trip

    Trip Active Member

  5. dmnkhhn

    dmnkhhn Active Member

    I have watched that video 2 times, he talks about a different mod related to the number of posts per page. :)
  6. CyberAP

    CyberAP Well-Known Member

  7. dmnkhhn

    dmnkhhn Active Member

    Alright, I have written down all the code that can be seen in the video.

    The only part missing is the protected function '_getPostModel()' because Kier didn't scroll down far enough ( :D) and (of course) the template file.

    Take it and do whatever you want. There might be some typos in it, beware. :)

    Nevermind, got it working. The template is the only missing thing right now. :)

    Edit 2:
    Now I need to create that template. Easy. ;)
    CyberAP likes this.
  8. CyberAP

    CyberAP Well-Known Member

    Can we try it? :)
  9. dmnkhhn

    dmnkhhn Active Member

    Not yet, let me finish the template.. At least a part of it. :)
  10. CyberAP

    CyberAP Well-Known Member

    Ok, sorry for interrupting you. :)
  11. dmnkhhn

    dmnkhhn Active Member

    I got it working, see the attached file.

    Import the *.xml and move the included directory 'LikeReview' into library/. :)

    PLEASE NOTE: For educational purpose only. I copied Kier's code, it still belongs to him.

    One small thing that's different from Kier's code:
    I didn't want to create a custom option so I set the number of maxMostLikedPosts in the controller to be 10.
    At least I thought that it would require a custom option, that's why I hardcoded it. Creating a custom option shouldn't be hard, just make sure it's called 'maxMostLikedPosts'.

    Oh and you should update the template, for whatever reason the ordered list is displayed inline so that on the screenshot it looks kind of broken.

    Attached Files:

    CyberAP likes this.
  12. CyberAP

    CyberAP Well-Known Member

  13. dmnkhhn

    dmnkhhn Active Member

    Great! :D

    Well, at least I've learned something about XenForo. :)
  14. Kevin

    Kevin Well-Known Member

    On a different topic (but related to your screen shot)....

    It is good to see how many people are quickly working on changing their XF style instead of the default colors. :cool:

Share This Page