Archive for 'Development'

Fancy Formatting

I’ve been going through all my old themes and plugins and migrating them into github repositories (more to come on that later, including an updated projects page). In doing so, I remembered a feature that I had added to a style I created called Evincere. Original credit (as far as I can tell) goes to Kirk Montgomery who used it on his Sawchuk Scheme.

Basically, the idea is to provide a large number of pre-formatted paragraph eye candy that can be used anywhere in the site. The icon in the paragraphs are from Mark James’s silk icon set. I’ve added it to this theme so without further adieu:

This is a note

Example download link

$> echo ‘this is code’

Alert, this stands out

This is under construction

How about some information

New features!

Notepad++ is My New Favorite Editor

I’ve always had creative instincts. But god forgot to bless me with any sort of traditional creative talent. I am a poor writer, my stick figures lack punch and sheet music scares me.

What I do know how to do though, is write code. And to me elegant, functional code is an art. I don’t mean to elude that I am some sort of code writing god. Often my code is far from elegant and sometimes even non-functional. But when things come together I still get a warm satisfaction after successfully developing an application.


Read more

Drupal DKP Module

The Drupal DKP module will allow you to pull data from an existing eqdkp installation and display DKP stats directly in your Drupal setup. Currently this version is very beta, and there are no options. Your EQDKP installation needs to be in the same database as Drupal, and needs to have ‘eqdkp_’ in front of all table names. You can see it in action on guilds website.

DKP Module

Download 3.07 kB
Latest Release: Version 5.x-0.1-dev | Downloaded 532 times

Pulls DKP information from an existing EQDKP installation and displays it in Drupal.

Details

Drupal DKP integrates with EQDKP by giving you the following functionality:

  • Display current standings
  • Display loot distribution
  • Display raid history
  • Display individual member history (loot, raids etc)

Dependencies

The loot linking relies on functions from the drupal_armory module, which is located at http://losmuertos.houseofbob.net.

Installation

  1. Download the module archive and expand it (you’ve likely already done this).
  2. Put the ‘dkp’ folder in your modules directory. Since the /modules/ folder is typically reserved for Drupal core modules, as of version 5.x you should create a sites/all/modules/ directory and put uploaded modules there.
  3. Go to administer > site building > modules. Check the ‘Enabled’ box next to the module and then click the ‘Save Configuration’ button at the bottom.
  4. Go to administer > users > access control and make sure you set the permissions up, otherwise nobody else will be able to view the page.
  5. Go to administer > site building > menus and create add a menu item (typically in your primary links). The name and description are arbitrary, but the path needs to be ‘dkp’.

Configuration

There are currently no configuration options available.

Known Issues

  • The wow_armory plugin has many known bugs and is officially unsuported. You may find that item names (typically ones with symbols in the name) will not link properly. This is a bug of wow_armory, and there is nothing I can do. The workaround is to enter the item ID in EQDKP instead of the name.

Frequently Asked Questions

What do I do if my eqdkp tables start with something other than ‘eqdkp_’.

You’ll need to go through the dkp.module file and replace every instance of ‘eqdkp_’ with whatever your tables start with. I hard coded the table names because I built this module for personal use, I never planned for it to be release to the public.

What do I do if my eqdkp database is not in the same location as my drupal database.

Because I built this module for personal use, I never planned for this. Without making significant changes to the code, its just not possible.

Anything else?

That about does it – enjoy!

Bug Reports & Feature Requests

I’ve added a page by the same name to the site, under my portfolio for issues with the styles and plugins I’ve created. Its actually an embedded Wufoo form.

So if you have a feature request, or a bug report or an idea on how to make something better than it is, head over to the Bug Reports & Feature Requests page and submit a new issue!

I’ll get a text message to my phone when an issue is submitted, so rest assured submissions wont go un-noticed!

Support Pink for October

Pink for October

Web sites will Go Pink during the month of October to bring attention to Breast Cancer Awareness Month, get people talking about breast cancer, and raise money for research.

But to be clear, raising money isn’t the primary purpose of this web event.

The hope is that you turn your site pink (in whatever way works for your site), go out to that World Wide Web thing (in fact you’re on it right now! :) ) and educate yourself about the multiple issues related to Breast Cancer, then take that newfound knowledge and tell someone else what you’ve learned.

- pinkforoctober.org

Please join me in going Pink for October. I’ve created a K2 style for the occasion, and a plugin to show your support for the event.

Amazon Wishlist Plugin

Chadd had asked me a while back for a birthday wishlist, I hadn’t responded back to him yet because I wanted to try to get my Amazon wishlist directly on my blog. And thanks to a slightly tweaked version of the Amazon Wishlist Plugin by Ryan Prins I am proud to present My Amazon Wishlist kindly formatted to match the rest of my site.

Slightly tweaked you ask? Well although this plugin does an awesome job of getting my amazon wishlist, it did it with pages and in a markup I found difficult to format. So I created a new function, which is mostly a clone of the original calling function but this version aggregates all the items onto a single page, and in a format I could more easily work with. I did however, ditch the use of images that the original function had.

Anyway, if your in the same boat as me, and want to get all of your wishlist items onto a single page, this may just be the function for you. All you have to do is append the following code directly before the closing ?> line in the amazon-wishlist.php file, and change the call in your wishlist page to this function. I’ve included the CSS as well. Enjoy.

/**
  * Print a single page with the entire wishlist for all eyes to see!
  */
  function displayPagelessAmazonWishlist() {
  global $listDetails, $imgSize;
 
  /* Get the complete, and formatted list of items */
  $niceItems = array();
  $listData = prepareAmazonWishlistItems(1); /* Initialize the data */
  for($i = 1; $i <= $listDetails['TOTALPAGES']; $i++) {
  $listData = prepareAmazonWishlistItems($i);
  foreach ($listData as $item) {
  $nice = prepareAmazonWishlistEntry($item);
  $niceItems[$nice['PRODUCTGROUP']][] = $nice;
  }
  }
 
  /*
  echo '<pre>';
  print_r($niceItems);
  echo '</pre>';
  */
 
  if(!empty($niceItems)) {
 
  foreach ($niceItems as $group) {
 
  $h3 = $group[0]['PRODUCTGROUP'];
  $output .= "<h3>$h3</h3>\n";
 
  foreach ($group as $item) {
 
  $dateAdded = date('m/d', strtotime($item['DATEADDED']));
  /* Cheap fix to assure XHTML compliance, this should really happen in prepareAmazonWishlistEntry() */
  $item[TITLE] = htmlspecialchars($item[TITLE]);
  $title = "<a href=\"$item[DETAILPAGEURL]\" title=\"$item[TITLE]\"><span> $dateAdded </span> $item[TITLE]</a>";$output .= "<div>$title</div>\n";
 
  unset($item);
  }
  unset($group);
  }
 
  } else {
  $output = "<p><strong>Error!</strong> There was a problem building your wish list, please try again later.</p>";
  }
 
  echo $output;
  }