Newbie Questions for Blog Engine

Topics: ASP.NET 2.0, Controls
Jun 9, 2011 at 2:58 PM

Hi,

I'm a PHP developer (boooooo!) and I've been let down by our developer who works on .NET projects. I've had exposure to .NET and CS so looking at the code isn't as painful as I thought however the infrastructure of the blogengine is causing me some issues.

In particular I want to order this page (http://www.mortgageintroducer.com/blogengine/) blog enteries not by author name but another filter, maybe a bespoke one called sort order so I can order them however I'm struggling to find the database connections so locate the database to find out what coloumns I can filter by.

Currently in the code it does it by aordering it by username. Could anyone give me any pointers please?

 

<!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Calibri} -->

 

private void DisplayAuthors()

{

������� if (!string.IsNullOrEmpty(Request.QueryString["name"]))

������� {

�

����������� string author = Server.UrlDecode(Request.QueryString["name"]);

����������� if (author == "all") {

��������������� List pagePosts = new List();

��������������� foreach (BlogEngine.Core.AuthorProfile a in AuthorProfile.Profiles)

��������������� {

�

������������������� pagePosts.InsertRange(pagePosts.Count, Post.GetPostsByAuthor(a.UserName).ConvertAll(new Converter(delegate(Post p) { return p as IPublishable; })));

�

��������������� }

��������������� PostList1.Posts = pagePosts;

����������� }

����������� else {

��������������� PostList1.ContentBy = ServingContentBy.Author;

��������������� PostList1.Posts = Post.GetPostsByAuthor(author).ConvertAll(new Converter(delegate(Post p) { return p as IPublishable; }));

��������������� Title = "All posts by " + Server.HtmlEncode(author);

��������������� }

������� }

�

�

}