Nhúng bộ gõ Mudim vào BlogEngine

by Neon Quach 3. March 2010 04:27

Nhằm support khách Việt viếng thăm và gõ tiếng Việt có dấu, mình vừa embed bộ gõ Mudim vào Blog, giờ mình muốn share cách làm mình thế nào để embed bộ gõ vào Blog bằng cách lập trình và hổ trợ nén (compress).


Download Mudim: http://code.google.com/p/mudim/

Bỏ nó vào root của Blog, navigate tới BlogEngine.Core\Web\Controls\BlogBasePage.cs, make sure that you download source code version, trong sự kiện OnLoad add dòng sau

AddJavaScriptInclude(Utils.RelativeWebRoot + "mudim-0.8-r153.js", true, true);

Phía duới

AddJavaScriptInclude(Utils.RelativeWebRoot + "blog.js", true, true);

Hàm AddJavaScriptInclude nhận vào 4 tham số: 1.đường dẩn tập tin js cần add, 2.tên tập tin js, 3.có đặt file js phía dưới trang boolen, 4.tham số cuối cùng là có add deferattribute vào thẻ script hay không (defer là attribute cho biết trình duyệt sẻ load trang trước khi run đoạn js đó)

Vào web.config add thêm dòng mudim-0.8-r153.js trong appSettings

    <!--A comma separated list of script names to hard minify. It's case-sensitive. -->

    <add key="BlogEngine.HardMinify" value="blog.js,widget.js,mudim-0.8-r153.js,WebResource.axd"/>

Xong giờ có thể gõ tiếng Việt có dấu.
Regards,

 

Tags: , , , ,

ASP.NET | BlogEngine | open source | C#

BlogEngine.NET 1.6 is Released

by Neon Quach 3. February 2010 03:05

The team is proud to announce the release of BlogEngine.NET version 1.6.  With several new features and numerous improvements and bug fixes, this is a must upgrade version for current BlogEngine.NET users and those interested in entering the blog scene.

For those who receive a steady dose of comment spam (and who doesn't!), a new powerful Comment Management and Comment Spam Filtering infrastruture has been added in version 1.6.  Comments across all posts can be viewed, edited, deleted or approved in one convenient area.  Comments can still be manually moderated, but now moderation can be automated by running comments thru remote or local comment spam validation services.  Anyone can easily build new comment spam filters and plug them into BlogEngine.NET.  It's just as simple as adding custom Extensions and Widgets is.

The other notable feature in version 1.6 is support for multiple widget zones.  You can now place widgets anywhere on your site, and even move widgets from one zone to another.

A complete list of new features can be found here.

If you're upgrading from BlogEngine.NET version 1.5 or earlier, please take a minute to read these upgrade instructions.

Download it from codeplex

Reference

Tags: , , ,

ASP.NET | open source

Localization Nopcommerce

by Neon Quach 23. January 2010 04:46

Vài ngày sau khi publish bài  4 Bước cài đặt nopCommerce trên localhost đưc vài ngày, mình lùng sục cái Vietnamese language nhưng xui thay mình tìm không thấy ngôn ngữ tiếng việt cho Nop, giờ mình phải tự mình Việt hóa nop theo cách của mình.

Cách thực hiện:
Vào section language pack của nop download pack language tại đây, cách làm này tiện cho chúng ta import gói ngôn ngữ sau khi tạo.

Giải nén gói ngôn ngữ tiếng Anh ta sẻ có các tập tin sau đây


Tập tin chúng ta cần import là ResourceStrings.xml, open file đó và chỉ sửa 1 số bản quyền tác giả:

<Language Name="Vietnam" Contributor="Neon Quach (admin[at]code2code[dot]info)">

Đăng nhập vào Nop với tài khoản admin
Navigate sang menu Configuraion -> Location -> Language

Chọn Add New tên là Vietnam, language culture là vi-vn, check vào published, display order = 2, click vào button Save, sau khi save chúng ta bắt đầu import Resource Setting file khi nảy vừa download về -> Click nút import.


Sau khi import chúng ta sẻ có 2 languages: English và Vietnam bên góc phải màng hình admin

Navigate lại màng hình Language chúng ta sẻ thấy thêm 1 Vietnam language



Nhấn vào View Resource cho ngôn ngử tiếng Việt và tiến hành việt hóa.



Như thế cũng là chưa xong, vì chúng ta chỉ việt hóa cho các nút và giao diện thôi, vì khi chúng ta qua ra Dashboard chúng ta sẻ thấy message.

You don't have localized version of message template [Blog.BlogComment] for Vietnam. Create it now

You don't have localized version of message template [Customer.EmailValidationMessage] for Vietnam. Create it now
You don't have localized version of message template [Customer.PasswordRecovery] for Vietnam. Create it now
………………..

Để việt hóa cho những nội dung này, chúng ta vào Content Management -> Tempate -> Manage Template, và chọn ngôn ngữ và Vietnam.

Ví dụ: click edit vào Blog.BlogComment, điền vào nội dung trong file Blog.BlogComment.txt mà chúng ta download từ Nop.

Subject: %Store.Name%. Bình luận blog mới.
Body: <p><a href="%Store.URL%">%Store.Name%</a> <br />

<br />

Một bình luận blog mới được tạo &quot;%BlogComment.BlogPostTitle%&quot;.</p>

và chúng ta lập lại cho tất cả các content như thế, cho đến khi nào không còn thấy message vậy nửa.

Vậy là xong!

Note: sau khi việt hóa xong rồi nhớ share với mọi người he, chúc các bạn thành công.

Tags: ,

open source

Google Code2Code.info Repository

by Neon Quach 21. January 2010 03:02

Google Code2Code Repository

I have just created a new Google code2code.info repository which store my code’s blog, you can get all my code at: http://code2code.googlecode.com/svn/trunk/

The first project is Deploy window application using Visual Studio, I will add more blog’s code soon.


Regard,

Tags:

open source

Hướng dẫn install YetanotherForum trên localhost

by Neon Quach 1. January 2010 01:11

Trong bài viết này mình sẻ hướng dẫn các bạn cách cài đặt yetanotherforum (yaf) trên localhost trước khi go live.

Chuẩn bị
1. Visual Studio 2008 SP1 + Net 3.5 SP1.
2. SQL Express 2005 or latest version.
3. IIS install.
4. Latest version of yaf (1.9.4 RC1)
http://sourceforge.net/projects/yafdotnet/files/

Cách thực hiện

1.Đầu tiên tạo database sử dụng SQL server express, named tùy thích.
2. Extract yaf source code và open yetanotherforum.net solution file.
3. Copy tập tin recommended-NET-web.config trong thư mục webconfigs sang thư mục root và rename thành web.config.


4. Copy toàn bộ *.dll trong thư mục bin\Net3.5 sang bin folder.
5. Tạo chuổi kết nối tới database bằng cách edit lại file db.config like this:

<connectionStrings>

  <add name="yafnet" connectionString="data source=QUACHNGUYEN-PC\SQLEXPRESS;initial catalog=yafforum;UID=sa;PWD=111111" />

</connectionStrings>

Tiến hành build by pressing F5, chúng ta sẻ thấy successful message.

6. Cấu hình IIS (this step maybe skip) http://localhost/yaf/
7. Browse url trong IIS like link above, chúng ta sẻ thấy màng hình sau:



Click Next để bắt đầu install, sang màng hình thứ 2, tạo config password


Nếu chúng ta chưa phân quyền ghi thì sẻ gặp màng hình like this,


Chúng ta có thể nhập password bằng tay trong file app.config

  ******************************************************************

      ** ConfigPassword Key ** Defaults to: Empty (not installed) **

 

  Password to run configuration (/install/default.aspx) for the forum.

  If you cannot set write permissions on this file (app.config)

  you can manually enter a plain text password here that will

      be required when you attempt to run the configuration. Install/config

      password is required for security reasons.

   -->

      <add key="YAF.ConfigPassword" value="111111" />

Click Next để tiếp tục bước cài đặt database


 
Ở màng hình thứ 4 này chúng ta có thể tạo mới database bởi việc chọn option 2: Create New DB Connection String, ở đây mình sẻ chọn cách cài đặt database có sẳn ở cách thứ 5 mà chúng ta đả thực hiện. Next.

Test send email, chọn cấu hình smtp trong mail.config trước khi test function này.

Click next để tiếp tục.


Nếu database của chúng ta support Full Text Search thì check vào checkbox, ngược lại.

Sang bước 7 cấu hình cho forum


Chọn cấu hình cho forum với những thông tin như tên forum, múi giờ, tài khoản admin…

Nếu không gặp trở ngại trong quá trình cài đặt thì chúng ta sẻ bắt gặp màng hình cuối này.

Click vào Finish để vào trang chủ của diễn đàn.



Chúc các bạn thành công, any question, please fell free to comment, always welcome

Tags: , , , ,

ASP.NET | open source

Check Comment Extension cho BlogEngine

by Neon Quach 31. October 2009 04:08

Blog mình go live được hơn 1 năm, số lượng bài viết cũng khác ít, nhưng số thành viên viếng thăm ngày càng đông, khi 1 bài viết mình publish, số lượng user theo dỏi cũng như bình  luận cũng tăng, nhưng đa phần là những bài spam, buông những lời thô tục,...

Cách mà mình làm trước giờ là visit hàng ngày blog của mình và gặp những bái đó và xóa nó đi, nhưng số lượng những bài bình luận spam ngày càng đông, mà mình thì không có nhiều time để handle chuyện này.

Để quản lý tốt blog của mình, thì mình đả enable top recent comment widget, và mình có thể theo dỏi và xem được nhanh chóng những bài comment đó, với những bài mang tính khiếm nhã thì mình đả enable chức năng approved by mod, và dùng check comment extension dành cho blog engine.

Để bật chức năng mode approved -> login bằng account admin -> setting page --> check vào check box Moderate comments.

Để blog tự động delete những comment của user với IP được chỉ định, và những bài comment chứa những từ thu tục mình dùng CheckComment Extension.

http://blog.dottor.net/page/BlogEngineNET-CheckComment-Extension.aspx

Download và giả nén, up source lên thư mục \App_Code\Extensions

Login bằng account Admin, vào trang Extension Manager chỉnh các option

IP to block: sử dụng dấu phẩy để chèn nhiều IP.
Words to block: sử dụng dấu phẩy để chèn nhiều IP.
Block the comments that contains a link.



Happy Blogging

Tags: ,

BlogEngine | open source

How to install DotShoppingCart on localhost

by Neon Quach 4. October 2009 04:51

How to install DotShoppingCart on localhost

What’s  DotShoppingCart (DSC)?
DotShoppingCart is an open source ASP.NET CMS & E-commerce solution. It's completely free. Creating and maintaining an ecommerce site has never been easier. The integrated content management system allows you to publish the dynamic content web sites with no knowledge of web programming. Build, manage and customize your site with ease through the builtin WYSIWYG block building tool. The innovative block building designer enables you to customize the look and feel of every single page of your site. The shopping cart supports credit card processing online or offline including PayPal and GoogleCheckout. It also supports digital downloadable products. The dynamic pages are optimized for the search engines--SEO. Inventory Management, full-text product search, product reviews and much more. The open source software comes with the source code for complete customization if needed. We also offer a complete online version for a paid fee to save your from finding and maintaining Web hosting.

How to install?

I tested on Vista with Visual Studio 2008 SP1 and SQL 2005 Express SP3 (Make sure you install the all the features including Full-Text Search and Client Components).

1. Download DSC source code.
http://www.dotshoppingcart.com/Page/Community/Download.aspx (You must be a user to download this package – source code edition v2.0).
2. Open OpenSourceEdition.sln with VS (maybe skip)
In this solusion you have many project.
3. To install  Database.
Navigate to DotShoppingCartOpenSourceV2\Install folder, you will see InstDSC.exe file which to install your database and DSC key. You must run this file in Visual Studio 2008 Command Prompt.

Here is my code:
D:\Open Source\DotShoppingCartOpenSourceV2\Install>InstDSC.exe .\SQLExpress dotshoppingcart D:\DSC\DotShoppingCartDB D:\DSC\key relay-hosting.secureserver.net

Press Enter you will see the message like this:

Creating [dbo]……
Adding……
GRANT EXEC ON……
(1 rows affected)

Done
Creating demo data ...
(1 rows affected)
done
Creating encryption key file D:\DSC\key\DotshoppingcartMaster.key ...done
Updating D:\Open Source\DotShoppingCartOpenSourceV2\Install\..\web\web.config ..
.done
D:\Open Source\DotShoppingCartOpenSourceV2\Install>

4. Run
Run Default.aspx inside VS and your result will be:


The default store admin login is the following.
username: admin
password: admin

More information how to install DSC manually, please visit official guide here

Tags: , , , ,

open source

Hướng dẫn cài đặt Blog Engine trên localhost

by Neon Quach 23. July 2009 20:35

BlogEngine.NET 1.5
Released: Apr 13 2009

BlogEngine.NET là một dự án viết blog mã nguồn mở. NET mà được sinh ra ngoài mong muốn cho một nền tảng blog tốt hơn . Một blog với nền tảng ít phức tạp, dễ dàng tuỳ biến, và một trong đó tận dụng các tính năng mới nhất .NET .

BlogEngine.NET này được thiết kế bằng cách sử dụng khuôn khổ .NET hiện nay và tập trung vào đơn giản, dễ dàng mở rộng, và các tính năng sáng tạo. Với BlogEngine.NET, chúng tôi hy vọng sẽ tạo ra blog tự nhiên của lựa chọn tuyệt vời cho tất cả mọi người phát triển .NET rộng khắp thế giới.

Các bước chuẩn bị:
Ở đây mình sẻ hướng dẩn các bạn install blog engine với CSDL là SQL sever để lưu trử dử liệu.
- Sq server 2000/2005.
- Visual Studio 2005/2008

Chú ý: bạn có thể dùng 1 text editor khác để thao tác chỉnh sửa web config, nhưng mình đề xuất là dung Visual Studio để có thể dể dàng code cho nó luôn.

Sau khi đả chuẩn bị thành công thì tới phần tải source code blog engine.

Visist: http://www.dotnetblogengine.net/

Download version hiện tại: http://blogengine.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=26080

Để cho dể dàng, chúng ta tải version: BlogEngine.NET 1.5 (web).

Tạo database: Blogengine hổ trợ 1 số database:MySQL, SQLite, SQLServer, VistaDB, XML, ở đây mình hướng dẩn các bạn làm việc với SQLServer.

Đầu tiên chúng ta tạo 1 database, và tìm đến thư mục setup/SQLServer/MSSQLSetup1.5.0.0.sql, chạy file này để tiến hành install database.

Chỉnh sửa web.config để làm việc với database SQLServer, chúng ta tìm đế thẻ: <connectionStrings>

<add name="BlogEngine" connectionString="Data Source=localhost\sqlexpress;User ID=sa;Password=111111;persist security info=False;initial catalog=BlogEngine;" providerName="System.Data.SqlClient"/>

Ở đây mình dùng Sql2005 Express, CSDL là BlogEngine, chứng thực quyền sa (recommend integrated security=true)

Tìm đến tag: <blogProvider defaultProvider="DbBlogProvider">

Thay thế  XmlBlogProvider -> DbBlogProvider Lý do là chúng ta dùng Provider SQl

Tương tự chúng ta chỉnh sửa tiếp cho Membership và Role:

<membership defaultProvider="DbMembershipProvider">
<roleManager defaultProvider="DbRoleProvider"...

Đến đây coi như xong giờ chúng ta run trang Default.aspx lên nếu chúng ta thấy trang như sau là các bạn đả install blogenigne sử dụng CSDL SqlServer thành công.



Login với user name: Admin và password: Admin
Happy blogging!

Tags: , , ,

BlogEngine | open source

AppServ 2.5.10

by Neon Quach 21. July 2009 04:58

What is AppServ?

AppServ the begining.

       AppServ is not support by Thai Goverment or Corporation but this program was inspire by Phanupong Panyadee (AppServ Foundation). Concept of AppServ it is Easy to install Apache, PHP, MySQL in 1 minute. Many people in this world have problem when Install Apache, PHP, MySQL becuase use long time to configure and some time can make dizzy. First time of distribution provide on October 9, 2001. Many people use AppServ and growing up everywhere in this world. Right now AppServ website provide in Thai and English language. For the future AppServ wet site will provide every languages on world.

AppServ is.
    AppServ is a full-featured of Apache, MySQL, PHP, phpMyAdmin. You can setup in 1 minite.
        Package of AppServ
             - Apache
             - PHP
             - MySQL
             - phpMyAdmin
    All packages download from Official Binary Release. AppServ objective just make easy to setup. We do not provide anything else more than Official Binary Release package. Becuase we think the Official Binary Release work better than compile by individual or third-party binary.
AppServ have only special configuration when install, Apache configure httpd.conf, MySQL configure my.ini, PHP configure php.ini. AppServ can guaranty any package from AppServ can work stable like Official of Apache, PHP, MySQL Release.
    Objective of AppServ Just Easy to install. You can setup web server, database server in 1 minute.For some question AppServ can be Real Production Web Server or Database Server. We can tell you Yes !! 100% can make AppServ to provide Production Server. But Windows OS is not good enough for heavy load on you web or database server.Windows OS architecture use more memory and CPU usage we recommend you to use Linux/Unix OS to service heavy load of work. Because Linux/Unix OS have more speed and use less memory and CPU usage. If you compare hit when use Windows OS and Linux/Unix OS you must be found a very difference speed. e.g. Windows can handle 1000 users per second but Linux/Unix OS can handle more than 1000 users per second and eat a little memory and cpu.

How difference of AppServ version.
    AppServ Version
          2.4.x is a Superb stable version work for all user, by the way this version use PHP 4.x because work fine with your old PHP code.
          2.5.x is the Rock function. This version provide newest and experimental of Apache, PHP, MySQL.

Recommend for AppServ 
     We recommend for all AppServ user. You do not upgrade to new version every time when released. You should to select some version for your work if you think this version stable for you. New version is not mean good.

AppServ 2.5.10

  • Apache 2.2.8
  • PHP 5.2.6
  • MySQL 5.0.51b
  • phpMyAdmin-2.10.3

Download
Sourceforge.net :
http://prdownloads.sourceforge.net/appserv/appserv-win32-2.5.10.exe?download

Tags:

Apache | mysql | open source | php | web server

ASP.NET MVC and NHibernate Framework Architecture

by Neon Quach 17. July 2009 02:35

Huge thanks to Billy and everyone else associated with S#arp Architecture over the past year. S#arp Architecture has been officially released as 1.0. Billy mentions the following improvements in 1.0 as:

  • ASP.NET MVC 1.0
  • NHibernate 2.1 CR 1
  • Community Website: http://www.sharparchitecture.net
  • S#arp Architecture documentation: http://wiki.sharparchitecture.net
  • Strongly typed action link for areas ( SharpArch.Web.Areas.ActionLinkForAreas<> and BuildUrlFromExpressionForAreas<> )
  • Fluent NHibernate now using configuration classes
  • Support for IIS 7 integrated mode
  • Support for WCF: SharpArch.Wcf and SharpArch.WcfClient.Castle
  • SharpModelBinder
  • Support for multiple databases outside of WCF communications
  • CI Server at http://teamcity.codebetter.com/overview.html
  • Updated to latest T4 Toolbox


Download Sharp Architecture 1.0 here.

Reference

Tags: ,

open source

Powered by BlogEngine.NET 1.6.0.0 - Eco Theme by n3o Web Designers