Thu, 2015/05/07 - 12:08pm
I've been slowly but surely updating things here to be mobile-friendly so Google doesn't hate me. There still a few glitches here and there to get to, but I am starting to feel like maybe what I have done doesn't completely suck.
Sun, 2012/06/03 - 4:37pm
I've decided to abandon having a separate site at mbarrick.com and make the domain point to this site instead.
Thu, 2011/03/24 - 11:59am
The Problem:
Displaying a random image from the image field in a certain node type (where not every node has an image) in a block.
My Solution:
1. First thing is create a view with the following "Default" settings:
Thu, 2011/03/17 - 1:51pm
Add the following function to the template.php for your theme:
function yourthemename_preprocess_page(&$vars, $hook) {
if (isset($vars['node'])) {
// If the node type is "blog" the template suggestion will be "page--blog.tpl.php".
$vars['theme_hook_suggestions'][] = 'page__'.$vars['node']->type;
}
}
Change the "yourthemename" in the function name to match the name of your theme.
Tue, 2011/02/22 - 11:47am
By default, a Drupal 7 image field that is set to contain multiple images, will display all of the images in both the teaser and full node view. While desirable, there is no option when creating a view to only show the first image in the teaser. This can be accomplished, however, with the new Drupal 7 field-level template-hint.
In order do this globally for a field named "field image" the following code in a template file named "field--field_image.tpl.php"
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
Sat, 2009/10/24 - 2:48pm
I'm not the first one to run into this problem, but in searching around I couldn't actually find anyone who had actually bothered to solve the problem: how to get an RSS feed from a publicly accessible facebook wall. The facebook wall can either be a fan-page wall or a publicly accessible group's wall.
Sun, 2009/05/17 - 3:35pm
There is a problem with the Drupal aggregator module stripping out HTML escape codes (i.e. < > & etc.) from RSS feeds when using PHP <= 5.2.6 with libxml2 >= 2.6.32.
This is due to an intentional change in the behaviour of libxml2 after version 2.6.32. Some sites suggest reverting to libxml2-2.6.30 - while this works as a temporary solution, it is no longer necessary or advisable.