Skip to main content
Nov
28
2013

Have you tried turning it off and then on again?

This morning, when I crawled out of bed and tackled the morning coffee sites to be followed by 3d work before our busy day commenced, I noticed that my server was slow.

There goes my 3d time again, sigh.  Now I would have quickly investigated, if it hadn't taken FOR FREAKING EVER to log into the server, and I had to leave before it had logged in, and unsurprisingly the pipe had broken and annoyingly the problem hadn't resolved itself when I was able to tackle it again later in the day.

Oct
09
2013

Drupal 7 install profile stuff that everyone else magically knows

Seeing as I found little to nothing when searching for how to configure individual role permissions, editor settings and enabling contrib filters with an install profile, I made something on the off-chance it helps some other poor sap like me who doesn't automagically know where to look for these things.

Enabling filters provided by contrib modules

Search in the .module files for _filter_info. Some modules use the same format as Drupal filters of $filters['modulename_filter'], others don't. Typogrify doesn't:

<?php
  function typogrify_filter_info() {
  return array(
    'typogrify' => array(
?>

 

so in the install profile it would look like:

<?php
  // typogrify
  'typogrify' => array(
    'weight' => 0,
    'status' => 1,
  ),
?>

 

whereas Media does:

Feb
05
2013

Drupal 7 notes: node or page template by path

Because I always seem to manage to completely forget how to do something this basic.

template.php in theme_preprocess_page(&$variables) or theme_preprocess_node(&$variables)

<?php
  $path = drupal_get_path_alias();

  if (strpos($path, 'part_of_url') !== false) {
    $variables['theme_hook_suggestion'] = 'page__whatever'; // or node__whatever if using in a node preprocess
  }
?>

 

Dec
17
2012

Drupal 7 upgrade from HELL

<p>Modded to be slightly more useful as I wrote the other one while slightly delirious.</p>

Sep
27
2012

Drupal notes: backup process with drush

There's probably a script for this.  Or maybe drush is the script.  Is all good, some things are done much faster with commandline :)

drush vset maintenance_mode 1 drush cc all drush arb default --destination=../[site]-[date].tar

And if there's updates to be done:

drush up -y

At the end:

drush vset maintenance_mode 0

Sep
03
2012

Blog updates, or mile long sidebars

I can't even count in miles.

I was a touch concerned about adding anything else to the sidebar as it's already quite long.  Then I had a look at the sidebars some of my friends and other miscellaneous people have on their blogs and I don't feel too bad adding a couple of blocks.  Then of course there was a mental kerfuffle about folds and whether blocks should be above or below them.  I eventually decided to keep "About" up the top as it summarises the silly blog, and drop everything else in under it.

So the new blocks:

Sep
01
2012

Sharing is...

...privacy concerning if you're one of those people that object to things like tracking you around the internet, and not a big deal if you're not.

Jun
21
2012

Brain implosion imminent. Or what's been happening.

My head.  It's so full of stuff that I have a very mild persistant headache.  The cold isn't helping either, it makes my shoulder hurt.  I'm glad I don't live somewhere that's actually cold.

Following is a thought dump so I can work out what I'm doing and so anyone that cares can now know why techno was gone for the last month and why I've been in such a ridiculous distracted foul mood.

May
25
2012

Drupal 7 notes: html5 placeholder text

<p>Fairly straightforward. Mostly here as a reminder for how to do <a href="http://drupal.org/project/webform">webforms</a&gt; (example has a theoretical nid of 1 and a theoretical form field called "message" and the "submitted" part stymied me for a bit).</p>

<h3>template.php</h3>
<blockquote><?php function mytheme_form_webform_client_form_1_alter(&$form, &$form_state, $form_id) {
$form['submitted']['message']['#attributes']['placeholder'] = t('Type your message here...');
} ?></blockquote>

Apr
07
2012

Sprat does not share my scss enthusiasm

bek 6/04/12 10:23 PM
hee hee other cool thing with sass, i do this:

@mixin inline-block {
 display: inline-block;
 margin: 0 -2px;
 vertical-align: top;
}

and then when i need things inline-blocked etc (in a few places) i do:

#container {
 .stuff-what-needs-inlining {
 {
   @include inline-block;
 }
}


Darqx 6/04/12 10:24 PM
i look at that and see what looks to be php mixed with css and want to run away screaming