If you haven’t already done so, please download the new version of WordBay. This is mostly important if you have been using geo-targetting as there was a pretty critical bug in v0.996 which managed to elude us for a whole month (geo-targetting is tricky to debug because you can’t go to India to test it!) - thanks to the users who spotted the problem. Namely, the geo-targetting was correctly identifying the visitor’s country but screwing up the dispatch location for items. So if they came from Belgium, they might get US-based items, or in some cases nothing at all. This is now fixed, and a new option added in the admin back-end - you can now choose whether the geo-targetting code will override your default dispatch country or not. You may not want it to do so - perhaps you are dealing in speciality items dispatched from Turkmenistan, and you want all visitors to see these, regardless of where they come from! More likely though, you are using “Any country” to expand your listings, and don’t want non-default country visitors being given limited listings just from their locale.
Just to add, I also added an id to the search box div so there is now a style for this in the CSS file. Someone complained that their search box was not showing, despite being present in the HTML. Probably the div is inheriting a setting from another div - maybe it has 0 height or something. So if you are having problems like this, or want to change the style of the search box you can do so by adding settings to the #WBsearchbox style, though I have not actually added any styling myself.
This also brings up another topic, namely that of html validity. I have read some complaints that the html of WordBay is pretty ropey. Yes, it’s terrible, I freely admit. And because the data is dynamically generated, if you have 20 eBay items then these errors get multiplied. I will do my best to improve validity in a future version - probably I can make it “almost valid”, though of course I do not know what doctype you are using in your template. I haven’t decided which to use myself - probably not XHTML 1.0 Transitional as this has some limitations…
Anyway, keep earning with eBay, WordPress and WordBay and a big thanks to the users who have cut me in a little bit using the revenue sharing option I left open - otherwise I would have ditched development on this long ago probably.
Posted on October 20th, 2008 by markowe
Filed under: Uncategorized
Cheers for the fix.
You need to find some more web proxies for testing
Regards income… my sites will “cut you in” but they are not properly running yet… give it a little time though
with luck this plug be paying its way in a year or so LOL..
Is it possible to apply a timeout on the geo-targeting look up?
My pages have been very slow to load today and are displaying errors:
Warning: fopen(http://api.hostip.info/country.php?ip=xxx.xxx.xxx.xxx) [function.fopen]: failed to open stream: Connection timed out in /home/xxxx/public_html/wp-content/plugins/wordbay/WordBay.php on line 76
Warning: fread(): supplied argument is not a valid stream resource in /home/xxxx/public_html/wp-content/plugins/wordbay/WordBay.php on line 78
(perhaps hostip.info is huffing with me?)
Jez, well thanks in advance, though don’t feel obliged, you’ve helped plenty with the development of this.
Speaking of which, do you have any suggestions for the timeout problem Chuck mentions - I am not too clued up on these remote operations with PHP? It’s true, I do need to code for the possibility of hostip.info being down - I think you mentioned that right at the start.
Hi. I found your plugin on a forum. There was a post in the forum that I thought was a fantastic idea. Here it is…
=============================
Loving the search box in this plugin, nicely done.
One tip i reccommend doing though is to place buy.php in the root folder and then editing wordbay.php where it says:
Code: $buyurl = get_bloginfo ( ‘wpurl’ ) . “/wp-content/plugins/WordBay/buy.php?”;
and change to:
Code: $buyurl = get_bloginfo ( ‘wpurl’ ) . “/buy.php?”;
Then the URLs will look like:
http://your-site.com/buy.php?buyurl=***
===============================
I think this would be a great idea to implement as a setting. Tell the blogger to copy the buy.php script to the root, and then have a setting that says “use root path” or some such.
Thanks
Ill have a look into it… I know its a problem, also I think the last version I gave you used CURL instead of fopen… can you check whether that is in your latest version?
Jez
Hey
I have the recent version of wordbay but when I type the words in quotes to show specific items it always says “no items to display” even though there are listings with the exact words.
How do I get this to work properly?
thanks
Not sure what version you have there, but here is what I have…
At line 15 is the function “countries()”:
function country($path){
$path .= “wp-content/plugins/wordbay/countries.txt”;
$cFile = file($path); // read in file
for ($i = 0; $i < sizeof($cFile); $i ++){
$line = explode(”|”, $cFile[$i]);
$locals[$i] = $line;
}
return $locals;
}
Directly after that insert another function “grabber()”:
function grabber($url) // grabs the web page
{
$content=”";
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_TIMEOUT, 2);
$content = curl_exec ($ch);
curl_close ($ch);
return $content;
}
not the line
curl_setopt ($ch, CURLOPT_TIMEOUT, 2);
that shoudl set the time limit to 2 seconds… change it to whatever you feel is appropriate
Then change the GEO bit starting around line 81, raplacing that “fopen” “$fp” junk with a call to “grabber()”:
if ($WBOptions[’geo_on’] = TRUE) // are we geo-targetting?
{
// start mod JH - identify visitor country
$locals = country(”");
$userCountry = grabber(’http://api.hostip.info/country.php?ip=’ . $_SERVER[’REMOTE_ADDR’]);
for ($i = 0; $i < sizeof($locals); $i++){
if ($userCountry == $locals[$i][1]){
$first_siteID = $locals[$i][2];
$first_placementID = $locals[$i][3];
$first_location = $locals[$i][6];
break;
}
}
// end mod JH
I have not been able to see how this handles a delay as its been running fast lately… it “should” just use the default setting if it cannot get the file in 2s ….
Jez
any chance you could have a look at my question please?
Also, if I set up a campaign through ebay uk on my epn dashboard then set wordbay for geotargeting will it still provide commissions for ebay us only if I’m signed up with them?
thanks
Hi,
Sorry, were you referring to another question that I can’t see here?
As for commissions through US eBay, no, I believe you can only get commissions through eBay US if you are actually signed up with them.
What I am not sure of is, if your visitor clicks through to UK eBay and then subsequently registers on US eBay, whether you get the commission for that. I suspect not.
Gotcha, sorry, the previous question was stuck in the approval queue.
I tried to address some possible causes of no items coming up in another thread - have a look here: http://www.itsgottabered.com/wordbay/wordbay-bugs-and-to-dos/
See if anything there helps and get back. I can only say that I have on occasion had this happen and it’s always been due to the wrong combination of category, eBay location and keywords, so I’m hoping that’s all it is!
Hey, Walt, sorry, I didn’t catch your post earlier - it got guzzled up by Akismet thinking it was spam (I had to implement Akismet, I was spending way too much time fighting spam comments).
Yes, that is a good idea, definitely, I have done it on some of my sites. I didn’t implement it in the official release of the plugin because I wanted to make it as simple as possible. I feared that people who are not so technically-minded might get lost if I told them to start copying files around.
One thing I thought of was that I could add a field in the backend where the user can specify what the name and path of his “buy.php” file was - I will think about that!
That would be great. Thanks for considering it.
I have a real general question. Do you think it’s better to implement Wordbay on static pages, or as posts under categories? I can see benefits either way (especially with top level categories installed for the posts). I’m just not quite sure which is better as far as SEO is concerned.
Thanks for your thoughts
I was looking at the following site - http://www.japjunk.net/store/ - which is powered by PHPBay, and I was wondering if you could explain how to get the special image effects using WordBay. Or, if it can be done using the shipped CSS files?
Hi. That effect CAN be done in CSS - I am hopeless at CSS, but that would be a more efficient way. Basically, you make the link surround the whole “product” block and then change its background color for the ‘hover’ style in the css.
However, this site does it an easier way, through JavaScript, by adding:
onmouseover="style.backgroundColor='#e8e8e8';" onmouseout="style.backgroundColor='#ffffff'"to the main TD (table cell) element. This works very well, except with browsers where JavaScript is disabled, though these are rare admittedly…It would actually be pretty easy to add this to the existing WordBay plugin - (you would add the same code to the DIV id’d as “CLASS = ‘firstlocaleitem’” in the code) will consider for the next version. If you know anything about PHP you could add this yourself pretty easily.
Check out the new version - most of these features implemented! http://www.itsgottabered.com/wordbay/2008/new-version-v0998-timeout-errors-resolved-added-options/