
Additions in PHP
APC will enter a nucleus
Job APC with bajtkodom will be switched on in basic delivery PHP as the standard, but, probably, will not be made active to default, but results of its{her} job will stimulate khosterov to include this option.
Hardened PHP a patch
This patch carries out a plenty of additional checks on safety. Developers carefully study this patch and some elements will find the place in PHP: protection against division of HTTP-search, allow_url_fopen will be divided{shared} on two: allow_url_fopen and allow_url_include. The first option to default will be switched on, and the second - is switched - off.
E_STRICT Will enter in E_ALL
Vau, it is a serious piece! Error messages at last will enter in E_ALL by default. It shows diligence of developers to learn « the best practice of programming » by means of messages « EHj, you do{make} incorrectly! ».
Farewell asp-tags
How to force AJAX to read between lines
On pages of your site the set of the specialized terms contains. When the user looks through a site at him{it} there can be questions concerning to these terms. How to make so that the visitor of a site in process of occurrence of questions could receive immediately on them answers? Earlier terms on pages of a site were made out as the link and the user at desire could click on them and receive a window with the contextual help. It is the approach clumsy enough, he takes away from the user too much time - on that to click under the link, to wait loadings a window and then to close a window. During epoch AJAX we can be closer to wishes of users. We can make so that already at prompting the mouse on the term immediately there was a message with the help and as soon as the cursor of the mouse is shifted from the term the message disappeared. Presence of this service will not be reflected in volume of pages of a site. At search of contextual help Java Script will address to the external dictionary, to receive the maintenance{contents} and to display it{him}.
The method of reception of the information on implicit search can find application not only in the dictionary of terms. Whether you paid attention to links with double underlining{emphasis} in such projects as hotscripts.com and devarticles.com? It is contextual advertising on the basis of cursor IntelliTXT of company Vibrant Media. At prompting the cursor of the mouse on the similar link there is a window with the advertising offer on a corresponding subject. This technology has already received the name in-text advertising.
In increasing frequency the similar method is applied and on news portals. Visitors see on the main page of a portal only headings of news. However at prompting the cursor of the mouse on heading of news they receive its{her} brief description. Thus, on the main page of a portal it is possible to contain where as more news. To visit a portal will see headings and to receive announcements of news, to him it will be enough run by the cursor of the mouse on headings.
Let's consider now how the contextual help with help AJAX is realized. To the programmer who has mastered this method, it is possible to force to make comments on a portal news on search or to write the module in-text advertising.
So, obviously we should take care of a message box, that which each time when the visitor directs the cursor at the term will appear. That the window appeared and disappeared instantly it is necessary to place it{him} on latent DIV.
<div id = "InstantMessage" class = "instant_message"> *nbsp; </div>
For simplicity of experiment we can issue it{him} in style of system messages MS Windows.
<style>
.instant_message {padding: 5px; font-size: 12px; font-family: Arial; visibility: hidden; position: absolute; width: 240px; border: outset 2px *FFFFFF; background: *D4D0C8}
.instant_message a {width: 240px; padding: 2px 17px; color: black; text-decoration: none; cursor: default}
.instant_message a:hover {color: *ffffff; background: *0A246A}
</style>
The window should appear during that moment when the visitor has guided the cursor of the mouse on the term and to disappear when the cursor of the mouse will be outside the term. And, during that moment the window should contain any more a blank, and the text of definition of the term. Thus, we should place terms in the text of the document in inline teg, supporting events onMouseOver and onMouseOut. The first event should appoint function JavaScript which will receive definition of the term, will place it{him} in a message box and will show a window. The second event needs to appoint function which will simply hide a message box.
<a onmouseover = " getDefinition ('term', event); " onmouseout = " hideMessage (); "> the term </a>
In parameter of function displaying a window (getDefenition) messages it is necessary to specify the term. This term will be used for search of the text of definition by means of AJAX. As at show of a window we will need to position it{him} under the cursor of the mouse for support Gecko-bazirovanykh of browsers in this function also it is necessary to pass parameter event. Function for concealment of a window (hideMessage) does not demand any parameters.
Now our problem{task} by a call of function getDefinition to force JavaScript to position a message box.
function adjustMessage (evt) {
MessageObj = document.getElementById ('InstantMessage');
if (isThisMozilla) event=evt;
var rightedge = document.body.clientWidth-event.clientX;
var bottomedge = document.body.clientHeight-event.clientY;
if (rightedge <MessageObj.offsetWidth)
MessageObj.style.left = document.body.scrollLeft + event.clientX - MessageObj.offsetWidth;
else
MessageObj.style.left = document.body.scrollLeft + event.clientX;
if (bottomedge <MessageObj.offsetHeight)
MessageObj.style.top = document.body.scrollTop + event.clientY - MessageObj.offsetHeight;
else
MessageObj.style.top = document.body.scrollTop + event.clientY;
MessageObj.innerHTML = ' Loading... ';
MessageObj.style.visibility = "visible";
}
So, we have a message box reporting about loading of the data. Now it is necessary to execute search to the controller behind definition of the term. You can write own functions for service AJAX of searches (http://en.wikipedia.org/wiki/AJAX). But if you only start to work with AJAX, I can recommend to you ready library from Yahoo (http://developer.yahoo.com/yui/). In this case to search will look so:
function getDefinition (term, evt) {
adjustMessage (evt);
var request = YAHOO.util. Connect.asyncRequest ('POST', ' http: // adres_kontrollera ', callback, ' term = ' + term);
}
We require time the controller, obviously, we should write it{him}. Generally it is the most simple part. The problem{task} of the controller - to return the description of the term transferred{handed} in POST. We would not use what programming language at a spelling of the controller to us enough to execute some the elementary operations.
1. To incorporate to a database
2. To execute SQL search for reception of definition of the term
3. To display on the console result in the following kind:
{
"errormsg": " in case of a mistake its{her} code ",
"content": " the text of definition "
}
It is the structure of the data known as JSON. She is perceived JavaScript in an obvious kind, as "native". In case of use of AJAX-library YAHOO the answer of the controller is served by the following design
var handleSuccess = function (o) {
if (o.responseText! == undefined) {
showMessage (o.responseText);
}
};
var handleFailure = function (o) {
if (o.responseText! == undefined) {
showMessage (" Connection Error ");
}
};
var callback =
{
success:handleSuccess,
failure:handleFailure,
argument: ['foo ',' bar ']
};
We needed to describe only function showMessage () which places the accepted text of definition in a message box
function showMessage (json) {
var respondStructure = eval ('(' + json + ')');
MessageObj.innerHTML = respondStructure.content;
return false;
}
As you understand, for concealment of a message box it is required to change attribute of object only
function hideMessage () {
var MessageObj=document.getElementById ('InstantMessage');
MessageObj.style.visibility = "hidden";
}
When you will test this example, hardly probable you will meet problems under browser MS IE, however, in FireFox you can find out blinking of a message box. It is connected to that, that FireFox originally serves events onMouseOver/onMouseOut. However, this problem can be solved by arrangement of flags of a delay in functions of service of these events.
The advertising slogan of a site
But to think up the good advertising slogan uneasy. Give together, on an example of masterpieces already known to general public we shall try to make the small analysis of advertising texts or as them still name, slogans.
So, what can be an effective slogan:
In general, he should be brief, clear, but sometimes meets and as a rhyme:
* The one who drinks milk, will run far, will jump highly.
(From registration of the Soviet dairy shops)
* If you want forces moral and physical to save up,
Drink juices natural - strengthens a breast and shoulders!
(the Unknown author)
More often the motto is a part of image of the company:
* You press the button, we do{make} the everything else.
(Advertising of cameras " Kodak ", the beginning of XX century)
* We trade in dream.
(the Motto of the American publicity agents, since 20th)
* Reliably, favourably, conveniently.
(Advertising of the Soviet savings banks.)
* Good bank - steady bank.
(Advertising of the Moscow city bank, 1995)
And how to do without qualitative characteristics of the goods or services:
* It is good up to last drop.
(the Advertising slogan of coffee " Maxwell House ".)
* A breakfast of champions.
(the Advertising slogan of wheaten flakes "Wheaties" the companies " Dzheneral mills ")
* Better, than money.
(the Advertising slogan of traveller's cheques " First National City Bank ", the USA.)
If the firm aspires to be allocated, it is possible to allocate it, for example, with the next ways:
* The company distinct from others.
(Advertising of company " Sojuzkontrakt ")
* To us hammer, how much can, we - how much shall want.
(the Motto of modular Brazil on football, 60th years.) - one of my liked.
Sometimes in advertising it is possible to notice aspiration to rapproachement:
* We - one family.
(Motto FIDE, it is based in 1924)
* Do{Make} with us, do{make} as we, do{make} better us.
(the Name of transfer of TV of GDR)
Finds a place and use of imitation:
* Who where, and I in savings bank.
(the Advertising slogan of the end of 20th)
Sometimes on a slogan it is possible to say about the project more, than under the maintenance{contents} of several pages. Especially (as often also it happens in a Runet) if the site does not aspire to specialization. At creation of the motto of a resource, try, that on a slogan the reader could make the initial opinion necessary to you on the project. And how to strengthen it{him}, is depends at all on advertising.;)
Counters of ratings - inevitable evil?
So, I shall start with minuses:
* Counters are for a long time loaded, - perhaps, the basic lack. It is difficult to not agree with obvious. Though distinction between time of search and time of loading of the image, undoubtedly, is.
* Counters spoil appearance of page - and this item{point} already depends on design. Sometimes they are entered rather organically.
* There is no uniform approach to calculation of visitors - the difference in parameters can reach{achieve} and 25 %.
Let's address to pluss:
* Counters give statistics of visitings - some counters provide owners of sites developed{unwrapped} statistics (type of a browser, the sanction of the screen, geography, etc.). It is possible to define{determine} ways of moving of readers, their tastes. To reveal mistakes in design and navigation.
* As a rule, counters are created on the basis of rating systems - additional visitings from ratings will not prevent a site. On this item{point} I also want to stop the attention.
On the Internet constantly there is an opinion that not untwisted ratings and catalogues are not favourable, and it is better to use known - Rambler, SpyLog, TopList, Aport. I at once should say is a commercial propagation. If you imagine job of rating systems, - you understand to whom it favourably.
95 % of visitors pass under links from the first page of search engines and subitems of catalogues and ratings. For this reason it is better to be " the big fish in a small pond ", than on the contrary.
In my practice there was a promotion of the large enterprise working in branch of chemical mechanical engineering. Attendance of branch as a whole is low: the enterprises receive, on the average, from 5 up to 20 hosts / day. Having placed the information in little-known catalogues and ratings (and them was about{near} 80), the enterprise began to receive from everyone 2-3 hosts in a month. Ignoring these little-known resources, the enterprise lost 160-240 host / month. And as the price of attraction of the visitor in this branch is equal approximately $1.2, is $192-$ 288 in a month.
So, recommendations:
* If you are going to to place on a site of more counters and "buttons" of search engines, - arrange their bottom of a page. This unique place where they are looked priemlimo.
* If you aspire to do{make} only beautiful sites, - forget that have read better. A site in a network and a colourful page in magazine completely different things.
























