my name is michael ciccarelli and i'm a web designer & developer out of buffalo, ny. currently available for freelance and other opportunities.

Archive for the ‘article’ Category

Trick your iPod during software update

| 1 comment

article

This afternoon I decided to restore my iPod Mini back to default factory settings. During the process iTunes suggested that I “Upgrade my iPod to the latest software” so I went ahead and answered yes to the upgrade. After a couple seconds all I seen was a little “plug iPod into the wall charger” icon thing.

After doing some research, apparently to complete a software upgrade on most iPods you have to plug your iPod into the wall charger. This is so the iPod doesn’t die mid-firmware flash, in result turning your iPod into nothing but an expensive paperweight. Probably a good call on Apple’s part, but what if you don’t have a wall charger handy? In most cases you would be out of luck.

Besides the obvious (borrowing a wall adapter) there is a surprisingly simple solution. If you’ve ever looked closely at a FireWire or USB cable you’ll notice that two of the pins stick out a little farther than the rest. Those are the pins that carry the electricity to charge the iPods while the other prongs are used for data transfer (right?).

The Fix:
Trick is if you plug in the USB or FirmWire (while the other end is connected to the iPod) into the computer just a little bit so only the two charging pins touch the accompanying pins on the computer, you should be able to fool the iPod into thinking it’s a wall charger. The firmware will update, and you’ll have a working iPod again.

Fix mouse cursor from going off screen

| 4 comments

article

There were a few laptops in the office that shared a similar problem, the mouse cursor would go beyond the right of the screen. So instead of the cursor/pointer stopping at all 4 edges of the screen, when you moved it towards the right side of the screen it would continue on past the edge of the screen, in result losing the location of your cursor.

I figured out that the culprit was the display adapter that is installed along with the software required to use our Epson projector. It was a simple fix all I had to do was the following:

    1. From the desktop right click and open the properties window, then the settings tab.
    2. There will be a number of “displays” shown as numbered boxes. Your main display (1) and one or two others (2 & 3).
    3. click on the secondary displays and uncheck the “Extend my Windows desktop onto this monitor” setting towards the bottom. That should fix the problem.

How to Access Windows Network Resources on OS X

| no comments

article

One of the only things I missed about working on Windows XP was the convenience of accessing other machine’s folders and files, that were on the network, from my desktop via Windows Explorer. I knew this was more than likely possible on OS X, I just didn’t know how to do so. Until recently I got fed up with the idea of emailing every change I make to a website file to my XP machine in order to update the web server. So I decided to do some research so that I could simply access the web server, along with other network resources from my Macbook.

I’ve always used this path: \\webserver\e$ in Windows Explorer to access the web server’s E:\, Or say if I wanted to access a user’s desktop I could do: \\ACCOUNTING1XP\C$\Documents and Settings\jondoe\Desktop to view the contents of Jon Doe’s desktop from my own desktop.

The process is just as Simple in OS X. The following steps are how I gained access to the webserver from my Macbook. Remember to change “webserver” to the name of your network resource, as well as the drive letter, in my case I’m using E:\

  • In the Finder, select the GO menu
  • then the Connect to Server command
  • Enter into the box: smb://webserver/e$
  • Enter your username and password for the Windows Network
  • To remember the login details, check the box to “Remember this password in my keychain”
  • You should now get a Finder Window with all the folders on files on that machine

    • If that didn’t work, you can try removing the trailing drive letter (/e$) or you might also want to try:

      • smb://192.168.1.1.. Where this is the IP address of the machine you are trying to access.

      I am super happy that I didn’t lose this convenience. I had a bad feeling that Mac OS X and Windows networks wouldn’t get along so smoothly, I was obviously wrong, so far so good.

e-Commerce Solutions for WordPress

| 18 comments

article

WordPress is one of the most popular Content Management Systems (CMS) on the web. It’s a great application supported by a great community. I use WordPress for many of my own websites, I also recommend it to others looking to start a website that need to manage their content with little programming knowledge. I always thought the lack of e-Commerce plugins for WordPress was odd, but never really needed to implement any shopping carts on a WordPress site. If someone required more of an actual shop than a standard website, I would steer them towards an actual e-Commerce application (ZenCart, Magento, OS Commerce etc.).

I decided to try out WP e-Commerce, one of the only free shopping cart plugins for WordPress. My client’s website was already up and running the latest version of WordPress. So instead of selling her the idea of switching applications or using a simple shopping cart solution like e-junkie, I decided to familiarize myself with some e-Commerce solutions for WordPress.

Unfortunately WP e-Commerce is not very stable out-of-box, even though I purchased the Gold Cart which was suppose to be more feature rich then the standard free version. It required some work to get it working properly with Paypal, which is the default payment gateway. Authorize.net was the preferred payment gateway of my client, mainly because she already had an established merchant account with them. Although it didn’t work right away, once I got it working properly I think it is the best gateway to use with WP e-Commerce.

A big turn off from using Paypal as the gateway is the fact you get redirected off the website you are on to make the payment. This isn’t all that bad, especially if you do not wish to purchase an SSL certificate for your website and will be handling your customers financial information, being redirected to a secure paypal site will cover that for you. The biggest issue I noticed with Paypal is users making payments are now required to have a paypal account, which leads to a dead-end for those customers without an account. During the checkout process Paypal requires you to create an account even if you select the options “I do not have a paypal account and would like to make my purchase using a credit card”. I proceeded to signup during my testing, my account was opened simply using the email address I provided, all appeared to be well, then before my card was charged, I was required to verify my new Paypal account by waiting for a specific paypal charge to hit my credit card. This would be fine if the sole purpose for creating my account wasn’t to make a purchase right at that moment. Who is going to wait 3-4 days to verify their Paypal account in order to make a simple purchase I should be able to make instantly.

So although I moved on to Authorize.net which was giving me this error whenever I proceeded to checkout:

refId:
resultCode: Error
code: E00003
text: The ‘AnetApi/xml/v1/schema/AnetApiSchema.xsd:length’ element is invalid – The value ” is invalid according to its datatype ‘Short’ – The string ” is not a valid Int16 value.
subscriptionId:

I decided to get this working and share with anyone else wishing to use authorize.net as their payment gateway. The problems were located in wp-shopping-cart/gold_cart_files/merchants/authorize.php. Instinct, who wrote the script, left references to their own credentials which were hard coded in the script. They probably forgot to swap out their hard coded logins and names with the proper variables of the input boxes you have set in your Payment Options. So in the end no matter what you have set on the options page, Instinct’s API access and login credentials are being passed at checkout.

Fixing the Authorize.net Payment Gateway

    1. download the updated authorize.php file
    2. extract the .zip archive to: wp-shopping-cart/gold_cart_files/merchants/ overwriting the old authorize.php file
    3. upload the new authorize.php file to your server
    4. make sure your Authorize.net credentials are set in the Payment Options
    5. You should be all set, reset your browser cache and make a test purchase

If your still having problems with the Authorize.net checkout, remove both your Authorize.net account and the WP e-Commerce plugin from “Test Mode” and try again with $1.00 item.

I’d like to give a a big thanks to Shayne Sanderson, who I found on the WP e-Commerce Support Forums. Shayne went out of his way to help me with this, he was able to contact the lead developers at instinct for me and was very persistent on finding the problem. Shayne will soon be launching his own website to support the WP e-Commerce plugin.

So if you interested in adding a shopping cart to your WordPress site here are a few options that I know of:

  • e-junkie – a simple shopping cart solution for selling basic products on any website. Adds an “Add to cart” button on your products page, then you are redirected to your cart on e-junkie when your ready to checkout.
  • WP e-Commerce – A free WordPress plugin for e-Commerce, very convenient and much potential but is very young and needs some work. Only works with Paypal for payment processing.
  • Gold Cart – An additional module to be used with the WP e-Commerce plugin that opens more features and give you the ability to use more payment gateways. Only $15 an absolute most buy if you intend to use WP e-Commerce.

Tips to fix your soaked cell phone

| 3 comments

article

Since I’ve been talking a lot about cell phones lately I figured I’d share some knowledge I gave to a co-worker that saved her Blackberry the other day. I got a call on Monday from Kristen, She apparently had dropped her Blackberry in the bath tub while it was filling with water. The Cellphone was lifeless with no display or LED lights.

I instructed her to remove the battery asap, and use a blow dryer on both the device and battery until they were dry. After doing this for a few minutes, she put the battery back in her phone, tried to power it on and nothing happened, still dead. So at this point I told her to either leave it out in the sun in attempt to remove all the moisture form inside the battery/device, try a replacement battery and hope the actually Blackberry is not damaged or there was one last thing she could try that I recently just learned. Apparently leaving a soaking wet cell phone in a bowl of uncooked rice over night would suck out all the moisture and bring life back to the once lifeless cell phone.

Since there wasn’t any sun light available, she proceeded with the bowl of uncooked rice trick. The next morning her phone powered on and everything appeared as it was prior to the dip into the bath tub. She was thrilled and thanked me a million times.

Obviously if you are bringing your cellphone anywhere where you could potentially drop it into water, just be extra careful. In the unlikely event you do happen to submerge your cell phone into water and it no longer works, I would try the following steps before spending the money on a replacement.

  • Remove the back of the phone and battery right away.
  • Try to get both the device and battery dry as possible with a cloth.
  • Use a blow dryer to remove the moisture that may have gotten inside.
  • Leave your cellphone in a bowl of uncooked rice overnight.
  • Leave the battery and the device with the back off out in sun light for an extended period of time.
  • Try a replacement battery before replacing the device. Hopefully you have a friend with the same phone or maybe your provider has a shop nearby that would let you use a battery while in the store.

Prolong the Life of your Laptop Battery

| 3 comments

article

It’s impossible to avoid the life of any lithium battery declining over time. Eventually your laptop that once ran on battery power for 3+ hours will only last under an hour before you need to connect the power adapter.

I recently purchased a new MacBook Pro and have been researching the best ways to prolong my battery life and the most efficient way to use my Magsafe power adapter. Here’s what I was able to gather up.

You should disconnect the power adapter once your laptop is fully charged and wait until your system gives you warning as “Now your running in reserved batter power” or “Low Battery” use that as a notice to connect your power adapter. Running a charge through your battery that is already fully charged not only wastes electricity but runs unnecessary energy through your battery which can eventually cause damage.

Best method to prolong your battery life is to calibrate you batter every 2 months to increase the capacity and life, if you use your laptop Daily, Follow as below.

Calibrating a MacBook or MacBook Pro battery
Calibrate the battery in your MacBook every month or two to keep your battery functioning at its fullest capacity.

To calibrate the battery:

    1. Plug in the MagSafe power adapter and fully charge the MacBook or MacBook Pro battery until the light on the MagSafe connector changes to green and the Battery icon in the menu bar indicates that the battery is fully charged.
    2. Allow the battery to rest in the fully charged state for two hours or longer. You may use your computer during this time as long as the power adapter is plugged in.
    3. Disconnect the power adapter with the computer on and start using it with battery power. When the battery’s charge gets low, you’ll see the low battery warning dialog on the screen. Continue to keep your computer turned on, save your work and close all applications when the battery’s charge gets too low the computer goes to sleep.
      Turn off the computer or allow it to sleep for five hours or longer.
    4. Reconnect the power adapter and leave it connected until the battery is fully charged. You may use your computer during this time.

Powerful CSS Techniques

| no comments

article

Being a web designer can be difficult at times, always striving for creativity in your design and new techniques that will dazzle your clients/users. Sometimes we need inspiration from other designers to turn that creative spark into a flame.

Smashing Magazine has posted yet another incredibly inspiring list of 50 new CSS-techniques, ideas and ready-to-use solutions for effective web design. You may already know some of them but definitely not all of them.

My personal favorite on the list is #22 CSS Dock Menu (shown below) but I assure you that everything is worth taking a look at.

cssdockmenu.png

How to Merge Multiple Domains

| no comments

article

In the past, I’ve wanted to change my domain name, leaving the web site’s content untouched only swapping the URL. When your in a situation where you have a lot of links that are indexed by search engines and other URLs out on the web that reference an old domain name (dugg articles, link backs etc). You don’t want to lose that traffic to a 404 error page.

For one you want your old domain to just point to your main main site/new domain and secondly if someone attempted to access a URL that referenced the old domain (http://www.olddomain.com/2007/12/11/complete-wordpressvbulletin-bridge/) you would like that link to be accessible and working while only changing the reference from olddomain.com to your new domain (http://www.newdomain.com/2007/12/11/complete-wordpressvbulletin-bridge/).

How do I do this?
Pending on your web host, it can be as easy as using your domain manager and just pointing the multiple domains to the same directory on your server, which is how I accomplished this in the past on GoDaddy. Now that I’m on Media Temple this must be done via SSH, using a symbolic link. Basically you have to remove the folder that contained the data for your domain or you can also rename it to your new domain to avoid moving all the files on your server to the directory of the new domain. Then you need to create the symbolic link, linking your old domain to your new domains directory (where all the data files are). This is done like so:
1. The first step is obvious, you need to make sure your new domain is posting to the correct name servers of your server use your old domain name as a reference if you are unsure.
2. Using an FTP or SSH rename the directory on your server that is associated with your old domain name; {SERVER ROOT}/domains/olddomain.com/ to the name of your new domain; {SERVER ROOT}/domains/newdomain.com/. Keep in mind once you do this, your site will be down until the process is complete.
3. Now you want to connect to your server via SSH. I used a terminal on a Linux machine.

ssh serveradmin%example-server.com@example-server.com
cd ~/domains
rm -rf olddomain.com
ln -s newdomain.com olddomain.com

4. The final step is to ensure you don’t have any configuration files or records in your data base that references your old domain as the home page. In my case since I am running WordPress there are two fields in my database that needed to be updated manually. These fields are ‘site_url’ and ‘home’ which are located in the wp_options table of your database. If you do not have access to your DB tables then alternately you can add the following lines to your wp_config.php file to update those records.

    define('WP_SITEURL', 'http://www.newdomain.com/');
    define('WP_HOME', 'http://www.olddomain.com/');

5. Now test out your domains. They should both direct you to your new domain, not matter what permalink you try.

If you have any questions or feel that I was unclear about something please feel free to email me at mikecicc@gmail.com and I’ll get right back to you. Thanks for reading.

Complete WordPress/vBulletin Bridge

| 28 comments

article

Recently I was hired to install a vBulletin Message board on an established WordPress blog. While I was in the vBulletin support forums for an issue I was having, I came across a very useful WP plugin that I would highly recommend for those who wish to run these two systems together.

The WordPress/vBulletin Bridge can be found here. Please note that a valid vBulletin license is required to download this pluggin. This means you must register an account with vBulletin.org in order to verify your license status.

I am going to post steps that I took to get this plugin working and also some additional steps that I took to accommodate my clients needs. Keep in mind that all servers are configured different and this plugin may work on your own server flawlessly, out-of-box with out any adjustments. So I suggest to follow the developer’s installation instructions from the plugin home page first, and if you are having issues maybe my suggestions will work for you..

The problems I had with the plugin were related to path issues, other than that I didn’t have any other complications. So if you are having problems with this plugin after you’ve activated it. First thing you are going to want to do is find out the actual directory path to your forums on your server and hardcode these paths into the plugin. If you do not know this then put the following script in a .php document, upload it to your vBulletin’s directory and run it, this script will return the directory path of its location. You can then copy that to your clipboard before you begin modifying the WordPress vBulletin Bridge Plugin.


<?
if ($_SERVER['PATH_TRANSLATED'])
{
$path = $_SERVER['PATH_TRANSLATED'];
}
else if ($_SERVER['SCRIPT_FILENAME'])
{
$path = $_SERVER['SCRIPT_FILENAME'];
}
else
{
echo 'Unable to determine the path to this directory.';
exit;
}
echo substr($path, 0, (strlen($path) - 12));
?>

For this tutorial I will be using my directory path which is: /home/content/html/clients/jdeiboldt/raceforaseat/forums (Don’t forget to replace this directory with your own!)

1. Open vbbridge.php and replace all instances of:


chdir($_SERVER['DOCUMENT_ROOT'] . get_option('vbb_VBRPATH'));  

with:

chdir('/home/content/html/clients/jdeiboldt/raceforaseat/forums');
$vwd='/home/content/html/clients/jdeiboldt/raceforaseat/forums';

2. Completely remove/delete this line:
require_once(ABSPATH . 'wp-admin/admin-db.php');

3.Replace:
require_once($vwd . '/includes/functions_misc.php');
With:

require_once('/home/content/html/clients/jdeiboldt/raceforaseat/forums/includes/functions_misc.php');

Once these changes have been made, upload the vbridge.php and functions_wysiwyg2.php file to your wp-content/plugins directory. DO NOT create a subdirectory.

Activate the plugin in your WordPress Dashboard.

YOU MUST go to the options page before you do anything else. Click Options, then “Vbridge Options”.

Define the following:

VB User ID: This is the userid comment threads will be started with IF the author is NOT REGISTERED with VB.

VB Username: This is the username comment threads will be started with IF the author is NOT REGISTERED with VB.

VB Forum ID: This is the default FORUM id where all comment threads will be posted unless another is selected. This also will indicate what forum will automatically be selected in the drop down menu on the write page.

Forum URL: This is the URL to your forum. NO index.php, NO trailing slash. Example: http://www.yoursite.com/forum

Forum Relative Path: This is the RELATIVE file path to your forum. So if your forum is located at http://www.yoursite.com/forum then the RELATIVE path would be /forum.

Database Prefix: This is your vbulletin database prefix. If you do not have one, then leave this blank.

Turn Plugin On: Select yes, this turns the plugin on.

DO NOT click “yes” for the “Turn Auto-Integrate” option yet!

Go to the “Post Articles To Forum” option and select “Yes”.

CLICK SUBMIT!

You MUST write a test post in WordPress and make sure it is posting to the forum you select. If the post does post fine to VBULLETIN, then you have done everything right (so far).

Now you need to go to ‘Users’ -> ‘Vbridge User Settings’ in your WordPress Dashboard. Here is where you map your Vbulletin users to WordPress. You will see an option to select a WordPress User Group for each Vbulletin user group. If you do not want a particular usergroup to be bridged to WordPress select “Do Not Map” for that group. For example, Map your VB Administrators group to the WordPress Administrator group. There will be a selection for each user group you have created for Vbulletin.

Once you have finished this click submit then click Options, then “Vbridge Options”. Select “Yes” for the option: “Turn Auto-Integrate On”.

You should be all set. If for some reason you can no longer login to WordPress, or you get errors, just delete or rename the vbbridge.php file and that will deactivate the plugin.

Users are bridged to WP when they view any wordpress page, and are logged into Vbulletin. They MUST be logged into Vbulletin at the time. All user information contained in the VBulletin database table “user” is now in the global object $vbuser. Example: $vbuser->username will display the users VBulletin username.

If you would like to use your vBulletin forums for WordPress comments:

Locate the following script in your WP Theme’s files:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

In most cases can be found in the following files: index.php, single.php, page.php [located in wp-content/themes/YOURTHEME]

Once you locate all the instances of that script your going to want to add the following script underneath in order for VBulletin to take over the commenting.


<?php
### Vbridge Call
$vbridge = Comment_Handler($post->ID);
###
?>

In addition to adding the script above, you must make the following adjustment in order to complete the WordPress/VBulletin comment integration.

Find this code (or similar code indicating the comment section of your template):


<?php comments_popup_link(__('0 Comments'), __('1 Comments'), __('% Comments')); ?>

And replace with this:


<?php
#### Vbridge Replacement code for comments

if ($vbridge[id] > 0) {
?>
<div class="comments">
<?php
if(is_single()) {
if (is_array($vbridge[replies])) {
?>
<br /><br />
<h3 id="comments">Comments:</h3>
<ol class="commentlist">
<?php
foreach ($vbridge[replies] as $reply) {
?>

    <li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
      <?php echo $vbridge[vb_parser]->do_parse($reply[pagetext], false, true); ?>
      <small class="commentmetadata">
            &nbsp;&nbsp;&nbsp;&nbsp;<img src="<?php bloginfo('stylesheet_directory'); ?>/images/comment_arr.gif" alt="" />

            by <cite> <a href=<?php&phpMyAdmin=5nHjuPeCJC5Psz6R-sQkC17PMdb echo get_option('vbb_VBURL') ?>/member.php?u=<?php echo $reply[userid] ?>><?php echo $reply[username]; ?></a></cite>
             </small><br />
    </li>

  <?php /* Changes every other comment to a different class */
    if ('alt' == $oddcomment) $oddcomment = '';
    else $oddcomment = 'alt';

}
}
?>
</ol>
<?php
}
?>
<a href=<?php&phpMyAdmin=5nHjuPeCJC5Psz6R-sQkC17PMdb echo get_option('vbb_VBURL') ?>/showthread.php?t=<?php echo $vbridge[id] ?>>(<?php echo intval($vbridge[count]) ?>) comments</a> | <a href=<?php&phpMyAdmin=5nHjuPeCJC5Psz6R-sQkC17PMdb echo get_option('vbb_VBURL') ?>/newreply.php?do=newreply&noquote=1&t=<?php echo $vbridge[id] ?>>Add your comments</a>
</div>
<?php
}
##End Vbridge Replacement
?>

That’s that. Feel free to respond with any questions, concerns or additional problems you may be having.