feed RSS Feed RSS


Tag Cloud:
web standards browser Mac internet explorer IE xmas software CSS cascading stylesheet apple xubuntu windows web hosting statistics Santa safari rss reindeers referer php open source linux google funny ftp flash e cards feedburner feed elf ecards e cards cross platform code client christmas articles animated cards


How to quickly delete .DS_store files

DS_Store Cleaner: application to delete automatically DS_Store files.DS_store are hidden files Mac OS X creates into every folder in order to save non-vital appearance information such as windows position, background and file comments.
These files are generated automatically and are almost invisible to Mac OS X users, anyway, it would be a good idea to delete them if you are going to burn a CD or create a compressed file to share with someone who may adopt another OS, as .DS_store files can result superfluous and annoying.
DS_Store Cleaner is a small piece of software for Mac OS X (Mac OS X 10.3 or later is required) which can help you removing swiftly all .DS_Store files present in a folder and in its sub-folders and can be very useful if you share your compressed archives, CDs or memory sticks: just drag the folder you wish to clean into the application icon and automatically clean it. An alert box will notify about the number of .DS_Store files deleted.
DS_Store Cleaner is freeware and available also for Windows.

Posted on: July 15, 2007 - Tags: Mac


Apple Safari 3 for Windows

Apple Safari 3 for WindowsToday during the WWDC07 Apple announced that Safari 3 will be released also for Windows platform.

A beta version is already available here:
http://www.apple.com/safari/

According to Apple, Safari is 2 times faster than Internet Explorer 7 and up to 1.6 times faster than Mozilla Firefox.

I downloaded the beta version of Safari and installed it on Windows XP: the installation went smoothly but the browser gave a non critical error on starting. It’s really fast but I experienced some characters and pages rendering issues.
It’s still a beta version of course, but in my opinion the premises are good: waiting for a stable Windows release.

Posted on: June 11, 2007 - Tags: General, Mac


How to display referer-based contents in your web pages using PHP

Hints and tips box with PHP and CSSIn this article I’ll explain how to use PHP in order to offer your visitors targeted content based upon their referring page.

PHP and CSS allow you to create a customized box which appears in a defined place of your webpages and gives help to visitors who satisfy predetermined conditions: the PHP variable $_SERVER consists in an array containing several information. The variable $_SERVER[’HTTP_REFERER’] contains the referer URL (i.e. the website or webpage where the visitor comes from).

You can use this variable to offer a referer-based content to your visitors: for example when some visitors come from a particular URL, you can show them a box containing tips that help finding quickly what they are looking for.

Let’s go deeper into the matter and see a practical use of this technique…

First, create a css class:

.helper {
position:absolute;
top: 0px;
left: 0px;
background-color: #CC3300;
color:#FFFFFF;
}

I called the CSS class “.helper” and defined an element with absolute position (top-left), a red background and white text.

Now, you can use the following PHP code to display the “.helper” element defined in CSS on determined conditions. Using the PHP command eregi on the variable $_SERVER[’HTTP_REFERER’], the server can look for the presence of certain terms in the referer URL:

<?php
if (eregi("font“,$_SERVER[’HTTP_REFERER’])) {
echo “<div class=\"helper\">Looking for YellowJug font?<br />
<a href=\”projects/yellowjug_true_type_font/\”>Click here…</a>
</div>”;
}
?>

The human “translation” of the code above is:
if the visitor’s origin is a URL which contains the term “font”, then display red a box on the top left of the webpage (the box position and colors are obviously defined in the CSS class .helper) which suggests the visitor to visit a certain link or page.

If the term-matching condition is not satisfied, the box simply won’t appear and won’t annoy your visitors.

To see this soluction in action just visit yellowjug.com homepage and check the top left corner: no help box should appear; then go to YellowJug font page on dafont.com and click on the link “Site” next to the author’s name (it’s me :-) ). You’ll be redirected again to yellowjug.com home page but now you’ll be able to see the red box!

Please consider that this technical solution can be adopted on different approaches in more elaborate contexts. These “boxes” could offer hints, tips or suggestions and can be displayed ad hoc, for example, when a visitor comes from a certain page or comes from a page which contains a certain term (including search engines pages).

Posted on: June 10, 2007 - Tags: PHP


« Previous PageNext Page »
Privacy Policy and Disclaimer - Contacts

Creative Commons By-Nc-NdExcept where otherwise noted, this site and its content are licensed under a Creative Commons Attribution - NonCommercial - NoDerivs License