Invent

Anthony


Bouncy Radio Center 9 Sidebar Hook

sidebarhook I’ve been a bit quiet lately and that is because i have been hard at work on the new Bouncy Radio Center. each time i complete a new feature I’m hoping to publish an article about it here at anthonykinson.co.uk.

So, I’m happy to announce that the Sidebar Hook for the new radio center is now completed. (see left image)

I’ve kept it nice and simple and it will have its own settings groups so you can totally customize it to how you want it. Also i have created some brand spanking new icons for it, kept the code really clean and fast.

And with that onto speed, The new radio center actually performs over 500 times faster than the previous version 8.2 which is a combinations of a few things. First of all i have cleaned up necessary coding and optimized functions to dramatically reduce load times, and IPB’s great new forum software.

Despite all the cool new features and sleek JavaScript with the new IP.Board, it performs surprisingly faster than its previous 2.3 version.

Anyways, coming up in my next article i will be going through some of the bigger core functions of the new Radio Center, including the all new History and Schedule pages!

Thanks for reading and i look forward to hearing some feedback!

Anthony

Read more...


Bouncy Radio Center v9.0 Beta Preview

With IP.Board v3 not far away it is finally time to make a move and start writing all the apps for it and where better to start than with the ever popular Bouncy Radio Center.

Bouncy Radio Center v9 Beta Preview

So there is the preview, now for the information on what’s changed so far.

First of all the left column has had a major change, The members avatar is no longer shown and has been replaced with a radio status image and below 2 of IP.Boards new style percentage bars showing current listeners and peak listeners.

Below this we have the tune in links, eventually these will each have there own little icons to the left rather than the temporary on that shows in this preview. Below this you can then see a new feature also. This is the Radio Availability display and gives a visual and textual representation of how many tune in slots are available on the radio. if there’s more than half of total slots available it will show green, if its around half it will show a grey neutral colour, and below half will show red.

Moving further down the left column is the new status layout. Basically there will be 3 types of DJ’s. Resident DJ’s which are DJ’s with permanent, regular or scheduled slots on your radio. Then there is also Guest DJ, which is for DJ’s who do one off shows, or fill in for other DJ’s and have no set schedule or show, and finally, Not A DJ which is pretty much self explanatory.

Things on the main column look pretty much familiar with a few exceptions. There’s a new Radio announcement bar at the very top of the main window, allowing you to quickly post any important radio related messages to people, such as a show cancellation and a slot needing filling, or if your looking for DJ’s like in the preview above.

The main tabbed area will also be changed. I am currently deciding on a new approach for this. In older versions tabs used a custom AJAX query so that no page reloading was required, this however while beneficial displayed a few problems. Firstly the data on the page such as radio status was not updated whilst changing through tabs, and you could not link directly to a tabbed page. Due to this there is a good chance the functions of this are going to be completely re-written meaning you can directly link to tabs.

Finally we have 2 small boxes below the main window. These are information on the current radio show playing, and the current DJ. Current Show Information shows the DJ who’s on air, the show or song they are playing, and the genre of the show. To the right we have the DJ Contact Information, This contains website and messenger fields, both of which are specified in the SHOUTcast plug-in under “yellow pages” when connecting to the radio.

The new Bouncy Radio Center will also support plug-in modules, allowing owners to create there own custom tabs and plug-in’s for the radio center, as well as custom hooks and admin modules. Additional Hooks and Modules will also be available from BouncyServers for licensed customers. In addition to this i will also be providing some variable documentation to assist in the creation of custom modules.

Check back soon for a preview of the front end global bar and board panel preview and i hope your are liking the new Bouncy Radio Center so far. If you have any comments or suggestions please feel free to leave them on this article.

Read more...


Bouncy Xbox LIVE Gamertar GD code explained

If you don’t already know Bouncy Xbox Live is a new script from BouncyServers which allows your community to add there Xbox Live gamertag to your forum so that your community can easily find and play games with other members.

One of the cool features which was included with Bouncy Xbox Live was the Gamertar. This was basically a small dynamic avatar image which was generated on the fly using a background image and the members Xbox Live avatar. This meant that because it was generated on the fly, the Gamertar would always display the gamers latest avatar style such as hair, clothes and facial features.

To the left you can see my current gamertar, this will automatically change if and when i update my Xbox live avatar. This uses the default Bouncy Xbox Live Gamertar background with a grey border and a golden glow.

Onto the technical stuff.

The gamertar is generated using 2 PHP functions and the GD image library.

The first function is called create_gamertar()

function create_gamertar ()
{
//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this->ipsclass->input['tag'];
$gamertag = ereg_replace("[[:space:]]+", "%20", $gamertag);
//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng("{$this->ipsclass->vars['img_url']}/bxbl_images/gavbg.png");
$img_b = "http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png";
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}
//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this->imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);
//---------------
// Output Images
//---------------
header("Content-Type: image/png");
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);
}

pretty straight forward function so lets go over each step

First of all

//-------------------------
// Fetch And Clean Gamertag
//-------------------------
$gamertag	 = $this->ipsclass->input['tag'];
$gamertag = ereg_replace("[[:space:]]+", "%20", $gamertag);

as mentioned in the quote, this fetches and cleans the gamertag, this has to be done firstly because gamertag’s can contain spaces between characters, and secondly because sometimes i like to obey the standards. So this function first of all saves the members gamertag in the $gamertag variable and then converts any spaces to %20 so it would turn “Anthony Kinson” into “Anthony%20Kinson”.

The next piece of code…

//-----------------------
// Fetch Gamertar Images
//-----------------------
$img_a = imagecreatefrompng("{$this->ipsclass->vars['img_url']}/bxbl_images/gavbg.png");
$img_b = "http://avatar.xboxlive.com/avatar/{$gamertag}/avatar-body.png";
//---------------------
// Set Max Avatar Size
//---------------------
$width = 80;
$height = 160;
//--------------------
// Get New Dimensions
//--------------------
list($width_orig, $height_orig) = getimagesize($img_b);
$ratio_orig = $width_orig/$height_orig;
if ($width/$height > $ratio_orig)
{
	$width = $height*$ratio_orig;
}
else
{
	$height = $width/$ratio_orig;
}

OK, so nice brief explanation. img_a grabs the Gamertars background image i previously mentioned from the forums skin directory (this allows a different background for each installed skin) and img_b retrieves the members avatar using the previously formatted gamertag.

After this the avatars width and height are edited, this allows us to shrink the avatar so it fits in the Gamertar. The next block of code sets the new dimensions maintaining the aspect ratio.

//----------
// Resample
//----------
$image_p = imagecreatetruecolor($width, $height);
imagecolortransparent($image_p, imagecolorallocate($image_p, 0, 0, 0));
imagealphablending($image_p, false);
imagesavealpha($image_p, true);
$image = imagecreatefrompng($img_b);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);

The above code then resample’s the image whilst maintaining aspect ratio and pixel transparency within the png. This lead to a problem and the creation of the second function imagecopymerge_alpha(). As it goes, when you merge 2 images using GD in PHP specifically PNG images, the transparency is lost, resulting in a solid black background being applied to the avatar image, the problem with this is that it just creates a cropped avatar with a black background and the gamertar background is not visible.

//---------------------------------------
// Copy, Merge, Resize With Transparency
//---------------------------------------
$this->imagecopymerge_alpha($img_a, $image_p, 0, 0, 10, 10, 64, 57,100);

This is where the above bit of code comes into play. This bit of code then sends our avatar to the imagecopymerge_alpha() function with all the data needed.

So, here is the imagecopymerge_alpha() function…

function imagecopymerge_alpha($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct){
if(!isset($pct))
{
return false;
}
$pct /= 100;
//---------------------------
// Get Image Width And Height
//---------------------------
$w = imagesx( $src_im );
$h = imagesy( $src_im );
//-------------------------
// Turn Alpha Blending Off
//-------------------------
imagealphablending( $src_im, false );
//-----------------------------------------
// Find The Most Opaque Pixel In The Image
//-----------------------------------------
$minalpha = 127;
for( $x = 0; $x < $w; $x++ )
for( $y = 0; $y < $h; $y++ )
{
$alpha = ( imagecolorat( $src_im, $x, $y ) >> 24 ) & 0xFF;
if( $alpha < $minalpha )
{
$minalpha = $alpha;
}
}
//----------------------------------------------------
// Loop Through Image Pixels And Modify Alpha For Each
//----------------------------------------------------
for( $x = 0; $x < $w; $x++ )
{
for( $y = 0; $y < $h; $y++ )
{
//-----------------------------------------------------
// Get Current Alpha Value (Represents The Transparency)
//-----------------------------------------------------
$colorxy = imagecolorat( $src_im, $x, $y );
$alpha = ( $colorxy >> 24 ) & 0xFF;
//--------------------
// Calculate New Alpha
//--------------------
if( $minalpha !== 127 )
{
$alpha = 127 + 127 * $pct * ( $alpha - 127 ) / ( 127 - $minalpha );
}
else
{
$alpha += 127 * $pct;
}
//-----------------------------------
// Get The Colour Index With New Alpha
//-----------------------------------
$alphacolorxy = imagecolorallocatealpha( $src_im, ( $colorxy >> 16 ) & 0xFF, ( $colorxy >> 8 ) & 0xFF, $colorxy & 0xFF, $alpha );
//---------------------------------------
// Set Pixel With The New Colour + Opacity
//---------------------------------------
if( !imagesetpixel( $src_im, $x, $y, $alphacolorxy ) )
{
return false;
}
}
}
//---------------
// The Image Copy
//---------------
imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h);
}

There is no point in me going over each detail of this function, it pretty mush stays the same however you use it. As you can see from the code quotes it basically finds the most opaque pixel and then calculates the new alpha blending. After which it is returned back to the create_gamertar() function. and is output through the following final piece of code

//---------------
// Output Images
//---------------
header("Content-Type: image/png");
imagesavealpha($img_a, true);
imagepng($img_a, NULL);
imagedestroy($img_a);
imagedestroy($img_b);

Above again is pretty simple. It just sets the output content type, in this case, its a PMG image.

This code can be pretty much be used stand alone, of course though, you will need to create some sort of switch or post info so for example the URL http://yoursite.com/gamertar.php?gamertag=Anthony%20Kinson would set the gamertag to be used as Anthony Kinson something maybe like $gamertag = $_POST[‘gamertag’];

its completely up to you how you go about it, but these are the basic principles to how the gamertar is created.

Read more...


Dollar vs. Pound

Dollar vs Pound For most people current exchange rates mean nothing at all, for me, the current rates are a nightmare.

Problem being this so called crisis in the world with money, which as a result, has led to massive drop in the USD –> GBP exchange rates.

Now, not so long ago, about 2 months ago, we was looking at approx 1.9 USD to 1GBP, This meant that if for £100 I would get something worth $190 (approx).

over the last 2 months, these exchange rates have dropped severely. were now looking at 1.4 USD to 1 GBP meaning for the same £100 you only get something worth $140.

This effects me in a big way, as all my servers are based in Dallas, Texas. I have to pay them in Dollars.

Lets just say its costing me around an extra £1000 a month, because of the exchange rates!

I don’t understand what causes the decline, personally, money is money and is always worth the same to me.

Surly if the pound got strong, or become more valuable, then when we do our local shop in ASDA, shouldn’t we be paying less for our shopping?

Exchange rates and currency are nothing more than frustrating.

Read more...


Bouncy Radio Center v8.2 Released

Were pleased to announce the release of Bouncy Radio Center v8.2 tonight as it brings some nice performance increases as well as a new look.

Version 8.2 now supports 2 licensing methods, either of which you can choose from within the Radio Center settings. The licensing methods are:

1: Remote sockets
2: Local Key

both have there benefits. Remote sockets uses your license key to contact our licensing server to authenticate your license and Local Key uses a key file uploaded to your web space to validate your license. Local Key provides the best possible performance and causes no interruption if your server is busy or the licensing server does not respond, however, the license key needs to be replaced with a new key every 30 days to keep things nice and secure. The Remote Sockets method will contact the license server on every page view of your forum. this can cause quite a bit of traffic to and from the licensing server, but this method requires no updating every 30 days.

In addition to the much awaited licensing methods, we are happy to introduce 7 new skins for the live stream player. and taken note of some requested features to help make your life a little bit easier.

You will now find 3 new settings for the Live Stream player. They are as follows:

1: Live Stream Player Skin
2: Live Stream Player Width
3: Auto Play Live Stream

this solves 2 issues people were having with the live stream player, first of all when the forum used a fixed width or a short width, the live stream player on the board panel would cause the tables to stretch and required editing of template bits in several locations. Now you simply adjust the width from the above setting.

Auto play was another issue, some people like to have it auto play so visitors are constantly drawn to there radio stream. while collapsing the radio panel stopped this, it wasn’t very practical, so now you have an option to enable or disable auto playing of the live stream player.

These 2 settings only affect the player on the main board panel, after all, if a visitor clicks to tune in with livestream, you obviously want it to auto play, and as its displayed in a pop up window, the width does not need to be adjusted.

Height wise we have coded in fixed heights for each skin, so selecting a skin will auto adjust the player to the correct height.

If you find any bugs in this version of the Bouncy Radio Center, please report them over in the bug tracker at BouncyBootlegs here http://www.bouncybootlegs.co.uk/forum/index.php?autocom=tracker&code=show_project&product_id=1

If you have any questions or problems or would like us to upgrade you, please contact the Bouncyservers support department by submitting a support ticket from our main client area.

We hope you and your visitors enjoy the new features as much as we do!

Read more...


Bouncy Radio Center v8.1 Released!

Finally its released! below you can see what has changed and been added

New Features

  • New Apply As DJ Application page added
  • New Flash Powered Live Stream Player added
  • PHP powered Tune In links

Bug Fixes

  • Web Hits number formatting applied (10000 to 10,000)
  • Stream Hits number formatting applied (10000 to 10,000)
  • Stats Tab number formatting applied (10000 to 10,000)
  • Licensing function class with YouDude has been resolved
  • Language typo’s fixed
  • Copyright year and version method fixed
  • "Online" images in radio panel center and right cells would replace any CSS background images for that class, this has been fixed
  • "Powered By BouncyBootlegs" line in the radio center’s footer has been changed to "Licensed to *your site name*"

Changes

  • 5 settings removed for tune in links, configuring of tune in links is no longer required.
  • 7 new settings added for DJ Application page.
  • Get Codes page content has been changed to reflect new tune in links
  • new template bit added for DJ Application page
  • HTML cleaned up in the radio_panel template bit
  • HTML cleaned up in the show_page template bit
  • Minor performance improvements made in coding
  • New entries into the language file

 

All v8.0 customers with an active license will get a free upgrade and files can be found in their Licensing Client Area by viewing there license.

New customers can get their copy of Bouncy Radio Center v8.1from the Radio Center Order Page.

Installation & Upgrade Instructions can be found at the Radio Center Project Page.

You can see the new version live in action over at BouncyBootlegs

Read more...


Bouncy Radio Center v8.1 (Progress Report 1)

So, time for an update and time for some new features to the ever popular Bouncy Radio Center v8.

Radio DJ Application

dj application

The new DJ Application page takes away the extra work load involved with getting new DJ’s involved with your radio by allowing members to fill in a form providing information on the radio show they want to broadcast and a link to a demo of there work.

The form is protected from guests meaning only registered members of your forum can apply to be a radio DJ. Admin also have 3 methods to be informed of new applications, any combination of the 3 options may be used. The first option is to create a topic in a specified forum containing the applicants information. The second option is for a PM to be sent to a specified member ID, for example if you have 1 person who deals with radio DJ’s you can have information from the application sent to them in a Personal Message. The third and final option is to have a copy of the application emailed to a specific email address.

The new application page also includes some protection to help prevent any problems or malicious use. First of all if any of the form data is failed to be submitted when the application response page is accessed you will receive an error message. Three rules are used in this function to check form data is submitted before anything else is processed.

dj ap 3 checks

As you can see above, the first "IF" Statement sets a global rule for the function, this basically says that if this page is accessed without the submit button being clicked on the application page then display the error message "no_form"data". This then results in nothing else in the function being processed. If the submit button has been clicked then the function moves on to the next 2 "IF" statements. The first checks to see if the user has submitted information about there show, if not an error is returned stating information was missing. If they have provided show information the next rule is checked, which ensures the applicant submitted a demo URL. If all these rules are correctly applied upon submission the form data is then passed onto the rest of the function which checks which of the 3 Notification methods are selected and then passes on the form data to them functions.

Initially I set up a CAPTCHA on the form, but this was proving to be more work than it was actually worth. Due to the fact only registered members can submit applications it wasn’t really needed as any members abusing the system could be warned / banned / suspended using IP.Boards built in admin system.

New PHP Powered TUNE IN Links

So a big part of the Bouncy Radio Center people were having problems with was the tune in links and the files edits and setup involved with them. Also there was an issue with .htaccess files and some tune in links not launching in the desired player. This proved to be one of the biggest problems people were having and generated a lot of traffic in our support department at Bouncyservers. To achieve this I simply create a new set of cases in the radio switch, and then created functions for tune in link. Functions are short and simple, and also allowed me to remove some of the admin settings reducing clutter, remove some now code from the main radio function file and the global file.

In addition to this, users no longer have to edit any files to get there tune in links working properly, no .htaccess file is needed and no additional MIME types need to be set on the server. This has also opened up new capabilities. For instance I should now be able to get the radio center to monitor and display which members are tuned in. This was before a very difficult process, because it involved grabbing IP addresses from the SHOUTcast server, then comparing them to IP Addresses in the forums online list. This however would not of been 100% accurate as some members could be using the same IP address.

What Next?

Well at the rate I am currently working, we could see a release of Bouncy Radio Center 8.1 tonight, followed shortly by a new icon pack for dark Skins. I’m currently working on a few other features such as the above mentioned online list, having another look at AJAX functionality for the radio panel and display.

I also have some other things planned for the radio center which may not be implemented until a later version. This includes a whole new admin section within the forum, to provide admin’s and DJ’s with complete management over there schedule, DJ’s and so on. I am also looking into creating a whole new schedule system, the current schedule page isn’t to friendly to skins with short fixed widths. The code involved with the schedule is also VERY tedious! as I say these may come in a later release.

You can check out the progress of the radio center’s current development at any time over at the BouncyBootlegs Radio Center.

If you have any questions, suggestions or comments, please feel free to leave a comment in this article and i will be sure to check them out.

Bouncy Radio Center v8.1 will be free to all Bouncy Radio Center 8 license holders with an Active License. This also apply’s for all new icon packs.

Read more...


Hello world!

Hi,

I’m still working on the new site, so please bare with me, i’ll be back up and running before you know it!

Anthony Kinson

Read more...


BeatGeekz – Put Salsa On It (DEMO)

Read more...


Anthony Kinson – Aerith’s Theme (Euphoric Mix)

Here is a quick track I made, This is my version of one of the old tracks from the Final Fantasy 7 game on the Playstation 1 from years ago. Was a game I loved, and I thought I’d remix one of the tracks, So here is my first ever attempt at a Euphoric track.

Please note that this track is a loop, I’ve not produced it as a track to be played on the radio or to be released, it was simply a track I made to pass some time.

Let me know what you think!

Read more...

Visit also our social profiles:

Scroll to top