Recently finished another website in Flash. It is for a nice hotel in Latvia with SPA & restaurant.
I have switched back to Actionscript 2.0 in Flash, because AS 3.0 is a bit too much headache and tough learning curve.
Website is based on SWFAddress deep-linking structure and uses other free Actionscript libraries. Database is MySQL driven, connected in simple XML loadData manner. All text data can be edited with WYSIWYG type editor.
If you`re using some kind of CMS, usually its normal that each URL works with or without trailing slash, e.g. these URLs would be the same:
Still Google, Yahoo, MSN and other search engines treat them as different urls and gives penalty as they are dupliate URLs with identical content.
You have two options – to add or to remove the trailing slash. After a bit of reading I chose to remove the slash from my celica site, because I`m using Drupal CMS that removes trailing slashes for new content and I don`t really want to hack the CMS plugins. To alter the URLs, you need to edit .htaccess file at the root directory of your website ( http://example.org/.htaccess )
Add this code to your .htaccess file to remove trailing slashes:
I encountered problems for last 6 months to upload music on my dj site – www.djnet.lv . I have flash CMS admin on djnet.lv but the songs are uploaded to other site of mine, where HDD space is not a problem. about half year ago I couldnt upload songs from some computers, now its from all computers. It just stops. I had suspicion it had something to do with new Flash Player versions 9 and 10. So today I fixed it just by uploading simple file to my file hosting server: crossdomain.xml.
Flash player always looks for domain.com/crossdomain.xml file when it accesses its contents or uploads something. The is what my security policy file contains:
Today i discovered a very stupid configuration in Imagecache module for Drupal. Imagecache saves all presets (thumbs, big images, etc) in subdirectory /sites/default/files/imagecache/[presetname]/. Of course this is conflicting with robots.txt, which says “Disallow: /sites/”. I created a few sites that really are targeted for Google`s image search, but I couldn`t find a single pic in google. This is so annoying to find out. I just removed the deriative in robots.txt and will update this post with results soon.
After a quick search I didn`t find how to simply switch off new user registration in Drupal. But it has even better feature – access roles. You can specify what usernames/emails/hostnames can access the members area or even register as user.
To disable new user registration, you have to add access rules for existing users. Go to yoursite.com/admin/user/rules/ and add a new rule. For example, first add an allow rule for user “admin“. Then for other existing users. After you have finished, add a deny rule and write “%” in the username field. This will allow to login only the allowed usernames and deny everything else. If the username is not defined it cannot be also registered.
You can even make private site and say to your friends add e.g. “-foo” to their usernames. So you make an allow rule with “%-foo” in username field.
The reason I need to block new user registration is spam. New users register everyday with random spam usernames.
Horrible combination, spent all day on this!
My goal was to take some data (which contain UTF-8 unicode characters), generate a CSV file using PHP and send it via mail. The problem is that Microsoft Excel doesn`t accept UTF-8 CSV files.
Some people suggest using mb_convert_encoding($contents, "ISO-8859-1", "UTF-8"); or mb_convert_encoding($contents, "UTF-16LE", "UTF-8");, neither worked for me, though I have multibyte extension installed
It seems that the solution is different by server setups. This solution worked for me:
You might want to change “WINDOWS-1257” to something else, like WINDOWS-1255 or WINDOWS-1252 or ISO-8859-1, etc.. My server did not have the “iconv” function enabled, so I asked server administrator to enable it and it worked!
Scite is one of the best text editors out there – functional, fast and lightweight! If you write a lot of text that is not in english (read: UTF-8) it becomes pretty annoying as every time you open Scite.exe it defaults to 8-bit character set. To write or see the opened document with UTF8 characters you have to click File > Encoding > UTF-8. While there is no graphical interface for options, you can still change the default encoding manually. Here is how:
Open Scite, click Options > Open global options file
search for “#code.page=65001” (mine is at line 218) and uncomment it (remove # symbol)
comment out “code.page=0” (add # symbol)
save the global ooptions file and restart Scite.exe
Now every time you open scite or a document in it, the default encoding will be “Code page property” or UTF-8 in most cases. If it doesn`t work, there area few other lines that you can uncomment right under the mentioned ones.
Hope this helps!
Animated favicon is supported only by Firefox, for now. (Are you still using Internet Explorer??
) If you don`t know how to create a simple favicon – just put an icon file with name “favicon.ico” in your web root folder (e.g. www.yourdomain.com/favicon.ico).
Animated favicons are stored in .gif image. You can see an example of animated icon at information security awareness blog , it shows in the address bar and on the tab. You can create it yourself using some gif animation software or exporting from Adobe Flash (I do it). When you have your gif icon ready, upload both “favicon.ico” and “favicon.gif” to your web root folder, then add this code to your webpage somewhere between and tags:
That should do it! You can also create both static and animated icon files from any image (favicon from jpg, jpeg, gif, bmp, tif, png, etc) using a favicon generator available here.