Tag Archives: php

Gnomedex 2010 Open Government Hackathon

If you have a passion for coding and will be in Seattle on August 20 – 21st, you will want to attend this event. The Gnomedex10 Open Government Hackathon will be held at the Edgewater Hotel – adjacent to the Bell Harbor Conference Center. The event is slated to begin as our Gnomedex conference winds down, and the cost of attending is absolutely free.

Ruby, Python, PHP, web developers, coders and anyone who has a passion to code, hack or kluge applications that will free (or otherwise enhance) the accessibility and usefulness of government-shared data are encouraged to participate. You can enter as an individual or a team, and don’t have to be attending our conference in order to take part in this amazing opportunity. At the end of the 24 hour period, each app will be evaluated by the Hackathon partners to determine the best apps – which can earn you a prize or two!

The nature of this event will be free-form. Hackathon partners will have organizers on-site to help you get the ball rolling initially. Even though it won’t cost you anything to take part in this day of hacking and fun, you are asked to please register so they know how many people to expect.

I know several of you out there in the Seattle community (and many attending Gnomedex from other far-away places) are hard-core programmers. Let your creativity soar while having a great time winding down your weekend during the Open Government Hackathon.

Tips for Programming and PHP

Community member “a_v58” sent me a short list of PHP tips. These days, people are rabid in their thirst to learn more about PHP. If you want to become a programmer, you should know what you’re doing when it comes to PHP. The following tips were sent in to me by Andrew. They are solid tips, so I wanted to pass them along to all of you.

  • Don’t be tempted to use packets such as WAMP or XAMPP that install and configure Apache, PHP, MySQL for you automatically. You’ll learn more by installing them one-by-one and configuring them manually. After a quick Google search, you’ll find a list of recommended configurations for PHP and/or Apache – depending whether your machine is a server or a development machine. I recommend installing in this order: MySQL, Apache, PHP.
      A small suggestion to check if all 3 were installed and configured correctly: place a small PHP script in the .htdocs directory of Apache in which you call the phpinfo function, as well as one function from every extension (MySQL, cURL, Java, etc.). If there are no warnings or errors, everything should be fine.
      For fewer headaches and happier programming, I also strongly recommend using an IDE such as EclipsePHP (which can be found at eclipse.org) or Zend. You might also look into xDebug.
  • Remember to sanitize your database inputs. To avoid this, understand what this is and how this works. Google or read on Wikipedia for “SQL injection.” Use functions such as ‘addslashes’ and ‘get_magic_quotes_gpc.’
  • When you think you did everything right and you don’t understand why something isn’t working, look at your code carefully, debug it, and possibly run a ‘var_dump’ on all the variables to see whether something is faulty. If you still can’t figure it out, take a break and get some fresh air. Come back to the problem with a clear mind.
  • Don’t be afraid to ask on forums or the community questions. Remember: there are no stupid questions. However, if for every little mistake you ask, and you don’t figure a couple of questions on your own… no offense: programming may not be right for you.
  • Why choose PHP? It has a syntax similar to C/C++ (which are some of the used frequently for desktop applications. PHP.net has almost everything you might need to know – including examples and user-contributed notes (which may contain exactly what you need).
  • When somebody asks you a question, don’t be afraid to answer. You’ll either help that person by teaching him or her something new (or be corrected by someone with more experience – in which case, you’ll learn something new).

Sure, it’s a starter list of tips – extremely rudimentary for some. That’s where you have the opportunity to suggest your own PHP starter tips in the comments stream below. 🙂

How to Organize Text and Programming Code


Add to iTunes | Add to YouTube | Add to Google | RSS Feed

Managing text in a single text file is a bit of a kluge. Let’s say that text happens to be code, such as PHP or CSS. You may want color highlighting, so that if you make a mistake you’ll be able to detect it easier. You want to have a text management tool at your disposal, no matter what operating system you happen to be using.

The free Snippely is just what you’re looking for. It’s an Adobe AIR app, made by the folks at Google Code. Snippely is a basic text and code organizational tool. Instead of storing bits of code, quick notes, and memos in text files all over your hard drive, this application will let you save and organize “snippets” in one convenient location. A snippet is a collection of one or more pieces of code and notes. Snippets are stored in groups for organization and quick retrieval.

You set up groups, and you have sub-groups within those. You can add notes and colors to different parts of your group areas. It’s really easy to do, just drag-and-drop things where you need them to be. You can even choose to make the notes appear in plain text!

Whether you’re managing plain-text snippets, or code snippets, Snippely is going to work great for you.

Want to embed this video on your own site, blog, or forum? Use this code or download the video:

Five must-have Joomla plugins (and tips)

When I mentioned in my Picks that we deployed Joomla to drive this year’s Gnomedex site, a Gnomie responded enthusiastically. Jack Bremer operates a handful of Joomla-driven sites, including Prospect Burma and his own 3B Web Design. John and I have been hacking away at it for a while now, but he definitely knows more about the platform than I do – and John offered a handful of tips and suggestions, including his top five “must have” Joomla extensions. From the Bremer’s mouth:

  • Joomap (sitemap generator – great for your site AND automatic Google sitemap in the background)
  • JCE Editor (& file manager plugin & image manager plugin) – GREAT WYSIWYG editor, a million times better than the standard Joomla editor (I always unpublish the font and style plugins if other people will be managing the site so they cannot screw up the layout of the site!)
  • Google Analytics Plugin – obvious really!
  • CorrectPNG – IE6 PNG mambot/plugin which allows transparency (although not in png’s called in by CSS)
  • Google Maps Mambot (if appropriate) – fantastic map plugin which makes adding maps SUPER easy.

He added: “If OpenSEF is problematic, Artio JoomSEF is far easier to setup, I just like the control I have with OpenSEF. I recommend never using “static content” and instead publishing a “General content” or similar category in which you put general info – it’s far easier to manage through a single content manager than having some things in static etc.”

I wonder how else we could pimp my Joomla? Ewwwwwww…

Over 300 Tag Searches in One Spot

Don’t expect every one of these searches to yeild results, though. The output was generated by a single OPML file and the Optimal OPML WordPress Plugin. Looking for other easy ways to display the OPML from Gada.be right now. Hell, entirely new sites could be built on top of the OPML we produce – much like RSS, it’s a poor man’s API.

Ultimate Tag Warror META Keywords

It’s amazing what happens when you email the developer of a WordPress plugin – they respond. At least, most of ’em do (I’m still waiting to hear back from a couple of ’em right now, including Red Alt on being able to search posts from his admin search plugin). After blasting a note to Chris Davis about his community-based tagger, I sent a note off to Christine Davis (no relation) about some shortcomings in the current Ultimate Tag Warrior. I wanted UTW to copy tags into the META keywords tag. She responded with code which needed to be tweaked a bit by Shayne:

[php]< ?php if (is_tag()) { ?>
< meta name="keywords" content="‘%tagdisplay%’, ‘default’=> ‘, %tagdisplay%’)); ?>” />
< ?php } else if (is_single()) { ?>
< meta name="keywords" content="‘%tagdisplay%’, ‘default’=> ‘, %tagdisplay%’)); ?>” />
< ?php } ?>[/php]That’s for all you SEO types out there who are also using the wildly-popular Ultimate Tag Warrior plugin (and I’m not just saying that because it supports Gada.be). This is fun!