sure @ddumont - i will be submitting the working example and also the demo URL soon - as soon as i finish out with the layout and stuff - CSS. i will send you the whole code i had used and then you can consider it putting into your working example of NillaBlog.
@ddumont i had a quick question - is there anyway i can set the number of discussions to be displayed on the BLOG category page? e.g generally we set the number of discussions we can show on category page through Dashboard->Forum->Advanced but suppose if it choose 50 there and if we try to display 50 posts in NillaBlog Category then the page is going to get very very long. so is there anyway we can restrict the BLOG category page discussions count to only 10 or 15????? Thanks
Thanks ddumont i just downloaded the latest version. thanks again. i have a hack to display images if a user attaches an image with the post. shall i pm to u?
This is not very MVC, You are using a view for your logic. Views should be kept clean and should only concern display issues (and some formatting issues too). There are some forgiveable exceptions but this is way overboard.
Answers
Thanks
There was an error rendering this rich post.
e.g generally we set the number of discussions we can show on category page through Dashboard->Forum->Advanced
but suppose if it choose 50 there and if we try to display 50 posts in NillaBlog Category then the page is going to get very very long.
so is there anyway we can restrict the BLOG category page discussions count to only 10 or 15?????
Thanks
There was an error rendering this rich post.
There was an error rendering this rich post.
i have a hack to display images if a user attaches an image with the post. shall i pm to u?
There was an error rendering this rich post.
Likely there is better way to do this.
grep is your friend.
DisscussionModel_BeforeGet_Handler
You should be able to set
$Sender->SQL->Limit($Limit, $Offset);
over-riding the default.also wheres
You can use
if(strtolower($Sender->RequestMethod) != 'index') return;
before that.Have a look a class.discussionmodel.php Get you see the BeforeGet event, you even have wheres event args
grep is your friend.
i restricted my home page to display only 10 latest posts which are not from my BLOG category using the hook in themes as below:
}
There was an error rendering this rich post.