My Profile Photo

Personal Webpage of David Duggins


Well, I was born on a normal day in July, 1981 and have been creating chaos ever since. Born in North Carolina, but raised in the aftermath of the Soviet Union, Kazakhstan, I have been messing around with computers nearly my entire life. I wrote my first program in assembly when I was 11. In my early teens I ran a BBS connected to Fidonet and started building a website for my band. In 1999 I was introduced to Linux, and it was love at first compile. I started my career in IT in the early 2000's doing IT for a Car Dealership in Charlotte NC. I wrote my first major web app in Cold Fusion (an ecom app) at that time. In 2006 I left Charlotte and moved down to Columbia where starting working as a developer, freelancer and consultant. Currently I am working as a freelance developer and DevOps consultant!!


How to become a Wordpress Ninja (Or the Tao of Wordpress) Part 1

\n I’ve spent the past two months now hacking Wordpress into peices.  I’ve decided to share the wisdom that I’ve learned along the way here at my new Wordpress Blog. Here is a bit of background:

I was hired by a local Technical College to build a podcasting server using Wordpress.  Everything that I did had to be carefully branded to the college and also built keeping in mind that a majority of the users would be very much not computer literate.

First of all,  I created a gateway file that would direct users from the school website into the podcast blogs.  I created two pages, one for students and one for staff.  For starters, the student page had to contain a drop-down menu listing all the instructors on the site.  I populated the drop down from the database of wordpress users (oh..btw, this is wordpress MU)

$result = mysql_query("SELECT display_name, user_nicename FROM wp_users");
while ($row=mysql_fetch_row($result)){
    $blog_id[]=$row[0];
    $blog_domain[]=$row[1];
}

mysql_close($db);

This first bit of code creates a query object and dumps the content of two rows in to two arrays.

$blog*id and     $blog*domain

The second part of this magic uses some really nifty php code that I like a lot:

foreach( $blog_id as $key => $v)

This little gem takes the array, places the array key into $key and the array value into $v this allows us to do some crazy manipulation….that is, I can pull from the second array in my foreach loop.

This took care of the students side.  For the staff side, I read countless Forum entries on “customizing” the login….there is even a plugin to help you with this.  All of these methods to me seemed inadequate for my purposes, so I copied the relavant code from wp-login.php and stuck it in my own file.  Viola!  A truly custom Wordpress Login!!

Check back later as I get even dirtier with the mods!!

weatheredwatcher

© 2024 David Duggins. All rights reserved.