Quit Smoking Now - Day 3

6 01 2009

Today is the start of day 3. I have had 0 Nicotine still! I tell ya, the cravings aren’t quite as bad as they were, but I am getting sick, so I feel pretty crummy between the two. I have found that I am sleeping less and have a bit more energy, already! I feel motivated - like I want to work on my projects.

I have noticed that I want to eat everything. I feel hungry a lot more. I hope it doesn’t increase too much though. Taking some multi vitamins seams to have helped my energy levels go up, and has taken a lot of my aches and pains away.

I feel that the key to quitting and staying quit to to make sure not to gain weight while doing it. Nicotine can store in your fat cells. So if you quit and gain some weight then you have a buffer between the fat cells with nicotine, and those without. If you do that, tehn your urges will go down and it will be easier for you to quit right now. But that will catch up with you eventually! When you fiunally get down to those nicotine fat cells you will go crazy trying to fight the addiction without any mental preparation. If you are quitting now then dont give up and dont give in otherwise you will fall in the long run. You want to get rid of all the nicotine in your body, not just live a life of no addiction. You don’t want to be fat either. Loose the weight.

I have some of the worst health problems when it come to being ‘just like everyone else’. I never get enough sleep, I am always tired, I have no energy, my mind doesn’t wake up as fast, I am NOT a morning person for at least the first 3 hours in a day, I don’t catch on fast, and I don’t learn fast cause I don’t remember things when I go to fast…It seams that life tries to hold me down at nearly every turn.

I will not allow this to be one of the things that hold me down though. I will not give up. I will be like a pro football player running for a ball - ANYTHING in my way wont be standing for long!

Written by: John Minton



Some Basic Wordpress Answers for the Newbies

6 01 2009

Actually, I am new to WordPress myself! I am using WP MU (WordPress MultiUser). At first I was very confused. I wanted to change the Home page and couldn’t figure it out, I wanted Google Adsense, I wanted a lot of things….But I didn’t know where to start. So I started reading and reading and reading. I finally figured some things out. So I want to share these very basic things with all of the new WordPress, or WordPressMU Users.

Understanding Themes. Wordpress comes with a fair amount of functionality. The wordpress system is actually just the functions, the functionality. What gives your wordpress script life are themes. Most WP themes only change the look of your site. They have colors and images and roll overs and change the lay out of your site, and on and on and on. But they can also add some slight functionality. I would say that it is It is not very often you find a wordpress script that adds new functionlity to the site, but it can happen. You can execute PHP code inside of your themes as well. For the PHP programmers, this means you can create your own contact form!

Installing a theme is as simple as copying it to your server and ten using the wordpress software to activate it. Here is how I do it with my wordpress MU 2.6.5.

Download a new theme. Themes usually come in a zip file, or other type of archive. (.Rar .7z, etc) Extract the theme to its own folder. So you should have something like a folder called themename, and all the files for the theme right under it. From here I FTP the files to my website. We have to put our new theme in a special spot on our server or Wordpress wont know that it even exisits. So lets place our theme folder on our server at wp-content/themes. After all the files have finished uploading, we should go into Wordpress and active the new theme. So go to http://sitename.com/wp-admin and login. On the far right of the page, torwards the top, you should see a few links. One of them should say Site Admin. Click the link and you will be brought to site admin tab / page. The actual page we want to go to is called Themes. Look for it under the normal Write, Manage, Design, and Comments links. On the Site Admin > Themes page you will see a list of Themes that you currently have on the server. Before you can use them you need to let wordpress know that you want to use to. So go down the list and turn as many as you want on. Make sure to turn on our new theme that we want to try out! Once done, click Update Themes at the bottom of the page.

Now let’s go turn our them on and test it out! At the top of the page, click on one the big mail links that says Design. This page is where we can choose what theme we want. Go ahead and click on an image / link for a theme and a sample of the theme will come up with your content in it! You can scroll down and look around at it. If you decide it is the theme you want, you can active it by clicking
active “themename” in the top right corner. Otherwise click the X in the top left corner. After you activate the theme of your choice visit your site’s main page to view the changes. The theme should look nearly the same on all of the pages. That is all there is to installing prefab themes for WordPress MU.

Some other confusing things might come to your attention. What if you want a page to do something besides having just static text? You would have to learn PHP / MySQL, or hire a PHP / MySQL programmer to make a page for you. Before you do anything you should always look around online. One thing you can almost always look for are Wordpress Widgets. A Widget is a little script you can install, similar to a theme, that adds functionality to your site. Some themes come with a set widgets built into them. These widgets can be accesses Through Design > Widgets. Usually a theme has a side bar of some sort, the most common options here are going to have something to do with the sidebar.

Regular widgets should be uploaded to wp-content/plugins just like the themes were uploaded. After you copy over the files, go into your wordpress admin panel, and on the far right click on Plugins. On the bottom half of the page you will see your plugins that have not been activated, on the top we have te activated widgets. If you click active, you will be initialting the widget and it will proceed to run on your site instantly. If by chance you start seeing errors, or if your WordPress site stops working, you can manually disable the plugin from working by renaming the folder it is in. Different pluggins, or widgets, do differnt things. Some add features and extra menus, some just change something little. Google search for wordpress widgets and you will find a lot of things on that topic.

That is all for now. I want to learn how to do some of the code for a WP MU site. I’ll report back any findings or scripts I write! Thanks!

Written by: John Minton



PHP Message Redirect

6 01 2009

I have a small redirect function that I have used for years now with my PHP scripts. Here it is:

<?php
function msg_redirect($msg,$url,$seconds){
echo "<meta http-equiv=\"Refresh\" content=\"$seconds; URL=$url\">
<center>
Please Wait, redirected in $seconds seconds....
<br /><br />$msg<br /><br />

<a href=\"$url\">Click Here If Not Redirected...</a>
<br /><br />";
}

?>

There are only 3 parts to the function, and it is all extremely simple.

$msg - The message you want to pass while being redirected.

$url - The complete URL that you will be redirecting to (make sure to include http://, etc)

$seconds - The number of seconds before the redirect will actually happen and the page will change.

So lets say once a user updates their address we want to redirect tem back to the account_settings.php page, we could go like this:

$query = mysql_query("UPDATE user SET address='$address' WHERE userid='$userid'");
if($query){
msg_redirect("Profile Updated!","account_settings.php","5");
}else{
echo "Sorry, please fill out all fields marked:<br />";
form_function();
}

There isn’t really anything else to it! Enjoy!

Written by: John Minton