Gamestyle is awesome

One of the sites I work on Gamestyle.com, just recently got a face lift. I suggest you all go check it out.

Commented on “Gamestyle”

might have to check this one out!

Originally posted as a comment
by davidoff86
on Gamestyle using DISQUS.

Snow!

So when I woke up this morning everthing was White again. Oh joy.
Normally this would be exciting but after this months silly bad weather, I don’t wanna see snow for a long time! O well!

She’s Got Issues Gig – Wednesday 10th February

She’s Got Issues will be perfoming live at the Ladybridge Club In Cheadle Hume on Wednesday 10th February. The gig has been organised by BOTB 2010.  Stage time for the first band is at 7.30PM, with tickets priced at £5 each.

If you are interested in coming, just drop us a message :)

Behringer AB200 Footswitch also up for grabs

I’m also selling this footswitch I no longer use:

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=250568602670

It’s a Behringer AB200, and can be used to switch effects pedals on/off, or creating custom loops of pedals  / amps

I shall be putting up more stuff soon – stay tuned!

Guitar for sale!

Just a quick note – I am selling my old guitar:

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=250568574743#ht_500wt_1182

Around a year ago, I upgraded the pickups to Seymour Duncan Alnico II Humbuckers (they are the same ones found in the “Slash” model Gisbon). I also redid all the internal wiring, and installed new switches and output jack that are of better quality than the originals.

The Guitar itself is in pretty good nick, so if you’re interested take a gander :)

[jQuery] AJAX site search using Yahoo BOSS

As part of the new version of Gamestyle, we needed full site search functionality. Instead of simply grabbing the contents of our database, we decided to utilise the Google, with the help of Yahoo BOSS. This takes your search term and queries Google’s search result pages, sending back an array of results.

The sample script provided by Yahoo was a little too clunky for our liking, so we re-coded it using jQuery. The resulting code base was only 30% of the size of the original, and much neater:

File: search.js
 
var appID = "APP_ID_FROM_YAHOO_BOSS";
var numResults = 8;
var site = "www.example.com";
var contentDiv = "#main";
var searchForm = "#customsearch";
 
function search_submit() {
    term = $("#searchterm").val();
    if (term.length == 0) { return false; }  
 
    $(contentDiv).fadeOut('fast');
    if ($("#search-content").length == 0) { $(contentDiv).after("<div id='search-content'></div>"); }
 
    $('#search-content').html('<h1 class="search-resultstitle">search results</h1>'
       +'<div class="search-searchedfor">you searched for &#8220;'
       +'<span class="search-searchedterm">'+term.substr(0,45)+'</span>&#8221;</div>'
       +'<a class="search-undo">&#171; Go back to original page</a>'
       +'<p id="search-loading"><img src="/media/images/loading.gif" alt="Loading" /></p>');
 
    $('.search-undo').unbind().click(function() {
      $('#search-content').fadeOut('slow');
      $(contentDiv).fadeIn('slow');
      $("#search-content").remove();
    });
    var APIurl = 'http://boss.yahooapis.com/ysearch/web/v1/'+term+'?callback=search_found'
      +'&sites='+site+'&count='+numResults+'&appid='+appID;
    $("head").append("<script type='text/javascript' src='"+APIurl+"'></script>");
    window.location.hash = '#top';
}
 
function search_found(o){
    $("#search-loading").remove();
    if(results = o.ysearchresponse.resultset_web){
      $('#search-content').append("<ul id='search-results'></ul><br class='clear' />");
      $(results).each(function(i,result){
        $('#search-results').append('<li><a title="'+result.title+'" href="'+result.clickurl+'">'+result.title+'</a>'
          +'<p class="search-abstract">'+result.abstract+'</p><p class="search-url">'+result.url+'</p></li>');
      });
    }
    else { $('#search-content').append("<p><br class='clear'>Sorry, but no results were found.</p><br class='clear' />"); }
}
 
$(document).ready(function() {
    $(searchForm).submit(function(){
      search_submit();
      return false;
    });
});
File: searchform.html
 
<form id="customsearch" action="http://www.google.co.uk/search">
  <div>
    <label for="searchterm">search</label>
    <input type="text" name="p" id="searchterm">
    <input type="submit" id="searchbutton" value="go">
    <input type="hidden" name="vs" id="site" value="www.example.com">
  </div>
</form>
File: search.css
 
#search-loading { margin:30px auto 0 auto; width:32px; }
#search-results { list-style-type: none; margin:20px 10px; padding:0; }
#search-results a { font-size:14px; }
#search-results li { margin:10px 0; padding:0; }
#search-results p { padding-left:10px; }
.search-searchedterm { font-weight:bold; }
.search-url { font-style:italic; }
.search-undo { font-weight:bold; cursor:pointer; }

This should be enough to get you started. If you need an API Key, these can be obtained from the Yahoo BOSS website. Be sure to also replace all instances of www.example.com with your domain.

For a live demo, have a look at this.

Greetings

So, I finally decided to make myself a blog (well everyone else is doing it!).

What to expect ? Bits of everything really :)

Stayed tuned….