Archive

Archive for the ‘wordpress’ Category

Magento Notes - Add gift wrap service at checkout

July 8th, 2010

Searched high and low for a way to add gift-wrap service, and came across an excellent solution on the Magento forum. Here’s the link:

http://www.magentocommerce.com/boards/viewthread/176424/P0/

blog posting, magento, wordpress ,

Strategically inserting Google ads into Wordpress blog

May 21st, 2009

Have been working hard to promote blog.52my.info, but have realized that there isn’t an easy way to add google ads more naturally in between posts.  Some research landed me on Problogger.net (an excellent blog that teaches/motivates people how to make money blogging — I am a believer in Darren).

To more naturally add google ads, what you simply need to do is modify your “Main Index Template” usually the index.php file.  In there you should find a while loop that looks something like:

if (have_posts()) :
while (have_posts()) :
the_post();
the_content();
endwhile;
endif;

just change it to something like this:

// Set Counter to 1, First Post
$counter = 1;
if (have_posts()) :
   while (have_posts()) :
      $counter = $counter + 1;
      the_post();
      the_content();
      if(2 == $counter)
      {
         echo 'Adsense code';
      }
   endwhile;
endif;

the things to look for and add are in bold.  The “2″ indicates that google ads will be inserted in every 2 posts. This information was obtained here

blog posting, technical notes, wordpress , ,

Relaunch of OCCACC.ORG

May 5th, 2009

I would also like to take this time to announce the relaunch of Orange County Chinese-American Chamber of Commerce (OCCACC.ORG) web site.  It is a web site dedicated to  developing Chinese-American commerce by providing assistance in business management business operation, trade materials, and business experience.

Please send any questions and feedback related to the web site to me. Thanks.

blog posting, news, wordpress , ,

Upgrading Wordpress from 2.6.x to 2.7.x

May 5th, 2009

I have recently being doing a lot of moving. Moving web sites that is, from Godaddy to Simplehelix, as i am trying to clear my godaddy vps to be dedicated for 52my.info web site. The hits on 52my.info has been growing steadily. But we are hoping for a POP soon!!

Anyways, as I start moving my sites from one host to another, i figured, why not take the time to also upgrade my older blog sites to the newer WP versions, so I did a quick search and I came across a great post by Siddharth, but I will do a quick summary of what worked for me:

1. Backup the following files and folders :
* Folder: wp-content (backup the whole directory)
* Config File: wp-config.php (file)
* Database: Database (using phpmyadmin, backup the whole database, safe.)
2. Downloaded the latest Wordpress here.
3. Delete all the old Wordpress files .
4. Extract and upload (or upload and extract) the new Wordpress files.
5. Copy the wp-config.php to the Wordpress root directory.
6. Run wp-admin/update.php (http://yourwordpresssite/wp-admin/update.php). It will ask for a database upgrade, continue. If all goes well it will redirect to a blank page.
7. Delete the new wp-content directory and upload your old wp-content directory in place of it.
8. Visit your site! All your posts and plugins will be active and it will look the same! (All incompatible plugins will be disabled automatially, but most of the plugins that work with 2.6.* also work with 2.7
9. Admin URL is the same: http://yourwordpresssite/wp-admin/

Thanks Siddharth!! for for this wonderful guideline!!

blog posting, wordpress , ,

Wordpress Notes — Going live from local development environment

March 17th, 2009

As I launch more wordpress web sites, I am realizing that there are inherent issues with how Wordpress saves the posts…it always uses absolute path for URL links.  This creates problem for me as in my scenario, all of my local development have a url path of http://localhost:8080/sitename, so when I moved the blog to production and assign it a valid domain name like http://blog.52my.info, all the existing post links and image links would still be referring to the local computer for images and posts! This is TRICKY, as you won’t noticed this problem, because more than likely YOU ARE browsing the site that you have uploaded using the same computer where the dev blog was hosted, and you would see all images load up properly b/c they are stored on your local computer.  But when you go to another computer, you will see all the missing posts and images, etc.

The fix for this is to run several SQL scripts in which it would do a find and replace for all data in the mysql tables and rename them to the proper domain name url. I found this information from this great post here. But the long and short of it is run the following scrips:

1. update the wp_options table:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

2. Update wp_posts

UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');

3. Update post contents in which there are links within post content to the blog itself:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');

blog posting, technical notes, wordpress , ,

How to reset Wordpress admin password

February 28th, 2009

If you have a Wordpress blog that you haven’t attended to in a long time and you have forgotten the password to get into the admin interface…here’s the trick to reset the password:

Use phpMyAdmin and run the following script:

UPDATE `wp_users` SET `user_pass` = MD5( ‘new_password_here‘ ) WHERE `wp_users`.`user_login` = “admin_username“;

Places in bold you will want to modify with your login name (most likely it’s admin) and select a new password. Once you run the script you should be able to login no problem.

This fix was found here: http://kb.siteground.com/article/How_to_reset_my_WordPress_admin_password.html

blog posting, technical notes, wordpress ,

Wordpress Technical Notes - embedding Google adsense in post

February 24th, 2009

Just as an experiment to see how effective google adsense can be, I am embedding Google adsense into my single posts in the blog.  I came across this tutorial which help made the implementation a breeze.

http://tamba2.org.uk/wordpress/adsense/

Now, let’s see those click-throughs come in!!

blog posting, technical notes, wordpress ,

1st Contribution - Wordpress Oriental Theme with 3-Columns

February 19th, 2009

Having used so much open source stuff to build my project…it’s finally time for me to give back to the community.  I have recently deployed my Chinese blog blog.52my.info using the original Oriental theme built by http://pure-essence.net/, but thought the layout was inadequate for displaying ads, so I have expanded the original design and made it into 3-columns in which the right side bar is now dedicated for ads.

Anyone interested in the 3-column oriental theme can download here.  I am not sure yet what the proper etiquette is for mod’ing someone else’s work and redistributing it, but if someone uses this and notices that i am not properly giving credit, please let me know.  I want to know so that I can make more contributions the right way in the future.

Trying something new here as well.  If you like the template, you can also donate and encourage me to create more free templates for the community.


blog posting, news, templates, wordpress , , , ,

Favicon - the little bookmark icon that shows up next to URL

February 16th, 2009

Just wanted to put a note to a pretty good Photoshop extension that I found as I was looking for tools to create .ico files (favicons) for my web sites. Here’s a link to download the extension from Toby Thain: http://www.telegraphics.com.au/sw/#icoformat, all it is is a simple file that you copy into the “File Formats” folder inside your Photoshop Plugins folder.

Now when you create a new icon, which is a 16px x 16px icon you can save as .ico file format in Photoshop. As to where to put this file, simply name this file favicon and drop it into the root of your web site folder.

For Wordpress, you will want to drop this into your wp-content/themes/themeName folder.

For Magento, you will want to drop you favicon file in the root Magento folder as well as: skin/frontend/default/themeName if you want to add the favicon to the admin page you will drop it here: skin/adminhtml/default/ThemeName

e-commerce, magento, technical notes, wordpress , , ,

New WP Blog Launch - blog.52my.info

January 30th, 2009

Building on the success we have been having with our 52my.info sister site, we are launching a Chinse blog catering to the Chinese demographic in USA.  It would start off with contents relevant to Southern Caifornia (home town of Casual Commerce), but it would eventually grow into Chinese populated areas like Northern California, New York, and Vancouver Canada.

The blog uses a template theme (Oriental) from Wordpress, designed by Dodo at pure-essence.net.  It’s a perfect theme that suits OUR blog theme.  The site runs on Wordpress ver 2.7, which has a new admin interface that takes some getting use to, personally I like the old admin page better, but who am I to complain? One of these days, i will write a plugin to contribute to WP.

blog posting, wordpress , ,