Wordpress footer template hacked badly…
Since 4 days ago, one of my blogs which runs with great traffic started showing sign of slowing down. Never have I seen this kind of down turn before, that it seems more like a server issue or something. From 100% to 50% to 20%.
At first, I thought it was something to do with being penalised by Google due to some issues but then I didn’t put much attention as I believe, great content will always rule at the end since it is not the first time Google changed/ tested their algorithms, etc. But then when I scanned through my templates, boom! I realised that the footer template had been modified with huge bunch of spammy codes/ external links to these credit cards, loans website. WTF? Now this is why my site’s been penalised. I have no idea since when this was put in and whoever did that, screw him!
How to prompt for download image instead of opening
Sometimes when you have link to images and you don’t want them to be opened by IE but prompt for download/ save, your browser will “understand” certain file types, so if you navigate to an image file such as .gif, .jpg, .png, it will display the image because it knows how to do that. Likewise, if you have PDF extensions installed, when you navigate to a PDF file, it will display in the browser instead of download. However, if you click on an unknown file extension, it will just prompt to download.
So how do you prompt to download recognized file types? One way is to just tell your users, “Right-click and choose Save As”. Of course, that is not as fool-proof as you’d like.
The other option is to use a scripting language to stream the file to the browser. Below I’m going to post an example to serve an image (could be gif or jpg). This technique can be used to serve PDF, Excel, Word docs, etc., but you have to figure out the correct Content-Type for each.
[START PHP]
$data = file_get_contents(”img/my_image.jpg”);
header(”Content-Type: image/jpeg”);
header(”Content-Disposition: attachment; filename=my_image.jpg”);
echo $data;
[END PHP]
Use JavaScript to talk between windows pages
Was seeking a way to let different windows talking to each other. Something like a link in a pop up window, when clicked, the original window’s text box will be filled with some text. Example can be seen here.
Yahoo! Taiwan offers credit card payment in auction
Yahoo! Kimo has announced to launch online credit card payment system for its online auction section! This is a great news as previously, if you want to purchase something in the auction, you’d have to pay local or do an Internet banking transfer. But now, for sellers who met over 300 trust points, they could start accepting payment made by credit cards from the buyers. There is no annual fee for the seller, just that 2% transaction fee will be charged. That sounds like overseas buyers could also make payment in the auction now, I guess?
How to display line/row number in a repeater
Been looking for a way to display row number in a repeater control. This can be archieved by putting:
<%#(((RepeaterItem)Container).ItemIndex+1).ToString() %
in the li tag.
Use Visual Studio IDE to develop PHP applications
Ever since I started developing using .NET, I fell in love with Visual studio. It’s just an amazing IDE that ease lots of work for developers. Then I went on thinking of whether it is possible to develop PHP applications using Visual Studio .NET and I found a number of solutions, most were free add-ons done by other developers to enable the IDE to show colored syntax for PHP codes, but the best one seems to be VS.php, which enable you to create a PHP project just as other VS built in languages (eg. C#, VB, etc).
Yahoo Q1 Report, a turning point for itself
I was in Singapore last month for a holiday. Before I left for it, I was about to get some Yahoo! share but I talked to myself that the price might fell down a little bit some more, so then I decided to get em after I got back from the holiday. Then when I got myself in the hotel there and turned on the tv, the news of Microsoft trying to acquire Yahoo! poured me water as inevitably, Yahoo! share rose from $18 to $30! That was a miss out really!
Anyway, for weeks that Yahoo! has been trying to turn down Microsoft offer, how long would this last really? Can Yahoo! continue to refuse Microsoft’s offer? It’s getting more and more interesting now that Yahoo! is about to release its quaterly report and that itself can be a turning point for Yahoo!, in terms of whether or not Microsoft could successfully acquire the giant company or not. Google’s first quarterly report had pleased investors and if this Microsoft-Yahoo! thing still can’t sort out quickly, Microsoft runs a risk of losing more market share to Google.
If Yahoo!’s quarter report look pleasing, Microsoft might even have to rise up their bidding price; if another way, Yahoo! might have to go with the hard way of accepting Microsoft’s offer and next month when we visit yahoo.com, we might see the logo as Yahoo! Microsoft or “a microsoft company” somewhere on its homepage, that’d be pretty sad.
A look at Malaysian bloggers traffic
Lydia was talking about some malaysian bloggers and how famous they are. To be honest, I hardly read anyones blog, I heard that that happens to a lot of bloggers. Anyway, then I decided do analysis to really see how many people are actually reading these blogs. I thought it would be interesting to find out an estimate of the traffic statistic of these sites.
Cannot sign in Windows Live Messenger? Check your Date Time!
Windows live messenger hasn’t been running for days and I thought it had something to do with the live service being down. But then, things don’t look right and I checked the service status, showing fine. So, a little google shown that some of the possibilities of Windows Live Messenger not able to signing in are:
1. Possible of firewall blocking the program
2. Incorrect date time set in computer
And I went to check my computer date time, there it was the year been set to 2003. After changing it, boom! I am able to sign in now. Just a little tips.
CSS: Container class not appearing as full height in wrapper
I was having a problem getting a container to have 100% height appearing in Firefox. Then I noticed it could be having something to do with the outer wrapper class which is wrapping the whole thing. This is the classic float enclosing bug that IE exhibits. Parents shouldn’t enclose their floated children according to the specs; the canonical example is a floated picture extending out of the bottom of its parent p.
