Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.3.5
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

wlk_sphereit

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

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 ( http://www.sphere.com/tools )

v 0.3.5 – fixed wlk_spherehead tag (was echo should be return). And fixed script embed validation.

v 0.3 – added linktext attribute to sphereit tag.

v 0.2 – had to add a new 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 />

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

<txp:wlk_spherehead />

Takes one argument:

  • leanings – Set to “political_dem”, “political_rep”, or “political_gen” for Left Leaning, Right Leaning, or general political info respectively. If you aren’t a political blog or don’t give a shit, then don’t set this.

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

<txp:wlk_sphereit />

Takes a few arguments:

  • auto – Set as either true or false. Tells wlk_sphereit to embed automatically (if threshold is true, must also meet threshold requirements….auto defaults to true),
  • threshold – Set as either true or false. Tells wlk_sphereit to obey a character-limit & word-limit threshold (defaults to true),
  • min_words – Set as a number. Tells wlk_sphereit the minimum number of words that must be in an entry in order for embed to occur, if threshold it set to true or has defaulted to true (defaults to 30)
  • min_chars – Set as a number. Tells wlk_sphereit the minimum number of characters that must be in an entry in order for embed to occur, if threshold it set to true or has defaulted to true (defaults to 500)
  • control_fieldname – Set as the name of a custom_field. Tells wlk_sphereit which custom_field to look in to see if the control word is set.

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.

Article Request Count:
Initially released:
06/07/2007
Posted here:
06 Jul 2007
Article modified:
11 Jul 2007

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern