Add a "Weather Forecast" function for your blog.
Add the following statement in the "Static News / Declaration" of "Options" -> Configuration, you can:
Today's weather b>
Add flash exquisite clock to blog
Discover a lot of beautiful Flash clocks, free, no ads can be used, color can also be selected, easy to install.
You can preview, choose your favorite.
Scale clock: where Http: //www.butabon .com / clock / clock_038.swf is the Flash address of the clock, can be previewed in IE, where 038 can replace any number between 000-039 or between 051-059 (all look at personal preferences, huh)
Digital clock:
The first style: where http: // www .butabon.com / clock / digiwide019.swf is also the Flash address of the clock, can be previewed in IE, where 019 can replace any number between 000-019 (also fully watching personal preferences, huh)
Second style: where http: // www .butabon.com / clock / digital_019.swf is also the Flash address of the clock, which can be previewed in IE, where 019 can replace any one between 000-019 You can successfully preview in IE ( Please test your own yourself).
See: http://blog.9cbs.Net/kvw3000/41178.aspx
Blog Tips: Add a control menu to blog to expand and shrink press
When you read the article, Blog's menu bar is really too eye, I added a button to control the display and hide of the menu. This can be implemented with JavaScript, but 9CBS Blog is not allowed to join JavaScript directly in the configuration, but we can add JavaScript to a picture in LNLOAD event. Look at me is added to the counting code code, the effect looks at the upper left corner. The program code is as follows:
VAR div = document.createElement ('span'); document.body.insertadjacentelement ('BeforeEnd', Div); div.style.csstext = 'POSITION: ABSOLUTE; Display: block; Top: 42; Left: 2; width: 90; Height: 20; Color: Green; Background: Yellow; border: 2 outset; cursor: hand; '; div.innerText =' << Return Menu '; div.οnclick = function () {var iShide = (RightMenu). Style.display == 'None'); RightMenu.Style.Display = ISHIDE? 'Block': 'None'; Div.innertext = ISHIDE? '<< Return Menu': 'Expand Menu >>';} Pair of Blog Skin Concrete modification
The skin pattern I have chosen is anothereon001. The following is a specific custom CSS:
. HeadermainTitle {FONT-FAMILY: FONT-SIZE: 1CM; Color: # 000000; Align: center} .blogstats {color: black;} p.date span {background-color: # e7e7e7;}. post {border: 1px solid #cccccc; border-bottom-width: 2px; border-right-width: 2px; padding: 4px; margin-bottom: 28px; background-color: #dadada;}. Post h2 {font-size: 14px; margin : 0px; margin-bottom: 4px; font-family: 体 _GB2312;}. Post a {color: # ff5500;}. Post .postfoot {margin: 0px; margin-top: 14px; color: # aa6666; border- Top: 1px solid #dddddddd; font-size: 0.8em; Background-color: # c8c8c8;} # top {background-color: #ffffff; height: 75px; vertical-align: middle; background-image: URL (http: //BLOG.9CBS.NET/IMages/blog_9cbs_net/peterdoo/18050/o_yu.jpg); Background-Repeat: no-repeat; filter: alpha (Opacity = 80);} # sub {text-align: Right; Background Color: # bbd4d9; color: #cccccc; font-size: 0.8em; padding: 4px;} # leftcell {width: 200px; vertical-align: top; background-color: # bbc3d9; filter: alpha (Opacity = 100, Finishopacity = 0, Style = 1);}. maincell {border-left: 1p X solid #ddddddd; border-bottom: 1px solid #dddddd; padding: 10px; background-color: # e7e7e7; vertical-align: top;}
The background image is the picture uploaded to the album.
There is no background image to the left menu area, just use filter: alpha (Opacity = 100, finishopacity = 0, style = 1); a background color of the transition effect produced. In fact, there is no technical content! Show your MSN and QQ status in Blog
Paste the following code to the BLOG management configuration 'Static News' Text box is OK, save the page, look at your home
MSN status:
More you can go http://snind.gotdns.com:8080
QQ status:
More you can go http://qqol.3322.org/
Create a personal calendar control for your blog
The calendar control is one of the controls of the DOTNET, which is powerful, and it is useful in many project development, which is essential for the Blog system. It still needs to be carved in a good jade, in order to make it more beautiful and practical, we also need to develop it secondary.
The first step is to set up, this is required to make some adjustments to its related properties according to your needs. The picture below is the interface I adjusted.
The property is set as follows:
DayHeaderstyle-BackColor = "# 5e715e" OtherMontHDayStyle-foreColor = "# cccccc" dayNameformat = "full" Runat = "server" titlesty-forecolor = "# ffffff" NextPrevStyle-forecolor = "# ffffff" cellspacing = "1" WeekenddayStyle-BackColor = "# eeeeee" dayheaderstyle-forecolor = "# fffff" SelectionMode = "none" TODAYDAYSTYLE-BORDERCOLOR = "# 5e715e" TodayDayStyle-borderwidth = "1" TodayDayStyle-font-bold = "true" TodayDayStyle-foreColor = "# 5e715e"> The second step is to adjust the internal function, which is mainly set to the processing of the following two events. Prerender: When the server control will be present to the PAGE object included. Dayrender: When the Calendar control is created every day in the control hierarchy. First define three integer variables and integer arrays Private int [] ArrcurrentDays, Arrpredays, ArrnextDays; // The three variables are the current month, January, and the next month private int int, intnextMonth, IntnextMonth; // three integer array stores relative months written with blog Date Protected System.Web.ui.WebControls.calendar Calendar1; // This is our calendar control. 2. Below I will give the source code of these two events, and explain the features it implemented below. If you don't understand, you can first look at the following description. Prerender private void Calendar1_PreRender (object sender, System.EventArgs e) {Thread threadCurrent = Thread.CurrentThread; CultureInfo ciNew = (CultureInfo) threadCurrent.CurrentCulture.Clone (); ciNew.DateTimeFormat.DayNames = new string [] { "day", " A "," two "," three "," four "," five "," six "}; cinew.datetimeformat.firstdayofweek = dayofweek.sunday; threadcurrent.currentculture = cinew;} The above code changes the display of the weeks. You can change your name to display only if you want to change the value of the character array. Dayrender Private void Calendar1_dayrender (object sender, system.web.ui.webcontrols.dayrenderEventArgs e) {// This control occurs every day. Calendarday D = ((DayRendeventargs) e) .day; TableCell C = ((DayRendreventArgs) e). Cell; // Initialize the current month's date array if (INTPREMONTH == 0) {INTPREMONTH = D.date.month; // Note: The first month we get in the first month when the calendar control is initialized, but the former one intCurrentMonth month month = intPreMonth 1; if (intCurrentMonth> 12) intCurrentMonth = 1; intNextMonth = intCurrentMonth 1; if (intNextMonth> 12) intNextMonth = 1; arrPreDays = getArrayDay (d.Date.Year, intPreMonth); // Received the date array of blogs from the previous month ArrcurrentDays = GetArrayDay (D.date.Year, INTCURRENTMONTH); // Get date array of blogs in the month arrnextDays = GetArrayDay (D.date.Year, IntnexTmonth); // Get next month There is a date array of blog} int J = 0; if (d.date.month.equals (intPRemonth)) {while (! Arrpredays [j] .Equals (0)) {if (D.date.day.equals (arrpredays [j]) {c.controls.clear (); c.controls.add (new literalcontrol (" D.date.day " " D.DATE. Day ""));} J ; }}} Else if (d.date.month.equals (intNextMonth)) {while (! ArrnextDays [J] .Equals (0)) {if (D.date.Day.equals (arrnextdays [j])) {c. Controls.clear (); c.controls.add (new literalcontrol (" D.date.day " When using a DayRender event, you must do not forget that it is performed once at each date initialization, which means that the event initialization of the calendar control is to execute 42 times, so do not add as possible, don't add Judging the repeated database operation, I didn't pay attention when I started, and two read library statements were written in the event, and the results were seriously affected. The following method is that I have used to get a date array. // Get the date array of Blog this month private int [] GetArrayDay (int tent "{int [] INTARRAY = new int [31]; // Select records in accordance with the requirements in the database, deposit the date into array string strSql = "select content_time from content where year (content_time) =" intYear "and month (content_time) =" intMonth; dr = SqlHandle.GetDr (strSql); while (dr.Read ()) {if (i = = 0) {INTARRAY [I] = Dr.getdateTime (0) .day; i ;} else f (Dr.GetdateTime (0) .day! = INTARRAY [I-1]) {Intarray [i] = Dr.GetDatetime (0) .day; i ;}} Dr.close (); Return INTARRAY
DayHeaderstyle-BackColor = "# 5e715e" OtherMontHDayStyle-foreColor = "# cccccc" dayNameformat = "full"
Runat = "server" titlesty-forecolor = "# ffffff" NextPrevStyle-forecolor = "# ffffff" cellspacing = "1"
WeekenddayStyle-BackColor = "# eeeeee" dayheaderstyle-forecolor = "# fffff" SelectionMode = "none"
TODAYDAYSTYLE-BORDERCOLOR = "# 5e715e" TodayDayStyle-borderwidth = "1" TodayDayStyle-font-bold = "true"
TodayDayStyle-foreColor = "# 5e715e"> The second step is to adjust the internal function, which is mainly set to the processing of the following two events.
Prerender: When the server control will be present to the PAGE object included.
Dayrender: When the Calendar control is created every day in the control hierarchy.
First define three integer variables and integer arrays
Private int [] ArrcurrentDays, Arrpredays, ArrnextDays; // The three variables are the current month, January, and the next month private int int, intnextMonth, IntnextMonth; // three integer array stores relative months written with blog Date Protected System.Web.ui.WebControls.calendar Calendar1; // This is our calendar control.
2. Below I will give the source code of these two events, and explain the features it implemented below. If you don't understand, you can first look at the following description.
Prerender
private void Calendar1_PreRender (object sender, System.EventArgs e) {Thread threadCurrent = Thread.CurrentThread; CultureInfo ciNew = (CultureInfo) threadCurrent.CurrentCulture.Clone (); ciNew.DateTimeFormat.DayNames = new string [] { "day", " A "," two "," three "," four "," five "," six "}; cinew.datetimeformat.firstdayofweek = dayofweek.sunday; threadcurrent.currentculture = cinew;}
The above code changes the display of the weeks. You can change your name to display only if you want to change the value of the character array.
Dayrender
Private void Calendar1_dayrender (object sender, system.web.ui.webcontrols.dayrenderEventArgs e) {// This control occurs every day. Calendarday D = ((DayRendeventargs) e) .day; TableCell C = ((DayRendreventArgs) e). Cell;
// Initialize the current month's date array if (INTPREMONTH == 0) {INTPREMONTH = D.date.month; // Note: The first month we get in the first month when the calendar control is initialized, but the former one intCurrentMonth month month = intPreMonth 1; if (intCurrentMonth> 12) intCurrentMonth = 1; intNextMonth = intCurrentMonth 1; if (intNextMonth> 12) intNextMonth = 1; arrPreDays = getArrayDay (d.Date.Year, intPreMonth); // Received the date array of blogs from the previous month ArrcurrentDays = GetArrayDay (D.date.Year, INTCURRENTMONTH); // Get date array of blogs in the month arrnextDays = GetArrayDay (D.date.Year, IntnexTmonth); // Get next month There is a date array of blog} int J = 0; if (d.date.month.equals (intPRemonth)) {while (! Arrpredays [j] .Equals (0)) {if (D.date.day.equals (arrpredays [j]) {c.controls.clear (); c.controls.add (new literalcontrol (" D.date.day " " D.DATE. Day ""));} J ;
}}} Else if (d.date.month.equals (intNextMonth)) {while (! ArrnextDays [J] .Equals (0)) {if (D.date.Day.equals (arrnextdays [j])) {c. Controls.clear (); c.controls.add (new literalcontrol (" D.date.day "
When using a DayRender event, you must do not forget that it is performed once at each date initialization, which means that the event initialization of the calendar control is to execute 42 times, so do not add as possible, don't add Judging the repeated database operation, I didn't pay attention when I started, and two read library statements were written in the event, and the results were seriously affected.
The following method is that I have used to get a date array.
// Get the date array of Blog this month private int [] GetArrayDay (int tent "{int [] INTARRAY = new int [31]; // Select records in accordance with the requirements in the database, deposit the date into array string strSql = "select content_time from content where year (content_time) =" intYear "and month (content_time) =" intMonth; dr = SqlHandle.GetDr (strSql); while (dr.Read ()) {if (i = = 0) {INTARRAY [I] = Dr.getdateTime (0) .day; i ;} else f (Dr.GetdateTime (0) .day! = INTARRAY [I-1]) {Intarray [i] = Dr.GetDatetime (0) .day; i ;}} Dr.close (); Return INTARRAY