February 21st, 2010 — James
Before Windows 7, you needed multiple tools and keystrokes to get the screenshot of your WordPress theme. On Windows 7, it is very easy with the snipping tool.
Open the browser to a post or page on your website that you want to appear on your screenshot.
Click the start menu on Windows 7. The snipping tool is usually at the top. If you cannot find, just type snipping tool in the search box. Start snipping tool.
Make sure you have rectangular snip selected in the new drop down on the snipping tool.
Now move the mouse cursor to the browser window with your themed blog post on it and select the area you want it on the screenshot. Once you complete the selection, snipping tool will capture that area and show it on its own window. Save the image as either screenshot.jpg or screenshot.png. Note that snipping tool adds extensions in upper case. Convert it to lower case. Unix/Linux is case sensitive and may not serve up the file.
Place this file in the theme folder (directory).
That’s all to it.
May 25th, 2009 — James
If you have used  WordPress Suicide plugin, you know what I am talking about. Every time I do this, I go around reading all PHP files to figure out the tables and columns and their meaning.
Here is a quick one. I am using mySQL client.Â
Add your admin account back:
insert wp_users (user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) values (‘admin’, md5(‘your-admin-password’), ‘admin’, ‘youremail@whatevermail.com’, ‘yoururl@yoursite.com’, ”, ”, 0, ‘admin’);
Check what the id is:
select * from wp_users where user_login = ‘admin’;
Add two entries to user meta table to get the privileges:
insert into wp_usermeta (user_id, meta_key, meta_value) values (1, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;b:1;}’);
insert into wp_usermeta (user_id, meta_key, meta_value) values (1, ‘wp_user_level’, 10);
I did not spend enough time to figure out what those entries mean. But this will get you back in to the admin console.Â
May 20th, 2009 — James
Have made more updates to the theme. It now supports threaded comments. It is also widget friendly now. I have replaced the standard sidebar on this site with a dynamic sidebar. Â It still is only 38KB in size including the images. Other changes include font sizes and colors for a few elements.
July 21st, 2007 — James
This week I created a new theme for WordPress from ground up. I started the design of this theme with the following ideas.
- Keep every end tag in the same file where it was started. The themes I looked at, including the default WordPress theme had tags crossing over multiple files or templates. I made a choice not to cross over any HTML, PHP or other tags across multiple files and templates. If a tag started in a file, it will end in that file. This was pretty difficult to accomplish because all the samples I looked at for had code spilled all over the files. Luckily the organization of these files were very well documented at WordPress.org.
- Reuse the code. Whether it is PHP or HTML, I tried to reuse them by placing them in small PHP files. In the style.CSS file which is the main theme file, I have categorized, used shortcuts and grouped styling. May not be perfect, but it is very compact.
- Extremely small size. I consider this very important because most of the world still does not have broadband connection and a quick page load will be appreciated by people who do not have a good Internet connection. I made the images as small as possible, though I have plans to make them even smaller. Code reuse allowed me to cut down on the overall code size. I have no fancy code in the theme that you cannot find at Codex. So, I did not add any comments for things that are already explained elsewhere. The size of the WordPress default theme is about 90KB. This theme is about 37KB including a 14KB screen shot and 8KB of page images. That leaves about 15KB of code. WordPress classic theme with no images itself is about 26KB.
- At least XHTML 1.0 compliance. This was easy. But then I wanted to make it XTML 1.1 compliant. This was tough enough. Right now if the browser is FireFox or W3C Validator, it will spew XHTML 1.1 compliant output. Everything else has a small quirk.Image map area is not XHTML 1.1 compliant because every other browser needs the “name” attribute for the map tag. Internet Explorer 7 is the worst of all. It even needed an illegal character ‘#’ for usemap attribute of the img tag. With some HTTP header modifications and dynamic attribute generation, I have accomplished perfect XHTML 1.1 compliance for FireFox at least.
- CSS 3.0 compliance. I did not have to make too many changes to the completed code to get there.
Once I completed the initial theme look, feel and functionality, I started testing every link and function on four browsers on Windows and 2 browsers on Linux. Then I submitted the site on W3C validator for XHTML and CSS and that when I found the incompatibilities. I even thought FireFox had a bug and filed it at bugzilla. It turns out that FireFox was just being strict as required by the specification.
I have not looked at the plugins or how to support plugins in the theme. I will add it as soon as I learn about them.
A screen shot of the theme is below. If you would like to have a complete look at the theme, you can view it here. The site is published on a server sitting at home on my cable connection. It may be a bit slow. I will publish the theme after a bit more tinkering with images to reduce the sizes. The content at this site was imported from here. Let me know what you think about the theme.
![gsshot.jpg]()
Technorati Tags: wordpress themes, wordpress theme, wordpress
November 21st, 2006 — James
After I installed IE7, I am not able to add categories to my post. This is what I see. The box you see is not editable.
 