Drupal imagecache and robots.txt

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.

Turbo celica.lv

toyota celica st185Just created a page for my car: Toyota Celica ST185 (AWD Turbo). (Go google, fetch it nicely)
Since i`m taking a lot of pics while doing repairs and tuning, it could work out good for SEO when people search for images through Google. For now its pretty basic site, but i will spread it into different sections – articles on repairs, tuning, photo galleries by tags, etc. Well, just because.
Site is based on drupal. I love it!

How to: Cubase problem – no sound output

This might be also useful for other digital audio workstations like Cakewalk Sonar, M-Audio Pro Tools or Adobe Audition. Maybe not.
I tried Cubase (portable version) on my work computer and couldn`t get any sound output. It actually didn`t show any device under VST output devices. Since it`s some basic integrated sound card, it hasn`t ASIO drivers natively, probably. Solution is rather simple – install ASIO4ALL – http://www.asio4all.com/. done :)

Windows Movie Maker crashes and hangs

WMM2 does crash terribly on a new pc. If you`re experiencing crashes every 2 minutes using Windows Movie Maker 2, try disabling codecs. Go to Tools > Options > Compatability. Try unchecking a few codecs, especially “Avisplitter”. It worked for me!
If you cannot solve the crashing, try this page: http://www.papajohn.org/MM2-Issues-Acceleration-and-Codecs.html

How to: Disable new user registration in Drupal

How to: Disable new user registration in DrupalAfter 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.

Link exchange fraud with javascript. UPDATED

Today I received an email about my client`s celebrity photo website. It was from unknow sender Matt Priest (i`d like to give him credits to his site, if I find it out). It was a friendly warning message about a link exchange I had done with a fraudulent site – Nachofoto.com.
This site offered me link exchange five days ago, I put my link up and they put mine. After that I checked their site – I couldn`t find my link in the source code of nachofoto.com. But I did see the link on the page. I checked for iframes – nothing. So I said to myself, let it be, and forgot about it. But it turns out, they`re cheating by using javascript. Some exchangers might notice it, some may not.
Here is quote Continue reading “Link exchange fraud with javascript. UPDATED”

PHP, UTF-8 encoding, CSV and Excel

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:

$message= iconv("UTF-8","WINDOWS-1257",html_entity_decode( $message ,ENT_COMPAT,'utf-8'));

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!

Campaing tracking in Flash ClickTAG

Today we encountered a problem. Nothing showed up in Google Analytics tracking campaigns. We used a clickTAG code to swfobject (a.k.a FlashObject) like this:

so.addVariable(“clickTAG”, “http://domain.com/some_page/?utm_source=Banner&utm_medium=Banner&utm_campaign=Banner3”);

But the banner link only went to “http://domain.com/some_page/?utm_source=Banner”. After a bit of research I found out that Flash didn`t accept anything that’s after the ampersand &. Some suggested using & instead of &, but it did not work. I`m not sure if it`s a problem of Flash or SWFobject, but anyway I found a simple solution – use javascript escape() function to translate the URL, like this:

so.addVariable(“clickTAG”, escape(“http://domain.com/some_page/?utm_source=Banner&utm_medium=Banner&utm_campaign=Banner3”));

Voila! Now the banner opens full URL with tracking code! I think this is a problem with other tracking and ad network users also.
I hope this helps someone! :)

Chitika.net ads suck?

I knew about site Chitika.net for a few years. (i think it sounds better chikita not chitika :D) The didn`t accept my site back then (www.celebritysnap.com), but a few months ago they updated their policy and accept new sites. I tested both on celebritysnap.com and my furniture site www.antique.lv, both perform very poorly, about 10% of Google Adsense performance, no matter how many success stories Chitika writes. It just doesn`t pay. I tried more of their advertising features. 99% it shows IPOD ads that lead to www.amazon.com, I`m not sure if anyone is interested in such ads. Screw Ipod`s!
I`m waiting to get my first payment and then I`ll quit using Chitika :/ Maybe I`m doing something wrong, but the CTR is 0.05% and below which isn`t effective at all!

Oh, what`s even worse – I couldn`t find a way to add new domains/sites to my account. I had to create new accoutn for each domain. So you cannot get bulk payments. You have to logout/login all the time. wtf?

OMG, Google Chrome! UPDATED

Google Chrome – A New browser! Who did expect? And its good, really good! This is a revolution on Internet! Today Google stocks had reached 463 dollars, 10 dollar fall since yesterday. I`m almost sure that recent news about Youtube advertisments and this new browser will skyrocket google stocks back to 750 and maybe even more!
Now I need to find a way to buy Google stocks in Latvia..
Google chrome – Is This The Day Mozilla and Iexplore Died??

Update:

I`m just sick of how many new features there are, e.g. check this screenshot for simple stats about google chrome:
google chrome memory usage task manager

UPDATE:
The thrill is over. Chrome didn`t do wonders. It just has flaws. First Macromedia Flash support – it often hangs! Not often, most of the time! And many pages don`t display correctly. I`m surprised Google didn`t rush for updates and fixes :/