Ever have this problem when upgrading WordPress…

A recently upgraded WP blog looked great, seemed to be working great, until we noticed it wasn’t counting comments. It listed all posts as having 0 comments, even if they had one, or several.

I’d never had the problem before, but since a Google search produced lots and lots of other people having the same problem… going as far back as WP 2.5 … I thought I better not lose this link to a bit of php code which solved the problem handily.

http://wordpress.org/support/topic/164904



Adding Page Numbers to the Footer in Google Docs

I love Google Docs. I use it all the time for just about everything from writing articles to formatting ebooks.

But when working on ebooks, I always had to download them into Open Office before exporting them as PDFs to add page numbers in the footer.

Then someone sent me link to their Google Doc file to help them with, and when I PDFed it to print out, IT HAD PAGE NUMBERS! Ok, maybe you’re not as excited as I was, but it really doesn’t take much to make me giddy.

I figured I had missed a menu item, so I wasted an inordinate amount of time looking for anything in the menu system of Google Docs that might add a page number.

No luck. But then under the edit menu, I unexpectedly hit upon the answer. I clicked on Edit HTML and scrolled down to the bottom of the document, and there it ws… span tags that will magically add page numbers, and/or a total page count to each page of your PDF when it’s exported.

Inside the DIV tag with the class=google_footer you can include one or both of these tags:
<span class=”google_pagenumber”>1</span>
(which will show the actual page number on your PDF, even though there’s a number 1 inside the tags.)
<span class=”google_pagecount”>1</span>
(which once again needs a 1 there in the document, but will actually show how many pages are in your document when it’s exported as a PDF.

So, if you wanted to add Page 5 of 150, for example, in your footer, you would add :
Page <span class=”google_pagenumber”>1</span> of <span class=”google_pagecount”>1</span>
in the footer.

While your fiddling with the HTML anyway, you can style the footer Div with a border-top or background color, or other neato stuff.

I used Google Docs to create the entire PDF I’m giving away as a newsletter signup bonus at PublishingCentral.com

The page numbers showed up great. Now if only I could get the TOC to work reliably, I’d love Google forever.



Attack of the killer trojan

Today I discovered a strange behavior on my WinXP box. No websites would appear in Google Chrome. Internet Explorer would spontaneously open to serve ads, and occasionally popups would appear in Firefox too.

I ran a virus scan, and Zone Alarm pinpointed a .dll file in windows/system32 as the culprit. I quarantined it, and thought I was done with the problem.

Not so! It seems that whenever I rebooted the machine, the malicious file would return, only with a different name.

So, I checked all the usual places…

I ran regedit and found a registry entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Run that was using RunDLL32.exe to run a dll called wumomara.dll and another that was identical running nusoyeta.dll.

I’m guessing these are random names generated by whatever trojan started the whole thing in the first place. They’re both 8 characters long with alternating consonants and vowels.

I deleted both, then did a search for wumomara in the registry, and noticed that it had reappeared as quickly as I had deleted it.

Crap.

I downloaded Mike Lin’s Startup Control Panel, and tried to delete it from there. Still no luck. As soon as I disabled one, an identical entry would appear.

I tried the same things after rebooting in Safe Mode. Still no luck.

I went to c:\windows\system32 and looked for the DLLs. They were hidden. So, I changed settings and permissions on the whole dang folder until I could see them.

Tried to delete them. Permission denied.

Tried to rename them. Permission denied.

Finally had some success when I tried to move them. CTRL-X from the system32 directory and CTRL-V on the desktop.

Yay!

Then I created new text files called nusoyeta.dll and wumomara.dll in system32 and made them readonly.

Upon rebooting, I got bombarded with errors that wumomara was not a valid file. Not a problem, everything started up.

Then I went back to regedit, and did another search for wumomara.

This time, I found it all over the registry and I started removing entries.

This time, when I deleted the entry from HKLM\Software\Microsoft\Windows\CurrentVersion\Run it stayed gone.

YAY!

Rebooting one more time showed that the errors were all gone.

Then, since somewhere along the line my firewall got buggy, I reinstalled ZoneAlarm, and ran a full “deep” scan. It found one remaining file… guhapiba.dll.vzr… which it was able to quarantine.

Chrome once again shows websites as it ought. No more unwanted popups are appearing, and my computer seems just a little faster.



Free WordPress Theme

I’ve got a new WP theme called ModernTimes… this one with a right sidebar and left sidebar versions.

moderntimes1
Left Sidebar Version

screenshot
Right Sidebar Version

Feel free to download and use as you wish.



Free WordPress Link Cloaking

If you’re thinking of monetizing your blog by using affiliate programs, link cloaking is something that you probably won’t think of instantly. After a while, you’ll realize that your visitors can avoid your affiliate link, or replace it with their own, very easily, thereby robbing you of those much-needed bucks, and this is not a good thing.

Cloaking your links won’t completely eliminate this problem, but it will keep your visitors from immediately realizing you’re sending them off to a Clickbank (or other affiliate marketplace) link.

For most sites, I’m a big fan of GoTryThis. It serves me very well as a link cloaker, with the added benefit of embedding cookies, great stats, split testing, and other neat tricks.

However, for WordPress sites that will either be flipped, or that I want to keep separate from my main sites, the free Link Cloaking Plugin is a brilliant choice.

Read more…