|
Aug
15
2008
|
|
Wordspinner – Free Word Spinner Plugin for WordPress |
I got a couple of emails about my last article about the free spinner code, and have made a rather spiffy plugin for WordPress that will do the same thing on any posts or pages on the site.
You can grab it here: http://wordpress.org/extend/plugins/wordspinner/
There is an example of what it does in this page. Hit refresh on your browser and see if you can pick it!
See the included readme file for changelog and useage (it’s easy as pie).
UPDATE: 24th June 2010: BUG & PERFORMANCE FIX. Also, please now post questions at http://www.kythin.com/wordspinner2/
UPDATE 21st June 2010: Multiple Spinner support finally released!
UPDATE 26th Aug 2009: Just upgraded it to be compatible with 2.8.6


September 14th, 2008 at 10:09 pm
To have the spinner work for Text Widgets you need to manually edit line 611 of wp-includes/widgets.php so that instead of “echo $text;” it says “echo run_spinner($text);”
I just did that and now I can cycle affiliate ads that only take a text-widget to add or change. Woo!
September 27th, 2009 at 2:22 am
I really like your plugin, but have most of my content in custom fields, would it be hard to make it work with custom fields?
October 2nd, 2009 at 11:14 am
If it’s in custom fields, you’re probably calling them in the template somewhere, right? Use the same kind of logic as in the comment about text widgets and replace the bit in your template that outputs the custom field data with a function call to “run_spinner($whatever-the-variable-is-to-output-your-data)”. Does that make sense?
e.g. to output a spun version of all the custom fields, use this in your template:
echo run_spinner(the_meta());October 14th, 2009 at 12:25 am
yes got it working a treat, the only problem I had it would not spin with the seperator as a tilda? I had a older plugin that wont work with the new version of wordpress, I’ve just imported all those older stories into my new blog.
Any quick way of changing the ~ to a comma?
October 14th, 2009 at 1:35 am
Actually I used mysql to search and replace, thank’s once again this plugin is great!
October 18th, 2009 at 7:17 am
I love the idea of a built-in word spinner sitting right on my blog. But I’m having trouble with it for now. I am using this format to separate words { | }.
But I get this message: Warning: split() [function.split]: REG_EMPTY in (my domain stuff here)……/plugins/wordspinner/wordspinner.php on line 120.
Any chance you would tell me what this means? I would appreciate it very much. Thanks
October 19th, 2009 at 8:56 am
Glad you got that sorted weareunderscore, thanks!
Stanly, the reason that isnt working is because the pipe is a special character in regex and php, try using something else to separate the words (you can also do a mysql find and replace like weareunderscore did to fix all your posts at once)
- K
November 27th, 2009 at 12:17 pm
I installed your word spinner but for some reason it mucked up the short codes on my site. The short codes appeared on the web pages. Do you know what is happening here?
November 27th, 2009 at 4:00 pm
@Nik: Is it version 1.3 or 1.4? There was a bug in 1.3 that potentially overwrote Text widgets, and now there are completely separate widgets for Spinable text widgets, so you may have to copy/paste things from text widgets into one of the new Spinning text widgets.
Other than that all I can think of is that maybe the code you’re inserting contains reserved characters
December 19th, 2009 at 11:13 pm
Hi Kythin, Thanks for this great contribution.
I want the spinner to run once for each of post and not to change every time page loads. Is that possible ?
I am not good with PHP and prefer not to mess it up.
Thanks-
December 20th, 2009 at 2:16 am
@matias Probably, but it contradicts the point of my plugin a bit. The way to do it (if you have a php coder friend) would be to look up the wordpress API and find out what hook runs when an author saves the page, and then wrap that in a spin function call. The problem then is that you would lose all your other options in each set of brackets so you wouldn’t be able to re-edit the page in the same way, which brings it back to defeating the point of the plugin…
what you could also do, is use this page (or download the code and make the textbox much bigger for longer articles) whenever you want a new article spun once, then copy/paste it into your site;
http://www.kythin.com/misc/spin.php
I MAY add something like this to the options pane in a future update, just so it’s a bit less fussing around, but I’m pretty busy at the moment sorry!
December 28th, 2009 at 2:36 am
Kythin,
I must say that I am impressed. Simple, clean and very easy to implement. Kudos to you.
I have to ask, why did you use “[,]” instead of using the so called standard of “{~}” or the “|” characters?
And finally, is there a problem changing those three characters within the code? I see where I can change them I just thought I would ask so as to avoid any problems that you may have had.
Thanks again!
Buddy
December 28th, 2009 at 9:51 am
@siteblaster Thanks for the kudos! You can change the characters you want to use in the options in the WP admin, The pipe probably won’t work unless you escape it properly, the braces I think should be fine.
January 2nd, 2010 at 4:35 pm
Kythin,
Thanks for your previous response. I am trying to use this in my footer in a Text: Links widget but it is not working. I am using WP v2.9 so the previous usage instruction does not appear to work as altering line #611.
So is there a way that it can be used in a more direct way? Like
echo run_spinner([Keyword Phrase 1,Keyword Phrase 2,Keyword Phrase 3]);
Thanks!
January 2nd, 2010 at 11:35 pm
@siteblaster
You should be able to do something like:
$somestr = “[Phrase 1,Phrase 2,Phrase 3]“;
echo run_spinner($somestring);
It will still use whatever characters you have set in your WP options as the end and separation characters though, so make sure they’re the same.
January 3rd, 2010 at 1:41 am
Kythin,
Thanks for your time. If you would look at http://buddyshearer.com/ and then look at the Footer you will see what I am trying to do. Its as if the code is not being processed.
January 3rd, 2010 at 6:55 am
Hey Kythin!
I got it working! Never mind and thanks for your plugin.
January 19th, 2010 at 12:08 am
Hey Kythin,
I am having an issue with a couple of my seasoned plugins not working correctly (I missed them before). I was doing some spinning within some plugin’s CSS and HTML code. Works great in that capacity.
However, a couple of my plugins use short-codes which look like this {someshort-code]. It appears that WordSpinner actually tries to process this and thus that plugin fails.
I tried changing the WordSpinners delimiter but I have been met with error codes when I try spinning with them. I tried ” { , } ” as well as ” { | } “.
How would you change them to use a different escape sequence?
Would is work by just using dual brackets like [[phrase#1,phrase#2,phrase#3]] ?
Thanks for your time.
January 19th, 2010 at 2:25 am
@siteblaster: In theory that would work, if you set WordSpinner to use double brackets it should stop messing with your other shortcodes.
They could be anything, actually. They dont have to be the same character, and they dont have to be brackets, e.g. it could be set to use %$some*words*to*spin$% for all it cares. (untested, but should work!)
March 3rd, 2010 at 3:46 am
@kythin: I see you talk about not being able to use the pipe {|} unless properly escaped. Can you explain what needs to be done to accomplish that? Thanks!
March 3rd, 2010 at 9:28 am
it’s a PHP reserved character, so you would need to get into the code of the addon. You will need to add another str_replace(“|”,”\|”,$spintext); or something along those lines.
it would probably be easier to run a find/replace on your database than code it properly, which is why I didn’t spend any time on it in the first place
I’ll fix it in a future release (strapped for time in the forseeable future though)
March 14th, 2010 at 8:05 am
Hi I got the widget, but there is a small problem, when I am trying to make random words for various different links and I use the same words to spin, it creates “STATIC” wording like this (as an example):
Hi, I’m Jim
Hi, I’m Joe
Hi, I’m John
And I want it to do this:
Hello, I’m Jim
Hi there, my name is Joe
How are you? My name is John
Is there a way around this flaw, I don’t want it to create the same word or phrase over and over, I am trying to make random “keywords” for internal linking and it is making every keyword the same for each link.
March 14th, 2010 at 7:03 pm
Can you tell me the code you’re using to produce these? To make the links as you want above, you’d need 2 or more spinners, e.g:
(replace [,] with your own characters): [Hello, Hi there, How are you?], [I'm, my name is] [Joe, Jim, John]
March 27th, 2010 at 11:03 am
Best be a content puller that can spin it as well, helpful in creating a link wheel. I haven’t really even looked at this plugin but seems promising.
March 30th, 2010 at 5:16 pm
The plugin doesn’t pull any content, you have to write (or paste) it yourself. It’s out of the project’s scope, and my white hat, to build a content puller.
June 16th, 2010 at 8:25 am
Hi,
I love your plugin. It’s exactly what I was looking for! Thank you.
Is it possible to give this the functionality of two level spinning? Such as:
The [[bucking,kicking] [bronco,steed],[brown,yellow] [dog,mutt]] was just around the corner.
Thanks,
Alex
June 16th, 2010 at 9:28 am
Hey Alex; There’s a ton of emails about this so I will be looking into it, hopefully within the next few weeks.
June 21st, 2010 at 4:24 am
Hi- I would also very much like to see two level spinning included as I have many pre-formatted articles including this. In the meantime, what happens if you use two level spinning brackets (I suppose the brackets show up in the post, right? when would you be introducing two level spinning.
June 21st, 2010 at 5:46 pm
By popular demand, Wordspinner 2.0 has just been released, featuring multi level spinning
Please be sure to back up your spinner widget texts before updating, though I haven’t touched the code that handles them it never hurts to backup anyway!
June 22nd, 2010 at 5:42 am
Is there a maximum number of sets of spin syntax that Wordspinner 2 will support? If I use a standard length article with word replacement and one level of spin I get this error: Fatal error: Maximum execution time of 30 seconds exceeded in /home/****/public_html/wp-content/plugins/wordspinner/wordspinner.php on line 245
But if I use just a paragraph or two it seems to be fine.
June 23rd, 2010 at 8:42 am
Hi Pikachu,
I just tested it on an absurdly long article and it worked – took about 5 – 10 seconds to load – but it worked. Maybe you have an error in your syntax somewhere?
Edit: Or possibly your server is a slow machine?
Edit2: Pika can you please email me the article you’re trying to spin so I can test it properly – kythin {at} gmail. I’ll run it through my development version and see what’s going on!
- K
June 24th, 2010 at 2:22 pm
Hi Kythin,
Thanks for the update!
I also got the error message listed above. I have just found that you updated it again however. Was that a fix?
Alex
June 24th, 2010 at 3:08 pm
@Alex Yep that should greatly increase the performance and stop that error coming up!
June 25th, 2010 at 3:31 am
Sorry I wasn’t able to email a document but by the looks of it, everything works now! Pages are loading a lot quicker now thanks!