Joel.Net.WebLogs
Overview
Joel.Net.WebLogs is a UserControl that easily allows you to create WebLogs / blogs / news entries on your website. The ASCX page is included to make customization simple.But why?
There's plenty of "blog" tools out there... why create a new one? Well that's easy. The only good ones I found were complete web applications. I wanted a simple User Control that I could slip into my page. If you're looking for a complete application, check out .Text, it's one of the better ones I've found.Plus, just look at how cool this weblog tool looks! *hehe*
Support @ GotDotNet.com
All souce control and distribution for this project has been changed to GotDotNet.com. They provide some useful tools...- Message Board - Requests, Bugs, Comments, Suggestions? Post them here.
- Releases - Current and Past Releases
Subscribe to the workspace to receive emails about new versions releases.
Features
- Works in any ASP.NET site (C#, VB.NET, etc.)
- WebLogs use FreeTextBox 2.0 for a clean and functional look.
- Spell Check (NetSpell installed by default).
- Image Gallery allows you to upload images for use in your WebLog.
- Joel.Net.PageComments UserControl allows comments to be added to individual WebLogs
- WebLogs now support RSS!
- Weblog entries can be stored in XML format.
Weblog entries can be stored in MS SQL Server.(not yet available)- Supports multiple users.
- Modular Design - Allows many different design formats.
- Easy integration into your existing ASP.NET website.
Change Log
- 1.3.2 - 19 Nov, 2004
- Added support for xml data files outside of webroot.
- FreeTextBox 3.0 RC added to project.
- FreeTextBox gallery is enabled by default.
- NetSpell is now included and enabled.
- A bug in the Cancel button has been fixed.
- Cancel button has been renamed to Logout.
- Joel.Net.PageComments upgraded to v1.2.3.
- Fixed problems with broken images after submitting comment.
more ...
Screenshots
How to use
The WebLogs control is very simple. The only property you need to populate is the path to the xml data file. All customization to to look and feel of the WebLogs will be done in the weblogs.ascx page.Code
default.aspx<%@ Page language="c#" AutoEventWireup="false" %> <%@ Register TagPrefix="uc1" TagName="weblogs" Src="WebLogs/WebLogs.ascx" %> <HTML> <HEAD> <TITLE>default</TITLE> <LINK rel="stylesheet" type="text/css" href="Styles.css"> </HEAD> <BODY bgcolor="white"> <FORM id="Form1" method="post" runat="server"> <TABLE border="0" width="500"> <TR><TD> <UC1:WEBLOGS id="Weblogs1" runat="server" file="weblogs" /> </TD></TR> </TABLE> </FORM> </BODY> </HTML>
XML Weblog Storage file
<?xml version="1.0" encoding="utf-8"?> <weblogs> <settings> <!-- 0 = All in one page --> <logs_per_page>3</logs_per_page> <users> <!-- note: unsafe user user/pass if xml file is accessible via web. --> <user name="admin" pass="password" /> </users> </settings> <channel> <title>Joel.Net Weblogs</title> <link>http://localhost/webLogs/default.aspx</link> <!-- note: 'Weblogs1' is the ID of the control in default.aspx (THIS IS IMPORTANT) --> <single_link>http://localhost/WebLogs/default.aspx?Weblogs1_show=</single_link> <description>Joel Thoms</description> <pubDate>Sun, 03 Oct 2004 06:09:49 GMT</pubDate> <lastBuildDate>Sun, 03 Oct 2004 06:09:49 GMT</lastBuildDate> <managingEditor>no-reply@joel.net</managingEditor> <webMaster>no-reply@joel.net</webMaster> <copyright>Copyright 2004, Joel Thoms</copyright> <image> <url>http://joel.net/shared/templates/main/images/logo.gif</url> <title>joel.net logo</title> <width>80</width> <height>33</height> </image> <item> <guid>276d59cd-9fae-4795-98f4-e82852bdbefa</guid> <pubDate>Tue, 27 Jul 2004 12:01:27 GMT</pubDate> <user>admin</user> <title>Lorem ipsum dolor sit amet</title> <body>Lorem ipsum dolor sit amet, consectetuer</body> </item> <item> <guid>2e311ead-b03a-41b7-a275-a6ae75425f39</guid> <pubDate>Tue, 27 Jul 2004 12:01:20 GMT</pubDate> <user>admin</user> <title>Duis volutpat</title> <body>Duis volutpat. Donec nisl diam, condimentum et, fringilla quis, laoreet at, enim.</body> </item> <item> <guid>4c5c4392-d536-4125-85a2-d0cf8e47e8be</guid> <pubDate>Tue, 27 Jul 2004 12:01:11 GMT</pubDate> <user>admin</user> <title>Maecenas ornare mollis mi</title> <body>Maecenas ornare mollis mi. Morbi auctor.</body> </item> <item> <guid>c73b4ac2-778c-4e56-b85a-2ce8e07d7e3f</guid> <pubDate>Tue, 27 Jul 2004 12:01:04 GMT</pubDate> <user>admin</user> <title>Quisque bibendum. Nam ante.</title> <body>Quisque bibendum. Nam ante. Ut ligula.</body> </item> </channel> </weblogs>
WebLogs.ascx
<%@ Register TagPrefix="pc" TagName="PageComments_Display" Src="./pagecomments/PageComments_Display.ascx" %> <%@ Register TagPrefix="pc" TagName="PageComments_Count" Src="./pagecomments/PageComments_Count.ascx" %> <%@ Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %> <%@ Control Language="c#" AutoEventWireup="false" Inherits="Joel.Net.WebLogs.WebLogsUserControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <ASP:PLACEHOLDER runat="server" id="phStyles" /> <ASP:PANEL id="pnlLogin" runat="server"> <TABLE class="weblogs_login" align="center"> <TR> <TH colspan="2"> WebLogs: Authentication</TH></TR> <TR> <TD>User:</TD> <TD> <ASP:TEXTBOX id="login" runat="server"></ASP:TEXTBOX></TD> </TR> <TR> <TD>Password:</TD> <TD> <ASP:TEXTBOX id="password" runat="server" textmode="Password"></ASP:TEXTBOX></TD> </TR> <TR> <TD> </TD> <TD> <ASP:BUTTON id="submit_login" runat="server" text="Login"></ASP:BUTTON></TD> </TR> </TABLE> <BR> <BR> </ASP:PANEL> <ASP:PANEL id="pnlEdit" runat="server"> <TABLE class="weblogs_addedit"> <TR> <TH colspan="2"> WebLogs: Add / Edit WebLogs</TH></TR> <TR> <TD><B>ID:</B></TD> <TD> <ASP:TEXTBOX id="edit_id" runat="server" enabled="False"></ASP:TEXTBOX></TD> </TR> <TR> <TD><B>Date:</B></TD> <TD> <ASP:TEXTBOX id="edit_date" runat="server"></ASP:TEXTBOX></TD> </TR> <TR> <TD><B>Subject:</B></TD> <TD> <ASP:TEXTBOX id="edit_subject" runat="server" width="445px"></ASP:TEXTBOX></TD> </TR> <TR> <TD colspan="2"><BR> <FTB:FREETEXTBOX id="edit_weblog" runat="server" width="500px" height="300px" toolbarlayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker|Bold,Italic,Underline,Strikethrough;Superscript,Subscript,RemoveFormat|CreateLink,Unlink,InsertRule;JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList;Indent,Outdent|Cut,Copy,Paste,Delete;Undo,Redo,Print;InsertDate,InsertTime,WordCount"></FTB:FREETEXTBOX></TD> </TR> <TR> <TD align="right" colspan="2"> <ASP:BUTTON id="edit_submit" runat="server" text="Add / Edit" width="100px"></ASP:BUTTON> <ASP:BUTTON id="edit_cancel" runat="server" text="Cancel" width="100px"></ASP:BUTTON></TD> </TR> </TABLE> </ASP:PANEL> <ASP:REPEATER id="repWebLogs" runat="server"> <ITEMTEMPLATE> <TABLE cellspacing="0" cellpadding="0" class="weblogs"> <TR> <TD class="weblogs_date"><%# String.Format("{0:ddd, dd MMM yyyy}", DataBinder.Eval(Container.DataItem, "pubDateLocal")) %></TD> </TR> <TR> <TD class="weblogs_body"> <ASP:HYPERLINK runat="server" id="hlEdit" visible="False"> <ASP:IMAGE runat="server" id="imgEdit" imageurl="images/edit2.gif" /> </ASP:HYPERLINK> <ASP:HYPERLINK runat="server" id="hlDelete" visible="False"> <ASP:IMAGE runat="server" id="imgDelete" imageurl="images/delete.gif" /> </ASP:HYPERLINK> <DIV class="weblogs_title"> <ASP:HYPERLINK runat="server" id="hlDisplaySingle"> <%# DataBinder.Eval(Container.DataItem, "title") %> </ASP:HYPERLINK> </DIV> <DIV class="weblogs_body"> <%# DataBinder.Eval(Container.DataItem, "body") %> <BR> <BR> <PC:PAGECOMMENTS_COUNT id="Pagecomments_count1" runat="server" comment_file="{0}_comments" comment_href="javascript:if(document.getElementById('divcomments_{0}').style.display=='none')document.getElementById('divcomments_{0}').style.display='';else document.getElementById('divcomments_{0}').style.display='none';" /> <DIV id='divcomments_<%# DataBinder.Eval(Container.DataItem, "guid") %>' style="display:none;"> <BR> <PC:PAGECOMMENTS_DISPLAY id="pcComments" runat="server" comment_file="{0}_comments" /> <BR> <PC:PAGECOMMENTS_COUNT id="Pagecomments_count2" runat="server" comment_file="{0}_comments" comment_href="javascript:if(document.getElementById('divcomments_{0}').style.display=='none')document.getElementById('divcomments_{0}').style.display='';else document.getElementById('divcomments_{0}').style.display='none';" /> </DIV> </DIV> </TD> </TR> </TABLE> </ITEMTEMPLATE> <SEPARATORTEMPLATE> <BR> </SEPARATORTEMPLATE> </ASP:REPEATER> <TABLE width="90%" border="0" class="weblogs_nav"> <TR> <TD align="right"> <ASP:PLACEHOLDER id="phWebLogsNavigation" runat="server">Pages: </ASP:PLACEHOLDER> <BR> <BR> <ASP:HYPERLINK id="hlWebLogsAdmin" runat="server"> <ASP:IMAGE runat="server" id="imgWebLogs" imageurl="WebLogs.gif" /> </ASP:HYPERLINK> <ASP:HYPERLINK id="hlRSS" runat="server" navigateurl="WebLogs_RSS.aspx?x={0}&t=rss2.0"> <ASP:IMAGE runat="server" id="imgRSS" imageurl="rss2.0.gif" /> </ASP:HYPERLINK> </TD> </TR> </TABLE> <TABLE width="90%" border="0"> <TR> <TD align="center" style="FONT-SIZE: 7pt; FONT-FAMILY: Verdana">WebLogs powered by <A href="http://joel.net/code/weblogs.aspx"> Joel.Net.WebLogs</A></TD> </TR> </TABLE>
Links
- Joel.Net.WebLogs in ASP.NET's control gallery.
- Joel.Net.WebLogs in 411ASP.NET's control gallery.
- GotDotNet.com
- Community Server :: Blogs (formerly .Text).
- NetSpell
- FreeTextBox.com
graphic.