Recent Google Searches

Someone was trying to hack my Recent Google Searches Widget to work outside of WordPress. This could be used as an include in any web page and when users arrive via google, bing, or yahoo they would see a search that would let them search the site using the same keywords.  Since the search engines only give you one link to the best match, this code will give you the rest of the matches.

I figured out what the person was doing wrong and I generalized the code to work pretty much anywhere that has php.

You can download the php file and the file I used to test it. rgs.zip

You need to include it using a server side include or in php you would enter:

include(“rgs.php”);

The history file winds up in a file called history.txt in the form of a serialized array. If you get more than a few hundred hits per minute you might want to use a database to store the data.

Posted in Uncategorized | 3 Comments

 

AstoundMe.com

I got a furry of hits (about 2,000) from Hacker News which is a good place to put your techy stuff. You get hits, but almost all of them use adblocker. They don’t bookmark, and they don’t follow links. Hacker News only works if your site is sticky to nerds and geeks.

I have yet to have any takers on the PayPal form, so I’ve decided to stop pushing the site with adwords. The adsense ads were pretty useless (just a few pennies).

I am bummed out. I thought that this was an outrageous idea that would have people flaming me for months, but it was a big ho-hum.

I will forget about it for now. I still expect that someone in the next few months, desperate for a friend, will pay the $1.99. I’ll get a PayPal notice in my in box and I’ll celebrate with a bottle of warm beer when I get home.

Posted in Uncategorized | Leave a comment

 

Trying to Break 500

There’s a list of the top 1,000 plugin authors at http://www.daveligthart.com. Every week or so he updates the list and I have been dripping down on the list every time. I may be reaching my point of natural buoyancy. Each week I advance a little less. I may never break 500. This is because I add new users at the same rate as those around me. Young turks with sexy plugins pass me while old, once useful plugins slide when they get few new users.

I think that I might appear on more lists if I can pass 500. I have 15 plugins (and more on the way). This is more than 95% of the people on the list. At the current rate I’ll break 500 some time around Christmas.

Posted in Uncategorized | Leave a comment

 

Get Rich With FaceBook and Twitter

I started a new site in order to make money with Facebook and Twitter.

I know, it’s dumb, but you can never tell what will work and what won’t.

Posted in Uncategorized | Leave a comment

 

Javascript List Menu Collapse

Mu plugin that collapses pages and categories has been approved and is now in the repository.

Collapse Page and Category Plugin

The heart is a script that makes collapsing menus dead simple. You just give the UL that you would like to have collapsed the class of ‘children’. It will then hide that UL and attach a click event to its parent tag. Making nested collapsing menus will never get easier.

Here is the JavaScript code – you can add it to any page, not just WordPress.

function kpg_colpage_context(event) {
 var ev=event||window.event;
 if(ev.stopPropagation) {ev.stopPropagation();}
 ev.cancelBubble = true;

 var targ=ev.srcElement||ev.target;
 var nodes=targ.childNodes;
 for (var i = 0; i < nodes.length; i++) {
 if (nodes[i].className=="children") {
 if (nodes[i].style.display=="none") {
 nodes[i].style.display="block";
 nodes[i].style.visibility="visible";
 } else {
 nodes[i].style.visibilty="hidden";
 nodes[i].style.display="none";
 }
 }
 }
 return false;
 }
 function kpg_colpage_action(event) {
 //try {
 var b=document.getElementsByTagName("UL"); // case sensitive XML
 for (var i=0;i<b.length;i++) {
 // make parent clickable and the child no display
 if (b[i].className=="children") {
 // search for parent li - check a few times incase the ul tags are heavily formatted
 var p=b[i].parentNode.parentNode;
 b[i].style.visibilty="hidden";
 b[i].style.display="none";
 p.onclick=function(event) { return kpg_colpage_context(event);}
 }
 }
 //} catch (ee) {}
 }
 // set the onload event
 if (document.addEventListener) {
 document.addEventListener("DOMContentLoaded", function(event) { kpg_colpage_action(event); }, false);
 } else if (window.attachEvent) {
 window.attachEvent("onload", function(event) { kpg_colpage_action(event); });
 } else {
 var oldFunc = window.onload;
 window.onload = function() {
 if (oldFunc) {
 oldFunc();
 }
 kpg_colpage_action('load');
 };
 }
Posted in Uncategorized | Leave a comment

 

PHP Code to convert RTF to TXT

I wrote some code for a project that strips out the formatting from RTF files, leaving the text behind. Since I found nothing on the nets that worked, I had to roll my own. This may not work with all RTF files as I have a limited test set.

I post the code at PHP RTF to Text Converter.

Posted in Uncategorized | Leave a comment

 

My 5 Minute WordPress Theme

I have a page describing how to make a web page, any web page, into a wordpress theme in about 5 minutes. I have bypassed the way themes are normally created and put it all in one page with four include files. Everything is cut and paste so that someone with limited PHP can make it work.

I used my Zombot page as an example. It works.

Let me know if you find any bugs.  I had some weird nesting errors for a while and then they went away. I know that software doesn’t heal, but it passes validation

Posted in Uncategorized | Leave a comment

 

No Right Click Images plugin activity

All of a sudden my plug-in that deters images scarfing has been getting lots of downloads. I searched, looking for a clue, but I can’t find any references to the plug-in on Google.

This is one of my JavaScript plug-ins. My Open In New Window Plug-in is the most popular one of these, but I just wrote one that collapses large Page and Category trees using nothing but JavaScript and I expect to see that approved soon by WordPress. I’ve already used the same code in a non WordPress application to collapse menus. It is dead simple and solved a common problem that always occurs in complex sites.

I enjoy writing plugins using JavaScript to control the User Interface. That’s what JavaScript is there for. I don’t use any of the popular Javascript frameworks. I roll my own and keep it light, fast and simple. I much prefer this to messing with the underlying PHP code.

Posted in Uncategorized | 4 Comments

 

Databases that I can make available.

I put up Astrology Terms, Bread Recipes, Cancer Terms, Chocloate Recipes, and Frank Sinatra Lyrics for downloading. This is quite a bit of content.

I still have the following archives. If you are interested I can email them to you. Some are large and have thousands of entries. This is more than enough content to create huge websites. They may make you some money if you set up the SEO correctly and link to affiliates and click revenue ads.

I will not put these up for download, yet. I have to decide if there is way to charge for them.

cosmetic surgery – one line terms
crafts – lots of interesting craft projects from UseNet
diet – short list of one line diet terms
dreams – 2200 dreams from an old dream book.
drugs – Drug terms – one linerselectronics – very dated list of PC and electronic terms.
fitness – 150 Fitness term definitions.
herbs – 130 descriptions of common herbs with their uses in rustic medicine.
HUDLending – From the Hud website, a dictionary of HUD lending terms
Inspiration – 428 inspiring stories, most about 800 bytes.
insurance – dictionary of about 120 insurance terms.
jokes – about 1200 awful jokes. Many are racist or sexist. Some are obscene. This evidently was taken from UseNet groups and never edited. I tried deleting the worst ones for a while, but they make my eyes bleed. Guaranteed traffic if you put this up, but do you want that kind of person on your website?
occult – Various Occult topics.
patents – dictionay of patent terms
pop – 60,000+ song lyrics. I can break it out by artist, but I won’t release the whole thing as it would not be good for a WordPress install.
saintssinners – 138 biographies of famous people who were either very good or very bad. Averages about 5,000 characters per entry. Lots of content here.
sermons – 137 sermons. Some are several pages long. Some have different topics in each sermon. Most are vanilla Christian topics that could be used in any religion.

Posted in Uncategorized | 6 Comments

 

Instant Content Free Data

You can use the Instant Content Plugin to create pages or post from these files.

Download the file that you like and then upload it to the instant-content-plugin directory under wp-content/plugins.

Astrology Terms. 983 short descriptions of Astrology terms.
example:
“PLUTO IN TAURUS (1851-1882)
A resourceful, industrious generation. Interest in material wealth, banking and finance.”

Bread Recipes. 3603 bread recipes from usenet forums.
example:
“Rye Bread Cornstarch Topping
Recipe By :Secrets of a Jewish Baker
Serving Size : 1
Preparation Time :0:00
Categories : Bread-Bakers Mailing List Miscellaneous & Tips
Ingredients
————-
1 cup water
2 tablespoons cornstarch
1/4 cup water
While bringing 1 cup water to a boil, dissolve 2 Tbsp cornstarch in 1/4 cup cold water; whisk into boiling water until mixture thickens. Brush on loaf before slashing & placing in the oven, and again as soon as you take the bread out of the oven.
This glaze makes a wonderful crackling sound as the bread cools, a fine reason to sit down and enjoy your blessings after a hard day at the breadboard!
From Haacknjack.at.aol.com”

Cancer Terms. 4368 cancer and medical terms. Mostly short.
example:
“DCIS
Ductal carcinoma in situ. A noninvasive condition in which abnormal cells are found in the lining of a breast duct. The abnormal cells have not spread outside the duct to other tissues in the breast. In some cases, DCIS may become invasive cancer and spread to other tissues, although it is not known at this time how to predict which lesions will become invasive. Also called intraductal carcinoma.”

Chocloate Recipes. 168 Chocolate Recipes from UseNet.
example:
“Butterfinger Bars

Ingredients
2/3 cup white sugar
2/3 cup white corn syrup
1 (16 ounce) jar crunchy peanut butter
3 cups cornflakes cereal
2 cups milk chocolate chips

Directions
1 Heat sugar and syrup together in heavy pan until boiling. Add peanut butter. Mix until well blended. Pour over corn flake cereal , coating the cereal well.
2 Press into a 9 x 13 inch pan. Melt chocolate chips in a small sauce pan. Spread over batter. Chill for 20 -25 minute. Cut into bars”

Posted in Uncategorized | Leave a comment

 

Based on the 5 minute Roll Your Own Theme