What’s New in TempServers.com Beta 2.1?
Yesterday, we announced on Twitter that TempServers Beta 2.1 is ready for public testing. The main attraction to this release is full FTP access to reserved servers. This means that you can upload your own configuration files and addons to fully customize your server. This is in addition to the convenient access the Server CP provides to the main config and mapcycle.
Once you reserve your server, you'll immediately have access to the server via FTP. This allows you to prepare your server before it goes live.
There were some significant back-end changes to make this possible. Each server is now installed to a separate directory with its own FTP account. In order to keep things fast during installs and game switches, most of the standard files are linked to a shared location to keep file size down.
The system is still not perfect, so we are continuing the free public testing to find any bugs or limitations. Feel free to try out the service and let us know what you think! TempServers.com
Degradable Tabs With jQuery UI
Creating tabbed content is easy with jQuery UI. Using a simple HTML layout and calling the tabs function is all it takes. Here, I'll show you how to make a degradable tabbed interface. That is, we'll make it so the page is still readable when JavaScript is disabled. This involves hiding and showing elements using JavaScript before enabling tabs.
See the live demo. Try turning off JavaScript to see how it degrades.
5 Basic PHP Security Tips
Security should be a top concern throughout the development of any PHP web application. There are some very simple measures you can take to protect your application from potential abuse. This post will cover some of the basics of PHP security. For more detailed explanations of good security practices, check out the PHP Security Guide.
I do not consider myself a PHP security expert, but these are things that every developer should know. Also keep in mind that security is a process and not a result.
Data Storage with jQuery
The jQuery data functions provide a clean way to store information for any kind of use. You can assign any amount of data to an element on the page and access it later by referencing the element. Like everything in jQuery, this is very easy to use.
In the following examples, we will be using an element with the id db to store information about fruit.
Store something:
// Store the current fruit $("#db").data("fruit", "orange"); // Store an array of fruit info $("#db").data("orange", { type: "citrus", color: "orange" } );
Fetch something:
// Find out what the current fruit is var fruit = $("#db").data("fruit"); // orange // Get the type of the current fruit var type = $("#db").data("orange").type; // citrus
Remove something:
// Remove all fruit data $("#db").removeData("fruit").removeData("orange");
Snippet: Maintain a Single Database Object in PHP 5 Using the Singleton Pattern
When creating a PHP application, it is usually necessary to connect to a database to perform certain tasks. In some cases you only want to open a connection when necessary, but limit it to a single connection. This way you don't waste resources on unnecessary database connections. For these situations I use the Singleton Pattern, which is perfect for this.
In this example, we are creating a MySQLi object and forcing it to a single instance. We just need to call DB::get() to create and/or access the object.
Add Records to a Queue with jQuery
This tutorial will explain how to make an animated "add to queue" type functionality with jQuery. Since it is hard to explain the results, check out the demo. First, I'll show how to create the actual effect, and then how to implement AJAX submission to a back-end script for database storage or some other processing.
