Moved to: WoodyHayday.com
Woody Hayday

Fresh Ideas

Hi there! This is my old blog, I don't hang around here much.
You can now find me trying to mix things up here:
Visit WoodyHayday.com Subscribe To My Email List

Remove unwanted eBay strings from A2P [Auction2post] posts with Automated Editor

Free rules file with this post!

Do you use Auction2Post [A2P]? If you don’t its a wordpress plugin which automatically implants listings from ebay as wordpress posts, including affiliate links through the ebay partner network from which you earn a commission. Its quite useful. Read my post about it here. Anyhow if you don’t use the plugin you can pretty much skip this post, unless you use a similar thing which is generating all kinds of nasty strings you don’t want in your posts 😉

This post will show you how to sanitise your auction2post posts for annoying (and contract breaking) ebay auction strings, it even has 125 rules already in a file for import!

The problem

Auction2Post is great in lots of respects, its well written and does a prescribed job. Where it caused irritation for me is arguably after its done its job, after the wordpress plugin had created its posts. You see you can create posts via templates, which is great, it allows enough customisation for most, however I wanted a bit of text processing as often you are left with irritating auction footers and garbage text which make the user hit back or close at a displeasing rate (some of these ebay strings might actually make your Auction 2 posts sites break ebay partner network terms of service, its really worth sanitising your posts as I describe below!)

For Example:

My EBAY User ID: yah00002009

welcome to Our ebay Store shop

IF YOU ARE NEW TO EBAY OR DO NOT HAVE A PAY PAL ACCOUNT PLEASE CONTACT ME SO WE CAN HELP MAKE ARRANGEMENTS WITH YOU

The Solution

This problem with Auction 2 Post and wordpress is one of the reasons Automated Editor was born, to give a bit more freedom in text processing, wordpress filters are great but I don’t think filtering hundreds of ebay phrases like that is effective.

Posted in Affiliate Marketing, PHP, Projects, Search Engine Optimisation, Snippets, Software, Web Development, Wordpress Tagged ,

Facebook Like button not working or showing 0 likes

Got a facebook like button not working showing zero? Do you wan’t to add a facebook like button to your page that points to a facebook page (fanpage) rather than the page the likebutton is actually on? It is possible but you may have come across this facebook bug that I did.

Scenario’s are either:

  • Use facebook like button generator to generate code for a like button (sometimes even this bugs out..)
  • Use some service like ShareThis to generate code for a facebook like button
And when you stick it on the webpage:
  • It shows as Zero – Facebook likes ‘0’ even if you know that URL (that you installed it on, or fb page) has likes
  • It occasionally shows correct like count, but most of the time shows Zero [0] like’s
Investigate with:
After spending a few hours working out what was causing this 0 like problem on my facebook like button I narrowed it down to two problems people are experiencing:
Posted in Facebook Pages, Snippets, Social Media, Web Development Tagged ,

Automated Editor Released!

Automated Editor wordpress plugin
A nice small chunk of a project, Automated Editor is a wordpress plugin which allows you to automate some of the post editing process. Automated Editor wordpress pluginWritten to be lightweight and flexible it can do a lot with a little input. The plugin replaces a previous script/small app I had previously commissioned to offer automatic string replacement/removal from posts at point of publishing. With this public release version though it has had all the bells and whistles added to it, and will do some other useful tasks such as the following:

  • Replace one string with another (String replace) e.g. Replace ‘X’ with ‘Y’
  • Remove instances of a string (String remove) e.g. Remove all instances of ‘X’
  • Replace strings which match a regex rule with another string (Regex replace) e.g. Replace any numbers (^[0-9]{3}$) with ‘y’
  • Remove strings which match a regex rule (Regex replace) e.g. Remove any numbers (^[0-9]{3}$)
  • Prepend a string onto the front of a post (Prepend) e.g. Add ‘X’ to the top of a post
  • Append a string onto the back of a post (Append) e.g. Add ‘X’ to the bottom of a post
  • Add a post into a category (Add category) e.g. Add category ‘X’ to the post if its not already added.
  • Add a tag onto a post (Add tag) e.g. Add tag ‘X’ to the post if its not already added.
  • Change a posts date
  • Change a posts status

(Taken from here.)

If you want to read more about the plugin you can check out this post on, What is the point in Automated Editor or go right ahead and get it from wordpress.org or buy the professional version at AutomatedEditor.com.

Watch this space for a few posts on how I use the plugin, (it works fantastically well when rigged up with Auction2Post.)

Posted in Affiliate Marketing, Business, PHP, Projects, Social Media, Web Development, Web Technology, Wordpress Tagged ,

get_tag_name function for wordpress

get_cat_name is a simple useful function to get the category name from its id in wordpress, there isn’t one for tag (and you cant use the same one…) so here’s I adapted it for tags. TBH its super lazy to be using this, but meh. Uses get_term.

function get_tag_name( $tag_id ) {

     $tag_id = (int) $tag_id;
     $tag = get_term( $tag_id, 'post_tag'; );

     if ( ! $tag || is_wp_error( $tag ) )

          return '';

     return $tag->name;

}

I am writing Automated Editor, a wordpress plugin which will give you a bunch of pro automation possibilities, in case you were wondering.

Posted in PHP, Snippets, Wordpress

Firefox, why you mutate my css?

Quick post to remove the annoyance that is this bug from my short term memory, you would think this would work:

var newBGString = $(this).css('background-image');

…it does, but not in firefox. Say the background property was set to “url(someimage.png) top left no-repeat”, making the background-image property “url(someimage.png)” right? In every browser except firefox, yes, not for firefox. Firefox would set the var as “url(“someimage.png”)” and THEN complain that the var is not realistic when you go on to use it elsewhere.

Anyway ridiculous bug, almost as annoying is how simple, hacky and rough the fix is:

var newBGString = $(this).css('background-image').replace('"',''); 

So if your firefox doesn’t like background image swapping via js, try it, I guess…

Posted in Browser Compatibility, Javascript, Web Development Tagged ,

Namestation starts charging – Namestation.com review/alternatives

I remember it as MakeWords.com, a useful site which would usually suck hours of my life away showing me domain names I didn’t originally know I wanted/needed. It would usually come up with the results though, providing me with a decent domain for a new project or site. So when I wanted to dial in recently and generate some sort of short url domain for this blog and was redirected to namestation I had one of those “that’s not where I left it” moments.

So its moved, re-branded and been closed off. That is close off for free querying/use. I can understand why this has happened, being a successful domains generation site it was probably getting heavy traffic, perhaps badly converting traffic as webmasters/domain purchasers are likely to be saavy, likely to not click through affiliate links to godaddy and likely to load a few hundred pages (each with a hundred calls to whois registries) per click through (if they do click through.) Also the dreamer kids just messing about with domain names probably added to the load. So now it costs, $9 a month to be precise, not a shocking amount but probably enough to allow its owners at least break even.


Namestation, Worth $9 a month?
Posted in Business, Web Development, Web Technology

Southside Festival 2011 Playlist

Last weekend was Southside festival in Neuhausen Ob Eck, South Germany, it was a muddy, rainy, hot, (did I say muddy) few days. All the big bands were fantastic, for me Incubus, Portishead, Gogol Bordello, The Arctic Monkeys and Chemical Brothers smashed it.

Anyway if you have spotify and want to check out some of the epicness here’s a playlist of a bunch of the artists at Southside:


Click Me!

If your not a spotify user check out a few tracks on youtube below. Other highlights included dudes making tents into kites, the sun coming out and drying up the mud and becks being on tap everywhere!

Posted in Music, Travel

Audi A4 B6 (2002-200?) Fix for Airconditioning stuck on ECON mode (Replace High-Pressure Sensor/Thrust sensor G65)

I am no mechanic, not even close, but after a spout of successful self fixes on my Audi I thought I would post this, purely because when I was going about trying to fix this particular issue myself there was about 100 slightly different versions of solutions on google, of which a lot give misleading/confused advice. I figured as I fixed it I would take pictures in case it worked, and it did, so hopefully this post will be of use to you if you are in the same boat. Of course as I am no mechanic do this stuff at your own risk, in my case it was my last resort, the garage had no clue and the air-con man wasn’t sure!

So the symptom is the climate control getting stuck on ECON mode, the light stays on and whatever you do, this is how it happened in my 2003 Audi A4 B6 (1.9 Tdi sport), but apparently even same year models can have no high-pressure sensor, in which case it may be your regulator/compressor and a bigger price tag to fix.

Things you will need to fix: Patch Cable from ebay (sub £10), Laptop, VCDS Lite (Free), Torque bit wrench kit, 17mm spanner, replacement high pressure sensor (also called thrust sensor) and about 20 minutes.

First thing I would recommend is getting a patch cable if you haven’t already, you can get these off ebay for a few quid . Getting VAGCOM (VAG = Volkswagen Audi Group) to work can be a nightmare in itself but I would say your easiest (budget) way to get it up and working is to buy a usb patch cable (blue plastic most common) and then download VAGCOM Lite – its called VCDS-Lite, but it is essentially VAGCOM but tweaked down in what it will do, the best bit is its free and with these dumb patch cables it works out of the box. VAGCOM by the way is a software which reads/writes to your cars ECU, it does a lot but all you need it for here is to read/clear fault codes. Anyway there is plenty of good advice about VAGCOM / VCDS-Lite online, so google it, in this case load it up, test it and then go to “select control module” and click “08-Auto HVAC”.

Posted in Technology
The New Blog
WoodyHayday.com
A Quote..
"Learn from yesterday, live for today, hope for tomorrow"
Albert Einstein
Old Random Projects
    © Woody Hayday 2008-2024