Tagged: Freelance

HP OfficeJet Pro Plus 8600 time date problems

I got this new printer/fax/scanner/toaster the other day.  It’s a cheap home version of an office multifunction copier.  So far it’s nifty enough for the price.  One giant complaint I found online is people being unable to accurately set the date/time on it, which effects time stamps for emails and faxes.  After fiddling I believe I’ve figured it out.  It is, perhaps unsurprisingly, completely unintuitive.

printerAbove is the time setup in the web config.  You can hit this with it on wireless – no need to have your computer physically plugged into the printer. Set the Current Device Time to actual GMT using the Date field and stupid drop downs for Time.   No, not the current time in your zone…. GMT.  Check the box for Use the same time zone set on this computer and Apply it. This should make the device subtract or add the correct amount of hours from the GMT setting to correctly time stamp correspondence sent from it.  When you return to this page the Current Time will continue to show GMT, not your zone’s time.  I know, I know, that’s stupid too.   An easy test to confirm things are set up correctly is to go into the scan/email set up and send a test page.

Modified page of categories in WordPress using “Page of Posts”

I hate it when I fail to document.  About a year ago I solved a problem I was having on a client site involving customized pages of categories.  I didn’t document my solution, and not unexpectedly as the months ticked by it slipped out of my brain.  Fast forward to now and I need the solution again.  After too much time spent poking at my own mess, I have the solution again.

My problem was this: I want a page that shows all posts of a particular category, and I want the ability to format those posts into a custom view.  No links in titles, no thumbnails, etc.

Find the Slug of the particular category you want to display.  This is in the Category edit page.  Then create a .PHP file named SLUG_page_template.php.  Populate the file thusly:

{code type=php}
<?php
/*
Template Name: PageOfPosts
*/
get_header(); ?>
<div id=”content” class=”narrowcolumn”>
<?php
if (is_page() ) {
$category = get_post_meta($posts[0]->ID, ‘SLUG’, true);
}
if ($category) {
$cat = get_cat_ID($category);
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
$post_per_page = 4; // -1 shows all posts
$do_not_show_stickies = 1; // 0 to show stickies
$args=array(
‘category__in’ => array($cat),
‘orderby’ => ‘date’,
‘order’ => ‘DESC’,
‘paged’ => $paged,
‘posts_per_page’ => $post_per_page,
‘caller_get_posts’ => $do_not_show_stickies
);
$temp = $wp_query; // assign orginal query to temp variable for later use
$wp_query = null;
$wp_query = new WP_Query($args);
if( have_posts() ) :
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div <?php post_class() ?> id=”post-<?php the_ID(); ?>”>
<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></a></h2>
<small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>
<div class=”entry”>
<?php the_content(‘Read the rest of this entry »’); ?>
</div>
<p class=”postmetadata”><?php the_tags(‘Tags: ‘, ‘, ‘, ‘<br />’); ?> Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></p>
</div>
<?php endwhile; ?>
<div class=”navigation”>
<div class=”alignleft”><?php next_posts_link(‘« Older Entries’) ?></div>
<div class=”alignright”><?php previous_posts_link(‘Newer Entries »’) ?></div>
</div>
<?php else : ?>
<h2 class=”center”>Not Found</h2>
<p class=”center”>Sorry, but you are looking for something that isn’t here.</p>
<?php get_search_form(); ?>
<?php endif;
$wp_query = $temp; //reset back to original query
} // if ($category)
?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
{/code}

On line 9 change SLUG to the appropriate slug of your category.  Update this file to represent the changes you want reflected on the category page.

Determine the cat number of your category.  This is easily done by going into Categories and hovering over View.  Then you can test by going to http://www.yoursite.com/?cat=#  where # represents the category.  Category pages can also be added to menus easily.

Run Line / Command Line Options

Here’s a nice list of run line/command line commands for Windoze:

Accessibility Controls access.cpl
Add Hardware Wizard hdwwiz.cpl
Add/Remove Programs appwiz.cpl
Administrative Tools control admintools
Automatic Updates wuaucpl.cpl
Bluetooth Transfer Wizard fsquirt
Calculator calc
Certificate Manager certmgr.msc
Character Map charmap
Check Disk Utility chkdsk
Clipboard Viewer clipbrd
Command Prompt cmd
Component Services dcomcnfg
Computer Management compmgmt.msc
Date and Time Properties timedate.cpl
DDE Shares ddeshare
Device Manager devmgmt.msc
Direct X Control Panel (If Installed)* directx.cpl
Direct X Troubleshooter dxdiag
Disk Cleanup Utility cleanmgr
Disk Defragment dfrg.msc
Disk Management diskmgmt.msc
Disk Partition Manager diskpart
Display Properties control desktop
Display Properties desk.cpl
Display Properties (w/Appearance Tab Preselected) control color
Dr. Watson System Troubleshooting Utility drwtsn32
Driver Verifier Utility verifier
Event Viewer eventvwr.msc
File Signature Verification Tool sigverif
Findfast findfast.cpl
Folders Properties control folders
Fonts control fonts
Fonts Folder fonts
Free Cell Card Game freecell
Game Controllers joy.cpl
Group Policy Editor (XP Prof) gpedit.msc
Hearts Card Game mshearts
Iexpress Wizard iexpress
Indexing Service ciadv.msc
Internet Properties inetcpl.cpl
IP Configuration (Display Connection Configuration) ipconfig /all
IP Configuration (Display DNS Cache Contents) ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents) ipconfig /flushdns
IP Configuration (Release All Connections) ipconfig /release
IP Configuration (Renew All Connections) ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS) ipconfig /registerdns
IP Configuration (Display DHCP Class ID) ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID) ipconfig /setclassid
Java Control Panel (If Installed) jpicpl32.cpl
Java Control Panel (If Installed) javaws
Keyboard Properties control keyboard
Local Security Settings secpol.msc
Local Users and Groups lusrmgr.msc
Logs You Out Of Windows logoff
Microsoft Chat winchat
Minesweeper Game winmine
Mouse Properties control mouse
Mouse Properties main.cpl
Network Connections control netconnections
Network Connections ncpa.cpl
Network Setup Wizard netsetup.cpl
Notepad notepad
Nview Desktop Manager (If Installed) nvtuicpl.cpl
Object Packager packager
ODBC Data Source Administrator odbccp32.cpl
On Screen Keyboard osk
Opens AC3 Filter (If Installed) ac3filter.cpl
Password Properties password.cpl
Performance Monitor perfmon.msc
Performance Monitor perfmon
Phone and Modem Options telephon.cpl
Power Configuration powercfg.cpl
Printers and Faxes control printers
Printers Folder printers
Private Character Editor eudcedit
Quicktime (If Installed) QuickTime.cpl
Regional Settings intl.cpl
Registry Editor regedit
Registry Editor regedit32
Remote Desktop mstsc
Removable Storage ntmsmgr.msc
Removable Storage Operator Requests ntmsoprq.msc
Resultant Set of Policy (XP Prof) rsop.msc
Scanners and Cameras sticpl.cpl
Scheduled Tasks control schedtasks
Security Center wscui.cpl
Services services.msc
Shared Folders fsmgmt.msc
Shuts Down Windows shutdown
Sounds and Audio mmsys.cpl
Spider Solitare Card Game spider
SQL Client Configuration cliconfg
System Configuration Editor sysedit
System Configuration Utility msconfig
System File Checker Utility (Scan Immediately) sfc /scannow
System File Checker Utility (Scan Once At Next Boot) sfc /scanonce
System File Checker Utility (Scan On Every Boot) sfc /scanboot
System File Checker Utility (Return to Default Setting) sfc /revert
System File Checker Utility (Purge File Cache) sfc /purgecache
System File Checker Utility (Set Cache Size to size x) sfc /cachesize=x
System Properties sysdm.cpl
Task Manager taskmgr
Telnet Client telnet
User Account Management nusrmgr.cpl
Utility Manager utilman
Windows Firewall firewall.cpl
Windows Magnifier magnify
Windows Management Infrastructure wmimgmt.msc
Windows System Security Tool syskey
Windows Update Launches wupdmgr
Windows XP Tour Wizard tourstart
Wordpad write

“The required section was not found in the INF”

While rebuilding an older HP laptop XP threw me this error upon attempting to install the Texas Instruments PCIxx21 Integrated Flashmedia controller:

The required section was not found in the INF

I had the right drivers… in fact, I had a bundle for the media controllers of which this bit was but a small part of.  The rest installed without a hitch.  No unknown device appeared in the device manager, but XP would still try – and fail – to install this.

Here’s how to get around it.  After allowing the error to generate, open in a text editor this file:

C:\Windows\Setupapi.log

And scroll to the bottom.  You should be able to identify verbiage pertaining to the failed installation attempt.  Mine looked like this:

#I022 Found “PCI\VEN_104C&DEV_8033” in C:\WINDOWS\inf\oem10.inf; Device: “Texas Instruments PCIxx21 Integrated FlashMedia Controller”; Driver: “Texas Instruments PCIxx21 Integrated FlashMedia Controller”; Provider: “Texas Instruments Inc”; Mfg: “Texas Instruments Inc”; Section name: “FMDriverInstall”.
#I023 Actual install section: [FMDriverInstall.NT]. Rank: 0x00002001. Effective driver date: 06/23/2005.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [FMDriverInstall] in “c:\windows\inf\oem10.inf”.
#I320 Class GUID of device remains: {4D36E970-E325-11CE-BFC1-08002BE10318}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [FMDriverInstall] in “c:\windows\inf\oem10.inf“.
#I320 Class GUID of device remains: {4D36E970-E325-11CE-BFC1-08002BE10318}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
[2010/10/02 03:14:03 2728.5]
#-199 Executing “C:\WINDOWS\system32\rundll32.exe” with command line: rundll32.exe newdev.dll,ClientSideInstall \\.\pipe\PNP_Device_Install_Pipe_0.{2D6E77D8-0EB1-460B-A156-76EF5419451A}
#I140 Installing device class: “MTD” {4d36e970-e325-11ce-bfc1-08002be10318}.
#E067 Could not locate section [ClassInstall32].
#E142 Class: {4D36E970-E325-11CE-BFC1-08002BE10318}. Install failed. Error 0xe0000101: The required section was not found in the INF.

The parts we’re interested are highlighted.  the data in orange represents the actual .inf file XP is utilizing to attempt the driver installation. The data in green represents the missing section of that .inf that XP requires.

In your handy text editor, open the orange file.  Scroll to the bottom of the file and, on a new line beneath the last bit of data in it, put the green information.  Save and close the inf and try your install again.

Perl PPM etc. through proxy

In order for Perl to work through a proxy (for Perl Package Manager, etc) you need to define the proxy as a system environment variable:

Right click on “My Computer”, click on “Properties” and select the “Advanced” tab. Click the button marked “Environment Variables” and make the following changes in the “System Variables” window:

  1. With the “New” button, add the setting HTTP_proxy, with your proxy name as the value (you must include ”
    1
    http://

    “), followed by a colon and the proxy port, if applicable; e.g., ”

    1
    http://proxy:8080

  2. If you require a user name and/or password to access your proxy, use the “New” button to add the settings HTTP_proxy_user and HTTP_proxy_pass, with your user name and password as the respective values.

From the ActivePerl FAQ.

CMS MySQL Password Woes?

Forget a MODx/MySql database pass for a client?  Me too.  Thankfully, it’s easily located at

/manager/includes/config.inc.php

How about WordPress?  Me too again.  It’s the wp-config.php file in the root.

Speaking of these files, make sure to CHMOD them to 600 for protection.

WordPress – Intro Page

I had a client that, despite my protestations, wanted a “Intro” page for his website – a landing page with a large clickable image and (gulp) embedded autoplay sound. His site was already set up and live in WordPress, and it already had a static homepage… and it was installed at the root of his site.

Aside: We’re using WordPress as a content management system rather than a blogger. I’ve discovered that, for the average small business/site, full blown CMS solutions such as Joomla, Drupal and MODx (the last being my preferred choice) tend to be overkill. The bells and whistles that these packages contain may get developers excited, but in my experience they simply overwhelm the average client. It’s akin to giving someone Photoshop because they need to re-size some images. WP is stable, mature, relatively slick, and probably the easiest to use. I wish I had the time to redo all of my CMS clients sites in WP.

So what I needed was an opening page that didn’t utilize the site theme.  That last bit’s the kicker.  You can’t just change the index page, or set up .htaccess to re-prioritize the directory index (if you were thinking you’d drop a static index.html page in there and leave WP’s index.php) – both actions turn WP’s navigation kludgy.   An option would be to export the theme and database, reinstall WP somewhere other than the root, put your index page in the root,  modify your theme and DB data to correct pointers  and URLs, and import it into your new install… but that sure sounds like a lot of work, doesn’t it?

Here’s what I did instead:

  1. Created a php page in the root of the activated theme (wp-content/themes/THEMENAME/).  Doesn’t matter what the name of this page is.  I named mine front.php because I’m not very creative.
  2. The first line of this page is this: <?php /* Template Name: New Template Name */ ?>. (Change New Template Name to whatever you like)
  3. Beneath that line is the code that comprises the landing page.
  4. Within WordPress, I created a static page named Landing.  Doesn’t matter what you put in this page – it isn’t going to show on the site.  I put a note to my client, explaining that he would have to contact me for changes to the landing page.  Set the Template for this page to New Template Name (meaning whatever you changed the template name to in step 2).
  5. I then changed the Front page by heading to Settings, Reading and changing Front page displays to Static, Front page=Landing.

That’s it.  Obviously, make sure to put a link from the landing page to whatever your WP homepage is (in this case ?page_id=6).

There – that beats the alternatives, no?