Simplifying Your Website for Better Performance

I don’t know what it is, perhaps all programmers are like this, but I have this need to strip away everything that is unnecessary from my websites. Google Analytics isn’t even worth it for me, I’d rather just not have that external connection that I know can add milliseconds onto a user’s load time. Is this a rare form of coder-autism, or does it really help your site?
Continue reading

Quick Setup for Paypal With PHP, MySQLi and an HTML Form

This is a tutorial on how to set up Paypal payment processing on your website, using PHP, in a way that also allows you to take in other information form the user and save in it your databse.

This tutorial specifically uses the example of adding companies to a database, before charging them a view through Paypal.

First of all, create a file called “connection.php” that holds your database connection data, and add the following code:
Continue reading

Getting to Grips with Google Charts : Line Chart Tutorial

Something that I’ve been exploring recently is the extraordinary Google Charts API. I have yet to see a very detailed, complete tutorial on how to use this API in a practical way, so I thought that I would be the first :) :)

This is how I’ve been using it: Retrieve data from a MYSQL database, use PHP to organize the data, and create a URL that I use to request a chart from Google Charts.
Continue reading

How to Retrieve Data from Facebook Using PHP: Tutorial

It has been a while since I’ve done a very technical tutorial on PyThoughts, so I thought I’d write one today. It’s about getting data from Facebook, and the best ways to do that.

1.Using the Graph API

This is by far the easiest way to get data from Facebook, although it might not be a complete solution for you. The method is simple, and I do it like this:
Continue reading

How to Create an Image Gallery That has Keyboard Functions with JQuery

Finished Simple Gallery Demo (if you say “view source” from this screen, you can get all the working code, nothing extraneous added.)

First of all, let’s start off with something as basic as we can. I love making really basic tutorials, and it particularly frustrates me when programmers add unnecessary elements to tutorials that don’t need to be so complicated. The rule here at PyThoughts is generally to keep tutorials like these simple.

The first thing that I did  in creating an image gallery was of course adding the JQuery library; simple enough. Then, I designed my basic gallery layout: it has a main image at the top (I put it in a div with a fixed height so that it won’t stretch the page up and down as it changes sizes), and a couple of “thumbnails” in a stream down below. My plan is to make it so that when you click on a thumbnail, it changes the main picture so that you can view it better (duh). :)

Continue reading

Tutorial: How I Made a Useful SEO Plugin for WordPress

There are two stats that I love to check for my web properties: the number of backlinks I have, and the Alexa rank of my site. Obviously, the number of backlinks that a webpage has is a large determinant of its rankings on search engines, and I love the Alexa rank tool, because it gives me a nice statistic to measure my progress. So I find myself going to Yahoo’s site-explorer tool a lot, and checking the Alexa tool on my Chrome browser. Since I check these stats as much as I visit my dashboard, however, I thought that it would be useful to display this information on my dashboard.

The problem was that I had never written a WordPress Plugin before.

Continue reading

AJAX with Google App Engine

In this tutorial, I’ll be showing you how to make a functional AJAX application on Google App Engine. There are two ways to do this, the first being to use a framework such as JQuery, the second being to write the javascript by hand. I will be showing you how to do both, and in such a way that a beginner can make sense of it easily, while more advanced users of App Engine can also benefit.

So I’m going to split the tutorial up into two parts, and each part will have a separate example for you to work with. Here are the bookmarks to each section, and you can decided which way you want to do this. Personally, I find JQuery easier, but it will require that you learn some new things if you are only familiar with Javascript.
Continue reading

Facebook Apps with Google App Engine

The internet’s simplest introduction to writing a facebook application with Google App Engine, in Python, with Django.

So let’s start with an easy introduction to writing a facebook app with app engine. First of all, you need to sign up for an application with Facebook. You can do this here, just click “set up new application” once you’ve added the facebook developer application, and give them your preferences. You should then come to a page full of settings, with titles like “Essential Information”, and “Basic Information”. Use the navigation on the left to edit the “canvas” settings. Keep this page open.

Continue reading

App Engine Datastore Workarounds and Search

One of the nastiest things about Google App Engine is its limited functionality in certain areas. Now, I’m a huge fan of the service, but I often tell friends that I don’t think it’s feasible for very large applications to the use it (not that it isn’t brilliantly scalable, but I’m talking about an ‘application’ like twitter, or a huge site like Amazon.) An example of an area with such lack of functionality, although remarkable in its own right, is the App Engine datastore.

Continue reading

Google App Engine and My Mission

Hi. The blog you’re reading, and all of its user and content-creation functionality, is entirely written using Google App Engine (Python), with Django. In this post I write about why I decided to write my own web applications to replace every web service I use, and why I decided to do this using Google App Engine.

Continue reading