Archive for August, 2009
Creating a Drupal Mafia style game
I have always wanted to create a web based game from scratch, and started quickly abandoned a few. (Crazy 8's was ready as a stand alone but let it sit I might try later to port to Drupal)
Now since using Drupal for a majority of my development I thought I'd try one for Drupal. By using Drupal I already have an admin interface in which to interact with, a user registration system, and a fairly well documented api in which to develop the game.
Customizing the Front Page in Drupal
Most of the default Drupal Themes display a simple list of the last 10 entries with pagination if needed.
Some of my first custom front pages involved writing sql and laying out the results within the page-front.tpl. While this worked great and made it easy to control exactly what and where things appear.
But later on when the owner wanted mild changes it required digging back into a complex template file instead of just making alterations from within the Drupal Admin area.
Alterations to the See Also field
I like how the see also box is working / looking but want more choices when writing something.
I've added a single line text field to allow for the header text which before was hard coded into the tpl file to 'See Also' , and added a full text field to display below the links within the same div to allow for a short text blurb and perhaps any external links which aren't possible in the node reference field. ( I might add one above or perhaps some sort of flag to choose where the text appears, either above or below the links)
Adding Meta Descriptions to Taxonomy Pages
In the previous meta description entries I created a meta description field for my content type, altered my page.tpl to show the meta description if it was available and used the site $mission field to use as the front page meta description.
Now I need to alter it again to use a taxonomies term description as the meta description for those pages. I also added a title alteration for paginated pages.
Using Google CSE on Drupal
The goal was to use Google CSE on drupal, and while I got it working it was not near as easy as I would have liked.
At first it seemed simple, google provides two pieces of code; One to build the search form, and one to display the results within your own page.
I added a block for the Google search form which was quite simple. After creating the block I removed Drupals search block and added the new Google search block. (On creating the search engine I gave it the url of http://cross-tags.com/search-result for the results to appear).