A few wee Drupal hacks

Tagged:

Lot's of making wee alterations to various Drupal 4.7 installations--nothing big, but just in case they're useful to others:

 

Title of the blog block

On one site only the instructor is blogging, so the default text of the block for recent blog posts, "Recent blog posts" (or something like that) seemed off. The place to change it is in blog.module, the function blog_block (around line 298):

$block['subject'] = t('Recent blog posts');

Change 'Recent blog posts' to whatever you like

SEOPosition comment settings

I've really liked the SEOPosition theme--it has a major sidebar, and two minor sidebars underneath it. But the template doesn't include the links for comments that some other templates do. comment.tpl.php has what's needed, almost at the bottom of the file:

<div class="commentfooter"><?php print $author ?> | <?php print $links ?> <?php print $date ?></div>

The $author, $links, $date variables bring in (or leave out) the relevant material for the footer

SEOPosition and user uploading pictures

One drawback of the SEOPosition theme is that it doesn't leave much room at the right side of the main content area. Some things get chopped off or oddly repositioned. One such case, at least when there are long sidebars, is the "Browse" button for users to upload a picture. Changing the size of the text input that goes with the upload form does the trick. The setting is in user.module, link 1326:

$form['picture']['picture_upload'] = array('#type' => 'file', '#title' => t('Upload picture'), '#size' => 28, '#description' => t('Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'), '%size' => variable_get('user_picture_file_size', '30'))) .' '. variable_get('user_picture_guidelines', ''));

The size for the text input is #size in the first array, here set to 28 instead of the default 48.

Trackback URL for this post:

http://www.patrickgmj.net/trackback/74