Eric @ EricBess WebHome

Thinking blindly without action, it will be unknowingly become meaningless

Chinese (Simplified) flagItalian flagKorean flagPortuguese flagEnglish flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagCroat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flagSlovak flagSlovenian flagUkrainian flagVietnamese flag
By N2H

WP a system N-blog

WP does not support multiple sites, so when you want to create multiple wp blog when you have to install multiple wp systems, and more trouble to maintain. Online to see a very good idea, it should be feasible in a system to create multiple wp blog, but there should be a lot of details to consider, but also why there is a likelihood MU. No matter how still a very idea of cattle. Sum up, when to test.
The principle is very simple, wp the use of database management data, so if you want in a WP system, for different visitors request, to access different databases (or inside a database with different data), then it is easy to achieve This feature in the wp-config.php there are added to this paragraph:

 1 
  2, 
  3, 
  Four 
  Five 
  Six 
  Seven 
  Eight 
  9, 
  Of 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
  $_SERVER [ "HTTP_HOST" ] == "eric.ericbess.com" ) { if ($ _SERVER [ "HTTP_HOST"] == "eric.ericbess.com") ( 
    'DB_NAME' , 'ericbess' ) ; define ( 'DB_NAME', 'ericbess'); 
    'DB_USER' , 'eric' ) ; define ( 'DB_USER', 'eric'); 
    'DB_PASSWORD' , '***' ) ; define ( 'DB_PASSWORD','***'); 
    'DB_HOST' , 'localhost' ) ; define ( 'DB_HOST', 'localhost'); 
    'DB_CHARSET' , 'utf8' ) ; define ( 'DB_CHARSET', 'utf8'); 
    'DB_COLLATE' , '' ) ; define ( 'DB_COLLATE',''); 
    'eric_' ; $ table_prefix = 'eric_'; 
    'WPLANG' , 'zh_CN' ) ; define ( 'WPLANG', 'zh_CN'); 
  ( $_SERVER [ "HTTP_HOST" ] == "bess.ericbess.com" ) { ) Else if ($ _SERVER [ "HTTP_HOST"] == "bess.ericbess.com") ( 
    'DB_NAME' , 'ericbess' ) ; define ( 'DB_NAME', 'ericbess'); 
    'DB_USER' , 'bess' ) ; define ( 'DB_USER', 'bess'); 
    'DB_PASSWORD' , '***' ) ; define ( 'DB_PASSWORD','***'); 
    'DB_HOST' , 'localhost' ) ; define ( 'DB_HOST', 'localhost'); 
    'DB_CHARSET' , 'utf8' ) ; define ( 'DB_CHARSET', 'utf8'); 
    'DB_COLLATE' , '' ) ; define ( 'DB_COLLATE',''); 
    'bess_' ; $ table_prefix = 'bess_'; 
    'WPLANG' , 'zh_CN' ) ; define ( 'WPLANG', 'zh_CN'); 
  ) 

Obviously, this configuration file will be based on different $ _SERVER [ "HTTP_HOST"] to give a different configuration database table, a data table prefix is bess_ while the other one is eric_, even in the same database which would not conflict With their own independent database configuration, in the same good Wordpress optimization system to non-interfering with the operation, along with the theme of different styles, and plug-ins, their selective use.

Notes

  1. All plug-in data table design attention plus the prefix: $ table_name = $ wpdb-> prefix. "Plugin_table_name"; (In fact, most of the development of both plug-ins to do so, and now reflect the benefits to the)
  2. Sub-domain binding wp (can not do the path of Jump): name-based virtual host / rewrite (I do not know whether it is feasible)
  3. To the control of the database built Account number: (high security, optional)
    mysql> grant select, insert, update, delete on ericbess.eric_ to eric @ "%" Identified by "eric_password";
    mysql> grant select, insert, update, delete on ericbess.bess_ to bess @ "%" Identified by "bess_password";

Envisaged above without a test, need to test the feasibility demonstration!

December 20th, 2008 Posted by eric | WordPress, Web technology | no comments

web width 960px secret

by Yu Bo

Research on the page grid system, look at a group of data: Home page width px

Yahoo! 950; Taobao 950; MySpace 960; Sina 950; Netease 960; Live Search 958; Sohu 950; yoqoo 960; AOL 960

Enumerated above are Alexa global top 100 sites, and their width of Home 950px/960px. In addition to Microsoft's Live Search, these sites have a common characteristic: the page structure more complicated, can be considered a portal-type site.

Come take a look at Google, YouTube, Facebook, Flickr!, EBay and other famous sites, and their Home width no fixed rules of common characteristics: functional specificity, page structure was relatively simple.

According to the above simple analysis, we can think: When the structure of complex structures page portal-based Web site, the development of engineers will invariably choose the width of the page for 950px/960px.

This is a very interesting thing, why should we choose the width of it? The width of the value of what magic?

Apple designers情有独衷. In 1024 x 768 resolution to open Firefox:

Natural state, Firefox form about the size of 974 x 650. Subtracted 7px on both sides of the border, the actual size of the page for the red part of the figure above, high-width 960 x 650.

960 In this way interesting emerged. Yes, you can believe that all that simple. Grid system first appeared in the field of graphic design, designers love with Apple, Apple under the browser's default width of 960px, then 960 on such a "natural" to have emerged.

Click to continue reading

November 29th, 2008 Posted by eric | Design, Web technology | no comments

Practical web design tools and resources

Css structure of the site as a whole generation tool

CSS Layout Generator can set the parameters in your circumstances, to generate a floating width fluid or fixed width layout, you can have a three-column-style, you can have a head [Header] or foot [Footer], the width of the column can be a variety of scales to measure, such as the pixels [px], such as wide-width fonts [em], the percentage of [%] and so on. In addition, you, you can also choose to generate the document attributes Doctype is HTML or XHTML.

CSS Zen Garden

CSS Zen Garden This is an open CSS communities, aimed at sharing the use of CSS designers to make the effects of admiration. Use the same HTML document, submitted by an external stylesheet designer to beautify the document. Using Web Developer Tool will be able to check how the CSS layout work.

Color collection tool

ColorSchemer ColorPix, a compact Color Picker, you can with the rapid movement of the mouse capture screen colors, and will convert it to a different format color logo, the advantage of having to install, just download the direct operation, use, can set different zoom level, side to win, such as accurate color information, the right time, click on the current color code can be copied to the clipboard, in addition to the procedures can be set to "Top", is located in All Programs the top of the window.

CSS property viewer

CSSViewer a Firefox plugin, a compact CSS property viewer, along with the movement of the mouse show directed by elements of the current CSS style information, including all the elements from the parent inherited, as well as user-defined custom browser style information. You can also add the toolbar icon to expand button to activate / disable the extension.

to be continued

November 26th, 2008 Posted by eric | 网站技术 | no comments

Add to your blog features multi-currency donations (including RMB)

To make their own blog for sustainable development, it is necessary to make it able to feed themselves.

Some time ago, so a donor wordpress plugin WP-DONATORS, can support PAYPAL donation and multi-currency automatic exchange rates. And other donors of different buttons, it also has a background with PAYPAL API real-time communication, the return of payments data, and then the donor specified advertisements and connectivity on the "donor cloud" in the display.

Followed by support for more background and currency. First, the renminbi, paypal.com does not support the yuan, of course, thinking of the "Home", but with the "Home" to communicate their staff not to provide personal donation feature.

Accidentally discovered "PayPal" (that is paypal China) recently in October, the updated cost of the RMB policy, free of charge. Attention should be paid to "PayPal" is specifically for the Chinese yuan paypal business, can not be generic paypal.com account (foreign currency), so you have to specifically for the "PayPal" registered account. Registered "PayPal"

PayPal Sign up now and start accepting credit card payments.

Just that they are using a paypal API with a very easy way to add functionality yuan. When used, as long as in the background add "PayPal" account on the opening of RMB. When people used to donate RMB payment, the amount went to "PayPal" account, go to paypal account other currencies. Can use your credit card to open a foreign currency account paypal.com to support multi-currency
Sign up for PayPal and start accepting credit card payments instantly.

Click to continue reading

November 12th, 2008 Posted by eric | WordPress, Web technology | one comment

JavaScript call SOAP

JavaScrip always wanted to call directly Xurrency.com the SOAP, the realization of the exchange rate of AJAX, to find a JavaScript SOAP Client tested. This machine IE, Chrome successful return, firefox and in the host on the error, "access to restricted URI DENIED" I do not know its所以然.

Decided to give up. Switch to php soapclient + jquery ajax achieve.

JavaScript SOAP Client test code is as follows:

 1 
  2, 
  3, 
  Four 
  Five 
  Six 
  Seven 
  Eight 
  9, 
  Of 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
  20th 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
  , 29 
  "-//W3C//DTD XHTML 1.0 Strict//EN" <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN"  
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  "http://www.w3.org/1999/xhtml"  lang = "en"  xml : lang = "en" > <Html xmlns = "http://www.w3.org/1999/xhtml" lang = "en" xml: lang = "en"> 
  <Head> 
  XHTML - document </ title > <Title> XHTML - document </ title> 
  "text/javascript"  src = "soapclient.js" ></ script > <Script type = "text / javascript" src = "soapclient.js"> </ script> 
  "text/javascript" > <Script type = "text / javascript"> 

	  function currency () ( 
		  "http://xurrency.com/servidor_soap.php" ; var url = "http://xurrency.com/servidor_soap.php"; 
		  new  SOAPClientParameters ( ) ; var pl = new SOAPClientParameters (); 
		  "amount" , 5 ) ; pl. add ( "amount", 5); 
		  "base" , "usd" ) ; pl. add ( "base", "usd"); 
		  "target" , "eur" ) ; pl. add ( "target", "eur"); 
		  url , "getValue" ,  pl , true ,  Currency_callBack ) ; SOAPClient. Invoke (url, "getValue", pl, true, Currency_callBack); 
	  ) 

	  r ) { function Currency_callBack (r) ( 
		   r ) ; alert (r); 
		  ) 

  </ Script> 
  </ Head> 
  <Body> 
	  "" > <Form action = ""> 
  button value = "Invoke"  onclick = "currency();" /> <Input type = button value = "Invoke" onclick = "currency ();" /> 
  </ Form> 
  </ Body> 
  </ Html> 

November 10th, 2008 Posted by eric | Coding, Web technology | no comments

PayPal multi-currency support and the use of IPN

Paypal to receive the following support currency

Code Currency
AUD Australian Dollar
CAD Canadian Dollar
CHF Swiss Franc
CZK Czech Koruna
DKK Danish Krone
EUR Euro
GBP Pound Sterling
HKD Hong Kong Dollar
HUF Hungarian Forint
JPY Japanese Yen
NOK Norwegian Krone
NZD New Zealand Dollar
PLN Polish Zloty
SEK Swedish Krona
SGD Singapore Dollar
USD US Dollar

The use of multi-currency IPN

payment_gross and payment_fee: For non-payment in U.S. dollars, these values are vacant, so IPN script will not deal with these amounts as a dollar.

Multi-currency variables: For non-US dollar payment, IPN will add the following multi-currency variables, mc_gross and mc_fee
mc_gross: transaction fees deducted before the payment is received to pay the full amount of the currency.
mc_fee: with the payment related to currency transaction costs paid. Similar variables payment_fee variable function (amount to be paid in such circumstances, the variable does not display).
For rental IPN, such as registration, revocation, modification, and the failure of EOT, mc_currency is rentcharge currency, rather than the currency of payment.

Click to continue reading

November 7th, 2008 Posted by eric | Web technology, financial and investment | no comments

WordPress plug-ins \ themes localization

Once you plug-programming work has ended, another area worth considering is how to plug your internationalization (of course, this is built on your work you want to release to the public on the premise). "Internationalize" is a building of your software so that the process can be localized; and "localize" the software is to show you the text translated into various languages process. WordPress has been from all over the world to use each of the local fans, so it will internationalization and localization features into its structure, including localization features plug-ins. Would like to learn more about the GNU gettext localization of background knowledge, please refer to translation of WordPress.

Strongly recommend that you plug your internationalization, so that the user name from all corners of the country can localize it. And this whole process is very straightforward:

  • Give you a translation of the plug-election to "text domain" name. This is generally the same file name of your plug-ins the same, of course, does not include. Php suffix names, and must be unique, at least not with the user has to ensure that the installation of other plug-ins of the same name.
  • Regardless of any time you want to use plug-ins to display text to the web page readers (that is, "Information text"), are embedded in them as much as possible the following two procedures WordPress gettext function of any paragraph. Remember, unlike the core WordPress code, in your plug-in function in the internationalization of you should use the second parameter to pass the text of your choice domain. While in the core WordPress code, this parameter is empty by default.

__ () Used to message as a parameter to another function. _e () used to write directly to the message page.

__ ($ message, $ domain): the localization of the language used for $ domain translation $ message. The output string can continue by other function call.
_e ($ message, $ domain): the localization of the language used for $ domain translation $ message, then display to the user's screen. If your text will be directly displayed to the reader, you can use this function.
  • For your plug-ins to create a POT file (this one included all the text of Article translation entry documents), with the release of your plug-ins. Plug-in users will need to generate a good translation localization MO file, and then you put it in the same plug-ins folder. Mo file and this is also about the name, it should be as domain-ll_CC.mo, here is the local national and ll_CC language code (for example, zh_CN). With reference to translation of WordPress more on POT files, MO files and localized information.
  • In your plug-ins to add a subroutine to call load_plugin_textdomain plug your translation. This subroutine must be in front of your gettext function, but it was later the better (because some multi-language plug-in calls will change some of the geographical settings). One possible way is to plug in all your routines in front of an initial increase in Subroutine. For example, suppose you the text of the domain name "fabfunc", are:

Click to continue reading

October 27th, 2008 Posted by eric | WordPress, Wordpress Programming, Web technology | no comments

WP-Donators Plugin (WP sponsor plug)

Plugin Name: WP-Donators (WP sponsor plug)
Author: Eric Wang
Stable Version: 1.0.9
Author URL: http://www.ericbess.com/ericblog/
Plugin URL: http://wordpress.org/extend/plugins/wp-donators/
Download: http://downloads.wordpress.org/plugin/wp-donators.zip

== Description ==

Wp-Donators provides a smart donation function to auto-leave the sponsor information in a container after payment. Sponsors can donate and submit name / URL or TextLink ad. The information of the latest donors are displayed in the Sponsors Cloud box. The more a person donations, the bigger their link will be.It 's will support most popular payment interface in future. ParPal Just the first one.

wordpress plugin donor WP-DONATORS, can support multi-currency PAYPAL donation and automatic exchange rates. And other donors of different buttons, it also has a background with PAYPAL API real-time communication, the return of payments data, and then the donor specified advertisements and connectivity on the "donor cloud" in the display.

== Depends On ==

  • If your haven't the paypal account so far.Please register paypal account: [PayPal Registration] first. Sign up for PayPal and start accepting credit card payments instantly.
  • PHP5, Openssl, fsock.

Click to continue reading

October 21st, 2008 Posted by eric | WordPress | 39 comments

2 3 4 5 6 7 » Page 1 of 7 1 2 3 4 5 6 7 »