Go to content Go to navigation Go to search

People

Businesses

Sphere...keeping me up at night 6 July 2007

I don’t know what got into me but here comes another plugin. This time, it’s for Sphere.com. Sphere is a search engine for blogs & other column & article separated content. This is an adaptation of the wordpress plugin for the Sphere Related Content Widget

Download it here

Using this plugin, you can get a sphere widget onto your textpattern site all quick-like!

Also….Uh…..this shit is GNU GPL etc etc, same as the original said.

Put this in the head of the pages that’ll have sphereIt embedded:

<txp:wlk_spherehead />

Takes one argument:

Then put this in the forms you’re using to output those articles:

<txp:wlk_sphereit />

Takes a few arguments:

The following must be read carefully. If people ask me about this on the forums, I’ll be annoyed.

  1. If auto is set to “false” and the control word it set to “true”, sphereIt will embed itself.
  2. If auto is set to “false” and the control word is set to “false” or left blank, sphereIt will not embed.
  3. If auto is set to “true” or you have let it default to “true” and the control word is set to “false”, sphereIt will not embed.
  4. If auto is set to “true” or you have let it default to “true” and the control word is set to “true” or left blank, sphereIt will embed itself.
  5. If number 1 or number 4 is the outcome but threshold is set to true & not met by the current entry (too few words or too few characters), sphereIt will not embed itself.
  6. If number 1 or number 4 is the outcome and threshold is set to false, sphereIt will embed itself no matter the entry content or length.

Put this in your stylesheet if you want:

a.iconsphere
{
	background: url(http://www.sphere.com/images/sphereicon.gif) top left no-repeat;
	padding-left: 20px;
	padding-bottom: 10px;
	font-size: 10px;
	white-space: nowrap;
}

That’s it. Let me know if you find bugs.

I found a bug. For version two I had to add some new instructions to the help for the plugin and added a new tag that can be used to replace the txp:body tag:

Use this in place of the txp:body tags, in your forms. It’ll place <!-- sphereit start --> & <!-- sphereit end --> around the body of your article. If place the sphereIt start & end manually around the txp:body tag in your form, you can don’t need to use this tag.

<txp:wlk_spherebody />

Sphere: Related Content

Comments

  1. If I used txp for my blog I would love to have this plug-in. I think Sphere is going to help a lot of blogs out there get some exposure. I’m using a Sphere plug-in on my WordPress blog. Keep up the good work Walker.

    Josh Minnich    Jul 24, 07:31 AM    #
     
  2. Josh, I based my txp plugin on the Wordpress version o the plugin. Once I converted it to slightly cleaner functions…it was easy!

    (Wordpress is dirty.)

    Walker Hamilton    Jul 26, 12:32 PM    #
     

Leave a Comment