Atlanta PHP User Group – 11/06/2008

So I attended my first Atlanta PHP user group thanks to Moses nagging me about going :p. I’m glad I went, I had a great time. I really enjoyed being there listening and even sharing a little. The things I took with me that I’m going to mention are:

Atlanta Startup Weekend
During the meeting I found out about this really neat event. The objective of the Atlanta Startup Weekend is to get a bunch of people together, divide them into groups (developers, marketing people, business people, etc) and in one weekend finalize a product from a concept. Tickets are already sold out so I’ll have to try for next year. I’m sure I could learn a lot.

PHP Wiki
I didn’t know about this page: http://wiki.php.net/. You can get lots of neat information from the PHP group. The rfc (request for comments) section is also very informative. You can see what requests have been made, which request are going to be implemented and which have already been implemented. It’s a good way to stay ahead of the curve since you would know what’s coming out before it’s out.

REST
Don’t quote me on any of this, this is just bits and pieces that I think I gathered from listening to others talk. If I understand correctly, REST is a standard for creating RESTful url/url/web services that are efficient and scalable… maybe? I heard REST mentioned a lot during the <head> conference a couple weekends ago and I heard it mentioned a few times last night during this meeting. So, now I need to go do some more research and figure out what this REST thing is all about. Seems like it’s something worth knowing about and maybe even following? If you have any info or resources you can recommend please do.

Joey’s WordPress Setup

I’m going to list the changes I’ve made to WordPress to look and function the way it is today. This will probably change over time, but I feel as if it’s working pretty well right now. This information is for anyone trying to create something similar and for me to use as reference later if I need to recreate this again.

The theme I’m using is Devart by deniart. The few mods I’ve made to this theme are:

  • Edited the /wp-content/themes/devart/images/author.gif (to show my pic instead of the default apple)
  • Modified the /wp-content/themes/devart/style.css to change the way <code>, <ul>, <li> look
  • Modified the style.css to add my twitter logo and link on the top right hand side of the page
  • Modified the header.php page to add my twitter logo and link to the top right hand side of the page
  • Had to add <?php wp_footer(); ?> to footer.php to launch stats code
  • Added img#wpstats{display:none} to style.css to hide the 🙂 from stats plugin

I’ve also done the following to my setup:

05 WRX STi – Road to 450whp Part 2 (300whp to 450whp)

300 whp was fun but like I mentioned in Part 1, there were some issues that I was not happy with.  After spending countless hours at IWSTI (where I do most of my research about my car), I decided 300whp just wasn’t enough. I wanted to play with the big boys… I wanetd more power… I wanted a bigger turbo. This is where TopSpeed comes in.

I called Tray up at TopSpeed and told him I wanted more power and what he recommends.  His question was simple, how much power do I want and I answered 400whp.  The FP20g wouldn’t get me there, green would be closer, but his recommendation for my needs and budget was the FPRed.  He listed a whole bunch of things that need to be changed in the car for this turbo, told me the price, and I gave him the OK to proceed with the project.

Continue reading “05 WRX STi – Road to 450whp Part 2 (300whp to 450whp)”

AIR widow/app drag, minimize, and close

In working on my Uploader tool, I had to do a bit of research on how to drag, minimize, and close an AIR app. Below is the summarized code in case anyone else is wondering how to do this.

import flash.display.Sprite;
import flash.display.MovieClip;
import flash.text.TextField;
import flash.desktop.NativeApplication;
import flash.events.MouseEvent;

public class Main extends Sprite
{
	public function Main():void
	{
		// button events
		mc_exit.addEventListener(MouseEvent.CLICK, exitApp);
		mc_minimize.addEventListener(MouseEvent.CLICK, minimizeApp);
		mc_drag.addEventListener(MouseEvent.MOUSE_DOWN, dragApp);
	}

	private function exitApp(event:MouseEvent):void
	{
		NativeApplication.nativeApplication.activeWindow.close();
	}

	private function minimizeApp(event:MouseEvent):void
	{
		NativeApplication.nativeApplication.activeWindow.minimize();
	}

	private function dragApp(event:MouseEvent):void
	{
		NativeApplication.nativeApplication.activeWindow.startMove();
	}
}

Three buttons on the root of the flash file each with a listener that handles an action when the mouse is clicked on it. The drag button has to use ‘MOUSE_DOWN’ instead of ‘CLICK’ to work. NativeApplication is the AIR app and it looks to see which window is currently active to send the commands for.

Uploader Phase 1

Here is a screen shot of the Uploader 0.1.0
Uploader 0.1.0

If you missed the previous post explaining what Uploader is go check it out.

So after having some fun with code I think I’m close to being done with phase 1.  I currently have a working beta (0.1.0) that I’m going to share with you all and explain what I’ve done in case anyone else wants to do something similar.  For the most part this was pretty straight forward.  There were a few hiccups here and there that I’ll try to address in this post. The link to the code will be at the end.

  Continue reading “Uploader Phase 1”

Uploader: Automating WordPress Links and File Uploads

So now that I’m starting to get my WordPress and new hosting server settled in I’m trying to think of what I can create to help me automate some tasks. One of the things I know I’ll be doing quite often is adding new links to the ‘Links of Interest’ on the front page.  I’ll also be uploading files/images to use on posts or to share with others but I’m too lazy to be ftping files constantly. So… time for a new tool!

The Uploader (yeah I know, I’m very creative) is going to do all the above for me. This will be a app I can keep running on my desktop somewhere and when I need to upload a file or link I can just drag it over and drop it in. The tool will then figure out what kind of item was dropped in and what to do with it.

Phase 1 will handle the links. The way the tool should work for links is the following.  I visit a page that I find interesting and want to add to the ‘Links of Interest’.  Instead of logging into WordPress to create it, I highlight the link from the address bar of the browser, drag it over to the app, and drop it. Now the app needs to figure out the <title> of that page to use as the name since we need a name and url to create a link. Once it has that, the tool will send the information to a PHP page which will do an insert to the links table in the WordPress DB.  

Phase 2 will deal with images and files. I may break phase 2 into two since I may do some stuff differently with images versus other files.  I’m thinking I may want to upload images, create a thumbnail, and insert to a DB to display in the front page the same way some people do with their flickr images. Other files I would just upload and store somewhere else.  I’ll give this more thought when I get to it.

I’m going to be writing the tool in Flash CS3/AIR with PHP in the backend using the current WordPress MySQL DB.  Stay tuned for updates!

EDIT:

Uploader Phase 1 completed 
Uploader Phase 2 completed

05 WRX STi – Road to 450whp Part 1 (Stock to 300whp)

For any car enthusiasts out there, I decided to write a little bit about my car and experiences over the last couple years.  It all started back in November of 2004… actually before that, probably the year before.  At some point in 03 I graduated from College and decided to treat myself in the form of a car.  I was driving a 91 Acura Integra at the time which was nice but I was ready for something new.  What I really wanted was a Subaru WRX STi but I couldn’t afford it so I settled on an Acura RSX-S.  The car was really fun and comfortable to drive around but around a year later, I received a promotion at work and it was time to get the car I really wanted, the WRX STi.

I bought the car from ‘Herman Jones’ at ‘Classic Cadillac and Subaru‘ after a few hours of negotiations.  I was very happy with the purchase and I would recommend anyone interested in buying a Subaru to go talk to Herman.  The car was everything I was expecting it to be if not more.  4 cylinder boxer engine, turbo, 300hp/300tq, all wheel drive, sport seats – so much performance I didn’t know what to do with.  So of course, my first thought was… more HP!

Continue reading “05 WRX STi – Road to 450whp Part 1 (Stock to 300whp)”

rtl.css?

So I’m still learning to use WordPress and decided to style the default theme a bit. I went to the theme folder and opened up the first CSS file I found which was ‘rtl.css’. I added a background color to the <code> tag, saved the file, and refreshed my page… nothing. Tried it again and nothing. I went back to the theme folder and noticed a ‘style.css’ file. Opened that up, made changes to the <code> tag, saved and reloaded and it worked! So what’s this ‘rtl.css’ file? A quick Google search gave me the following answer:

“rtl.css is called when you are using a language localization that reads from right to left (e.g., Arabic or Hebrew).” – source

Well now I know and so do you.

Setting up my WordPress

So I’m using WordPress for the first time and I’m quickly learning that it’s neat and fun to play around with.  The documentation seems good and the code easy to work with.  I’m going to be tracking all the changes I make to the default installation of version 2.6.3 for reference.  I may need this information later or someone else might find helpful.

So far I am using the default theme.  I’m sure I’ll eventually change it but for now I’m just trying to understand how things are structured and how to tweak elements on screen.  The WordPress Function Reference page was a great place to start.  My first goal was to figure out how to get my sidebar to display a list of projects and topics.  In the admin, I created a root level category called ‘Topics’ and another one called ‘Projects’.  Then I created a few other categories that were under either topics or projects such as ‘Flash’, ‘Cars’, ‘PHP’.

Continue reading “Setting up my WordPress”