Notions

Archive for April, 2009

I just had a question pertaining to my post on replacing a widget title with an image in the widgets.php file.  The question was “Can I keep the title AND add an image?”  The answer is of course.  Basically you just keep the $title variable in the script and add to it depending on where you want the image.

Calendar widget example from 2.7 widgets.php file in the wp-includes folder (make backup!!):

/**
* Display calendar widget.
*
* @since 2.2.0
*
* @param array $args Widget arguments.
*/
function wp_widget_calendar($args) {
extract($args);
$options = get_option(‘widget_calendar’);
$title = apply_filters(‘widget_title’, $options['title']);
if ( empty($title) )
$title = ‘ ’;
echo $before_widget . $before_title . $title . $after_title;
echo ‘<div id=”calendar_wrap”>’;
get_calendar();
echo ‘</div>’;
echo $after_widget;
}

You will be working on the line:

echo $before_widget . $before_title . $title . $after_title;

Basically, you decide where you want the image (before or after the title), then insert:

‘<img src=”path to your image”>’

either before:

. $before_title

or after:

.  $after_title

Just make sure you place periods before and after the image declaration and make sure the line ends with a semi-colon.  I would also add a class to the image to better control its position in CSS.  I guess you could try just using .widget img {property: xx;} to your CSS, but that would alter all images in the widget class.

i.e.

echo $before_widget . $before_title . $title . $after_title . ‘<img src=”images/accent.gif” class=”whatever”>’;

Hope that helps!

The UltraMind Solution

April 2nd, 2009

I have recently stumbled upon a great book which addresses the connection between fixing the mind through fixing our bodies.  At first I tend to think of these self-help books as one person’s opinion loosely based on fact for alterior profit motives.  There are countless “gurus” spinning out methods, ways of life and programs to change–all tapping into the multi-billion dollar healing buisiness.

the-ultra-mind-solution-e4p048lHowever, “The UltraMind Solution: Fix Your Broken Brain By Fixing Your Body First” makes a whole lot of sense in its approach.  It isn’t selling anything per se.  It only goes through medical facts and emerging biological findings to give the reader options and tips on living better.  There are some startling (and not so startling) assertions the doctor makes in the book–things that I am going to effort to change in the future.

One of the chapters goes into how harmful High Fructose Corn Syrup is to our body.  What I didn’t realize is that it was only created in the 80’s and how much of it goes into our bodies everyday.  I started looking at some things in the fridge and noticed it EVERYWHERE!  Even in Miracle Whip, salad dressings, soups and especially in dessert foods.  Why is it so pervasive?  Well it costs about a 10th of the equilivant of natural sugar.  After watching a documentary on Cargill, I scarcely trust these big bio-agriculture companies who have a literal monopoly on what we eat.  Maybe there is a symbiotic relationship between them and all the hospital companies.

Another area goes into which suppliments we should be taking along with a healthy diet.  CO-Q Enzyme and Omega-3 fatty acids are two that give substantial benefits.  But the best medicine is whole grains and fresh colorful vegetables.  Maybe this explains the trend toward raw food bars.

All in all, the book really ties in nutrition and exercise to heal the brain, which also helps heal the body in the process.  There is a lot of discussion about pharmaceuticals, depression/anxiety meds and the disgusting barrage of drugs being pandered on television for every ailment.  Most of which can be attacked through diet and exercise.

Great read and “food for thought.”  :)