• 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?

I have watched that video 2 times, he talks about a different mod related to the number of posts per page. :)
 
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. :)

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

Edit 2:
Now I need to create that template. Easy. ;)
 
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. :)

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

Edit 2:
Now I need to create that template. Easy. ;)
Can we try it? :)
 
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.


Edit:
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.
 

Attachments

I got it working, see the attached file....
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:
 
Back
Top Bottom