joomla visitors
Mithila Software Blog | BlogEngine.NET

FeaturedPostsList - Released

December 02, 2013 Posted by Mithila Software
We have released new version of FeaturedPostsList with bugfixes , tweaks and enhanced performance.The widget for BlogEngine.Net was one of the first widget of its kind at the time of its first release using Jquery to slide your featured Posts.   Find FeaturedPostsList - widget in action here How to Setup FeaturedPostsList 1First of All You need to define the location where the slider is to be displayed .This needs to be done in your theme with the following line of code <blog:WidgetZone ID="WidgetZoneSlider" runat="server" ZoneName="be_WIDGET_ZONE_Slider" /> Place the above code at the banner location of your website.   2Set the Category that slider needs to display your posts from using Edit Widget.   3Click Save to Finish.   Tip : Create a separate category named ' featured ' and place your featured posts in that category. Adding Images to your posts makes the slider display images with your post.   Video Tutorial For Featured Post List Configuration - Click Ask for feature request or discuss problems in installation by commenting below.

BlogEngine.Net Extension to show related posts inside post content

January 01, 2013 Posted by Mithila Software
You can show related posts inside post content of your blog based blog with the help of the extension below.Simply place this code (c#) in your BlogEngine.Web\App_Code\Extensions folder of blog directory.The related will show at top-left of the blog but you can customize it by tweaking the codes below.   using BlogEngine.Core.Web.Extensions; namespace App_Code.Extensions { using System; using System.Web; using BlogEngine.Core; using BlogEngine.Core.Web.Controls; using System.IO; using System.Text; using System.Collections.Generic; using System.Globalization;   /// <summary> /// Summary description for CustomEmbed [Extension("Shows related posts inside the current post ", "1.0", "")] public class RelatedPostsinPost {   static List<string> postimages = new List<string>(); static RelatedPostsinPost() { Post.Serving += new EventHandler<ServingEventArgs>(Serving); } private static void Serving(object sender, ServingEventArgs e) { if (e.Location == ServingLocation.SinglePage || e.Location == ServingLocation.SinglePost) {   Post post = (Post)sender;   string body = post.Content;   var relatedPosts = Search.FindRelatedItems((IPublishable)post); var relatedPosts2 = relatedPosts.GetRange(0, Math.Min(5, relatedPosts.Count));   string rpc = "<div style=\"background-color: #F2F2F2;margin: 0;overflow: hidden;float:left;margin-right:10px;\"><div style=\"height:40px;background-color:#C4CDE0;vertical-align:top;display:inline-block;width:100%;line-height: 40px;text-align:center;color:#000000;\">Related News</div><ul style=\"color: #5B7CA5;display: block;font-size: 14px;list-style-position: inside;list-style-type: square;text-decoration: none;\">"; foreach (var item in relatedPosts2) { rpc += "<li style=\"border-bottom: 1px solid #CBCBCB;font-family: Georgia,Times New Roman,Times,serif;padding: 5px 0px;width: 284px;\">" + string.Format("<a style=\"color: #0A67A4;text-decoration: none;\" href={0}>{1}</a>", item.RelativeLink, item.Title) + "</li>"; }   e.Body = rpc + "</ul> <img style=\"float:right;\" src=\http://<location to empty image>/336x280t.jpg\ /></div>" + e.Body;   } }   } } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ white-space: normal; } .csharpcode pre { margin: 0em;} .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; }

Our first BlogEngine.Net Theme ! - Sizzle

November 15, 2011 Posted by Mithila Software
  We are excited to release our first theme for BlogEngine.Net named Sizzle (download sizzle theme) .The idea was born trying to incorporate a fresh and cool look to powered blogs.With that start ! , we would be enhancing and adding new features (like widgets and extensions) to this theme.   On the widget front , we have released Featured Post List Widget which can be used to display particular category posts in a slider fashion for example Featured Articles / Category.We would love to hear your feedbacks which can help us in bug fixing as well as motivation .   Stay tuned !

Fixing BlogEngine.Net For SEO Requirements

September 06, 2011 Posted by Mithila Software
By Himanshu Jha After the Panda updates the onsite seo has taken a front seat.The html suggestions that you see in your Google Webmaster Tools must be taken care of.Talking about a blog based site we have some conditions that needs to be fixed.These changes have to be done in be_intallation_location/themes/site.master.cs Steps : 1.Remove unnecessary tagged pages from google index. 2.301 Redirect duplicate pages occured due to Case problem of IIS (Example Mobile-Review.aspx & mobile-review.aspx)   3.Remove paged urls from index except the main category url.   4.Remove duplicate post url from index bearing date in url (eg - yyyy/mm/dd)   5.Adding Canonical tag to duplicate post pages. Google webmaster suggests these sample urls have problem /?tag=/32-mega-pixel-ericsson-phones /category/aa-Review.aspx /category/AA-review.aspx /category/aa-Review.aspx?page=5 /category/AA-review.aspx?page=5 And this one is the fix that you can extend using System; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; using BlogEngine.Core; using BlogEngine.Core.Web.Controls; using System.Text.RegularExpressions; public partial class site : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { if (Page.User.Identity.IsAuthenticated) { aLogin.InnerText = Resources.labels.logoff; aLogin.HRef = BlogEngine.Core.Utils.RelativeWebRoot + "login.aspx?logoff"; } else { aLogin.HRef = BlogEngine.Core.Utils.RelativeWebRoot + "login.aspx"; aLogin.InnerText = Resources.labels.login; } if (Request.QueryString.Count == 0 && Request.RawUrl.Replace("?","").EndsWith("/default.aspx",StringComparison.OrdinalIgnoreCase)) { string query = Request.QueryString["theme"]; string theme = !string.IsNullOrEmpty(query) ? query : BlogSettings.Instance.Theme; string path = string.Concat(Utils.RelativeWebRoot, "themes/", theme, "/PostViewFrontPage.ascx"); //Control.MapPath() PostViewBase postView = (BlogEngine.Core.Web.Controls.PostViewBase)LoadControl(path); postView.ShowExcerpt = true;// BlogSettings.Instance.ShowDescriptionInPostList; //just set a temp post to show - for not getting error Post tmp = BlogEngine.Core.Post.Posts[0]; postView.Post = tmp; postView.ID = "sdfsdfsf";// tmp.Id.ToString().Replace("-", string.Empty); postView.Location = ServingLocation.PostList; fronttop.Controls.Add(postView); } string rawUrl = String.Concat(this.GetApplicationUrl(), Request.RawUrl); if (rawUrl.Contains("/post/")) { bool hasQueryStrings = Request.QueryString.Keys.Count > 1; if (hasQueryStrings) { Uri uri = new Uri(rawUrl); rawUrl = uri.GetLeftPart(UriPartial.Path); HtmlLink canonical = new HtmlLink(); canonical.Href = rawUrl; canonical.Attributes["rel"] = "canonical"; Page.Header.Controls.Add(canonical); } Regex regex = new Regex(@"^http(s)?://([\w-]+\.)+[/[\w- ./]+[/[\w- ./]+[\-\/\s]\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))+(/[\w- ./?%&=]*)?$"); bool hasDateUrl = regex.IsMatch(rawUrl); if (hasDateUrl) { HtmlGenericControl meta = new HtmlGenericControl("meta"); meta.Attributes["name"] = "robots"; meta.Attributes["content"] = "noindex,follow"; Page.Header.Controls.Add(meta); } } if (rawUrl.Contains("?tag=")) { HtmlGenericControl meta = new HtmlGenericControl("meta"); meta.Attributes["name"] = "robots"; meta.Attributes["content"] = "noindex,follow"; Page.Header.Controls.Add(meta); } if (rawUrl.Contains("/category/")) { bool hasQueryStrings = Request.QueryString.Keys.Count > 1; if (hasQueryStrings) { HtmlGenericControl meta = new HtmlGenericControl("meta"); meta.Attributes["name"] = "robots"; meta.Attributes["content"] = "noindex,follow"; Page.Header.Controls.Add(meta); } else { bool hasCapitalUrl = false; foreach (Char C in rawUrl) { if (Char.IsUpper(C)) hasCapitalUrl = true; } if (hasCapitalUrl) { Response.StatusCode = 301; Response.Status = "301 Moved Permanently"; Response.AddHeader("Location", rawUrl.ToLower()); } } } } private string GetApplicationUrl() { string basePath; string port = HttpContext.Current.Request.ServerVariables["SERVER_PORT"]; string protocol = HttpContext.Current.Request.ServerVariables["SERVER_PORT_SECURE"]; string serverName = HttpContext.Current.Request.ServerVariables["SERVER_NAME"]; if (port == null || port == "80") { port = String.Empty; } else { port = String.Concat(":", port); } if (protocol == null || protocol == "0") { protocol = "http://"; } else { protocol = "https://"; } basePath = String.Concat(protocol, serverName, port); return basePath; } }

Category Posts

Address ::
Mithila Software Solutions,
Green House , 3 GM Road ,
Near Radio Station , Darbhanga
PIN:: 846004
Phone :: # 099-397-49350