I am using Drupal 7. I want to create a module which shows All the latest posts in Group with sorting options for the posts(a dropdown for sorting posts in block with various options). I am using organic group module for group management.
I have created a block module which can fetch the content for the particular group, but I am not able to manage sorting drop down form.
Does any one have idea, how to display form in block output and then sort that form.
I am also using file attachment with posts in group. So my sorting parameters includes no of files in post, postdate(i can get using views), Most viewed, Most comment,
Note: I want to build custom module because first I tried with Views module, but I am not able to get various sorting parameters which i need for sorting