On A Friday

People ask me every so often, how my relationship with God is doing. It’s always been a hard question for me to answer. Mainly because just like any relationship, it has its ups and downs, its highs, lows, and round-a-bouts. How can anyone answer that question? If I happen to feel distant from God one day, does it mean that my relationship with God suffers? If I happen to be lazy, gluttonous, or deal with moments of lust would things be “bad” in my relationship with God?

Many people liken a relationship with God, to a relationship with a person, and in many ways it is true. You can talk about stuff, or even better, talk to God out-loud on the subway to freak out people around you, stuff like that.

But in other ways its so different. We’re talking about a relationship to an infinitely unknowable, yet knowable, intangible being who knows my thoughts even before they’ve been thought. How would you like your best friend to know your every next move? It’s not the most comfy of circumstances :) So in a way, yeah it’s different.

The more I grow in life, the more I realize it is impossible for me to be separated from my creator. Impossible. God exists within me, around me, and in my very heart. So at any moment, how is my relationship with God? Is it good or is it bad? most important thing is that it’s there.

facebooktwittergoogle_plus

iTunesSpy with WordPress Hack

iTunesSpy is a great little tool that i just installed on my blog that tells my readers what I’m listening to at the moment… assuming they care, that is. You might ask, “so what?” Well, what if i told you, that it tells my readers what I’m listening to… WITHOUT ME HAVING TO TYPE IT IN… yes, my friends… it’s automatic.

Check out their website for details, support, and installation information: iTunesSpy
You can download the current version here: iTunesSpy v. 2.0.2

Well, the thing is, installation was not as simple as their documentation made it sound.
So after you install the script please refer to these steps below:

Step 1: Wrapping the headers in admin.php

When itunesspy plugin is installed in WordPress, activating it adds the iTunesSpy menu tab to the WP-Admin Dashboard. Since admin.php is included in the wp-itunesspy-xxx files, the header information ends up being sent twice: Once in the dashboard itself, and then when the iTunesSpy section is loaded. and this of course, is very, very bad :) To fix this, go to root>/wpadmin/admin.php and look for:


header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');

Wrap this code in a header check so it looks like this:


if (! headers_sent()) {
header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
}

This will get rid of the errors you may receive saying that the header is being requested after it has already been sent.

Step 2: Editing menu.php

The iTunesSpy tab also includes menu.php, which makes a reference to the $wpdb variable, which is not set in iTunesSpy, so this will cause an error. And errors, well, they suck. So, to fix this, go to /wp-admin/menu.php and replace:


$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");

with:


if (isset($wpdb)) {
$awaiting_mod = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0'");
} else {
$awaiting_mod = -1;
}

Final Step: Rearranging one of the functions in wp-itunesspyAdmin.php

I received an error saying: function wp_iTunesSpy_setdefault is already defined, or something of that nature. So to fix this, make sure the first conditional looks like this:


if ($user_level > 7) {
if (get_option('itunesspy_authcode') '') {
update_option('itunesspy_authcode', 'some-access-key');
}

if (get_option('itunesspy_amazonfeedlocale') ‘’) {
update_option(‘itunesspy_amazonfeedlocale’, ‘us’);
}

if (get_option(‘itunesspy_input_mode’) '') {
update_option('itunesspy_input_mode', 'get');
}

if (get_option('itunesspy_input_option') ‘’) {
update_option(‘itunesspy_input_option’, ‘fopen’);
}

}

And please erase the entire function : wp_iTunesSpy_setdefault which is defined below the conditional.

At this point you are good to go! Follow the instructions on the iTunesSpy homepage and you’re set to let the world know what you’re listening to… if they care, that is.

facebooktwittergoogle_plus