<div id="twitter_div">
<ul id="twitter_update_list">
<a href="http://twitter.com/YOURURLHERE" id="twitter-link" style="display:block;text-align:right;">follow me on Twitter</a>
</div>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/YOURURLHERE.json?callback=twitterCallback2&count=5"></script>
Change the YOURURLHERE to your actual twitter url and voila.
Twitter Code for Text Widget in Wordpress Sidebar
September 8th, 2009WP Ecommerce Plugin Caching Issue in IE Internet Explorer
June 30th, 2009In working with the WP Ecommerce Plugin, on Wordpress, we’ve noticed that updates to products are not reflected within the front-end when testing with Internet Explorer. We found this to be strictly an Internet Explorer “feature” in our testing. The problem here is – if most are using IE – will we be guaranteed that they’ll get the latest Shopping Cart? The answer is, unless you’ve changed your caching settings, no.
Problem: Internet Explorer Over-Caches pages
Even when the page content is obviously changed, the timestamp forcefully updated, even touching the file won’t budget IE. There are 3 possible solutions:
Solution 1: Best Solution – Force “No Caching” in PHP
At the very top of your php page, before calling anything, add this mug:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
Solution 2: Force No Caching in Meta Tags
Add this meta tag inside of your <head> tag:
<meta http-equiv="PRAGMA" content="NO-CACHE">
Solution 3: Quickest Way – Change your URL
When linking to your page, simply add any parameter to your url. So, if you’re visiting “gobdg.com/about.php” now visit: “gobdg.com/about.php?somestuff=1″
** Note – This will only work one time for each parameter value – you’ll need to change the paramater of true to “somestuff=2″ on next reload.
Solution 4: Become a Fireman
Always a viable option.
IE Caching, Cache References
Links Unclickable, Broken in Wordpress Ecommerce Cart Widget (IE)
June 26th, 2009We have run into an odd issue of our own when implementing the Wordpress Ecommerce Plugin. We noticed that as the WP Ecommerce plugin uses ajax to build the shopping cart items (which is great, allowing visitors to stay on the page and keep shopping), but the problem was that as soon as an item was added, we found that the shopping cart widget became broken, or rather unclickable in Internet Explorer IE 6.
The Problem
Another IE Bug. I for one didn’t see this one coming, blindsided. Wow. In any case, the problem was that:
Our use of the Transparent PNG fix in IE6 triggered another bug: The cart’s contents were inserted using the innerHtml property. After the innerHTML was inserted, the hasLayout function wasn’t called – rendering our links unclickable.
The Solution
In order to call the hasLayout function, you need to set the object’s position, or zoom, etc. The cart function can be found in: /wp-e-commerce/wp-shopping-cart.php. Line 1018 reads:
document.getElementById('shoppingcartcontents').innerHTML = \"".str_replace(Array("\n","\r") , "",addslashes(nzshpcrt_shopping_basket_internals($cart,$quantity_limit))). "\";
Add the following line immediately below it:
document.getElementById('shoppingcartcontents').style.position = 'relative';
How to Add an Additional Outoing Mail, SMTP Port
June 19th, 2009Pertains to: Mediatemple (dv) Dedicated Virtual Accounts before v3.5, using Plesk
After spending over 20 hours simply trying to simply setup a customer’s email client, we decided that this deserves some documentation we couldn’t find elsewhere.
Using MediaTemple, I can’t seem to send email, my smtp server is failing?
The problem: Apparently several ISP’s on the west coast (particularly in California – including AT&T, Comcast) block all traffic on port 25. AT&T’s support article detailing why they block port 25 (You’ll need to click the support link at the bottom to access the area, then paste the link again)
So save your time! In our case it had nothing to do with our client’s email program (e.g. Apple Mail, Thunderbird, Outlook, etc), nothing to do with their network, or even our host mediatemple! AT&T was blocking all traffic on port 25; which is the industry standard for outgoing mail, or connecting to an SMTP server.
Why are they blocking port 25 Yarrghh?
AT&T and many ISP’s have begun to block that port in order to “combat junk email and spam from mis-configured and virus-infected computers.” Which to us seems to not really solve the problem, but run away from it for a period of time, until spammers begin using a different port anyway. But perhaps it will have a similar affect as alternating phaser modulation used on the borg. In any case, here’s how you can fix it:
How to Configure an Additional SMTP Port on Plesk, Mediatemple
Many times your host will already provide the additional port (e.g. 2525, or 587, or 26) be sure to ask them first. If you’re the host, continue on.
1) Log into your plesk account as root. To do so, you’ll need to make sure root is enabled, and you’ll need the password. (More on root access)
2) Goto Virtuozzo -> File Manager
3) Find the file: /etc/xinetd.d/smtp_psa
4) Copy the file and rename as smtp_nonstandard.
5) Edit the file. You’re final file will look like:
service smtp2
{
port = 587
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
From our original file, we’ve changed 3 things. “service smtp2″ is the name for the new process. And you’ll add 2 parameters: port & type to tell the service to listen on our new port. Choose any port number you’d like, however we recommend 587, or perhaps 2525 – you’ll need to make sure you’re not trumping a port that’s already in use.
6) Last, you’ll need to SSH into your server as root user. When in, execute this command to restart your services:
/etc/init.d/xinetd restart
Outoing Mail SMTP References
- AT&T Port 25 Blocking Article (You’ll need to access their support section first, then revisit the link)
- Mediatemple: How to Add an Additional Outoing Mail SMTP Port
Gap between images within link tags ie only (surprise)
June 1st, 2009Problem:
You are building your navigation, or template design and for some crazy reason the images (with a font-size:0px) still continue to have a 1px gap between each other in ie (Internet Explorer 6 – 7 particularly).
BIG SURPRISE – another ie bug. Wow. what a shocker.
Solution/Workaround 1 – Remove line breaks
In many cases, the problem actually lies in IE’s rendering of your html code. If you have line breaks in between your images, that will for some reason translate to a 1px gap. So one possible solution is to remove the line breaks giving your something like:
<a href="home"><img alt="" /></a><a href="contact"><img alt="" /></a>
...
Solution 2 – Float that junk
We’ve also found that floating the images will close the gap between images in ie. So in your style sheet:
<style>
a img {float:left}
</style>
Solution 3: (Gaps below your imgs) – Font-size:0px
A separate issue that you may be having is that images will automatically come preset with a small gap on the bottom (which I believe is reserved for image captions, or alignment within text, etc). To close this gap:
<style>
a img {font-size:0px}
</style>
Solution 4: Become a White Water Rafting Guide
http://www.salary.com/careers/layouthtmls/crel_display_Cat10_Ser196_Par294.html
