What To Do When Dreawweaver CS3 Opens Then Crashes

Posted in Dreamweaver, PHP | No Comments

Tagged Under : , , , , , , ,

Dreamweaver Error MessageI was working on my newest project with my Dreamweaver/XAMPP local development environment and something weird happened. I clicked my Dreamweaver CS3 icon and the green welcome splash screen popped up for about 3 seconds and then disappeared. At one time, I tried to open the program from the Icon in C:\program files\Adobe\Adobe Dreamweaver CS3 and received the error shown in the image to the left. I spent all day looking for a solution and I finally figured it out. I read several things on the web from different forums and blogs that Dreamweaver has a fundamental bug that won’t allow any style sheet or text document to be saved if it is 8,192 bytes long. I wasn’t buying that for anything although there are several testimonies that swear it’s true. I searched my project and didn’t find anything 8,192 bytes long. The solution that worked out, which even sounded better, was that the WinFileCache-AD76BB20.dat file is corrupted and needed to be deleted.

The following describes what I did to fix this. I’m using Windows XP so I went to this directory:
C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration
If you’re using Windows Vista go to this directory:
C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration

Navigate to the Configuration directory and find the WinFileCache-AD76BB20.dat. I made a copy of the file first so I had Copy of WinFileCache-AD76BB20.dat and the WinFileCache-AD76BB20.dat file. Then I deleted the original > clicked on Dreawweaver Icon and Dreamweaver started right.

List of Hidden Folders When View Hidden Folders Is SelectedThe reason this post is worthy of your time is because at first, I didn’t see the “Application Data” directory under my “[username]” under “Documents and Settings”. In order to make that file appear, if it’s not already there (which it shouldn’t be showing) is to follow these directions:
Click on My Computer > Tools menu > Folder Options > View tab > select Show Hidden Files and Folders and deselect Hide Protected Operating System Files. Hit apply and then route yourself to the correct directory again.

A strong recommendation is to put the folder view back to what it was before you started, once you have your problem resolved, to prevent additional problems from happening.

Configure Local Development Environment With XAMPP

Posted in Dreamweaver, PHP | No Comments

Tagged Under : , , , , , ,

XAMPP Local Development EnvironmentNot so long ago, I posted how to configure Dreamweaver with WAMPServer. Something happened with my setup that caused me to find an alternative. I found a great, even easier, what seems to be better, product in XAMPP from www.apachefriends.com Configure Local Development Environment With XAMPP. What made it even better was I found a great tutorial on the ADOBE site, which screams “Ringing Endorsement” if you ask me.

Click here for the tutorial on the Adobe site.

What more is there to say? If you’re looking to create a local environment for PHP/MYSQL, XAMPP seems to be a great choice and not supported, but endorsed by Adobe.

Min Height for Word Press Entry

Posted in Word Press | No Comments

Tagged Under : , , ,

When writing quick posts with pictures, sometimes there’s not enough text to make the post long enough to keep the bottom of the image from going outside of the post border. You’ll get an appearance such as this:
entry_toshort

The fix for this is easy. Locate the div on your style sheet that affects this. In this case, it’s going to be .entry {. Here is the text from this blog:

.entry{
	line-height:20px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	padding-top:5px;
	padding-left:3px;
	padding-right:5px;
	padding-bottom:20px;
}

All were going to do is add a min-height of 250px for this property:

        min-height: 250px;

The end code will look like this:

.entry{
	line-height:20px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	padding-top:5px;
	padding-left:3px;
	padding-right:5px;
	padding-bottom:20px;
        min-height: 250px;
}

The end result will be this since we added 250px:
entry_minheight250

To get the best feel for this, add something extreme like min-height 500px so you will see the property show up real obviously. If you can’t see it right off the bat, undo what you just did and try a different property. This is how you slowly learn what the properties of your template are, when you’re using a template you didn’t create from the ground up.

Configuring WAMP Server for Dreamweaver

Posted in Dreamweaver, PHP | No Comments

Tagged Under : , , , , , , ,

My web design mentor recently introduced to Virtual PC 2007 SP1 and Wamp Server. These are two great tools that professionals use for web development that avoids jeopardizing your home system with bugs and keeps your live server from getting lost in an endless loop. Using Virtual PC 2007 SP1, if something goes wrong, you can just delete the virtual computer and start over. I recommend installing three to five virtual PCs right off the bat, but more to come on that.

Installing Virtual PC 2007 and WAMP can be a bit of a chore but it’s well worth it once you get them running. I’ll do a tutorial for Virtual PC 2007 before long but I was fortunate to come across this tutorial from DreamweaverClub.com that walks you through, step by step, installation and configuration of WAMP Server.

tutorial from DreamweaverClub.com

Modular Code

Posted in PHP, Vocabulary | No Comments

Tagged Under : , , ,

Grouping tasks into functions will keep your scripts manageable as they grow in size and become more complex. Doing this creating Modular Code.

Variable Scope

Posted in PHP, Vocabulary | No Comments

Tagged Under : ,

The reason values have to be passed in to functions as arguments has to do with variable scopethe rules that determine what sections of script are able to access which variables.

The basic rule is that any variables defined in the main body of the script cannot be used inside a function. Likewise, any variables used inside a function cannot be seen by the main script.

Scope Variables available within a function are said to be local variables or that their scope is local to that function. Variables that are not local are called global variables.

Local and global variables can have the same name and contain different values, although it is best to try to avoid this to make your script easier to read.

source:

Sams Teach Yourself PHP in 10 Minutes
By Chris Newman

Defining Functions

Posted in PHP | No Comments

Tagged Under : , , ,

The following code is an example of how to define a function:

function add_tax($amount) {
	$total = $amount * 1.09;
    return $total;
    }

$price = 16.00;
echo "price before tax: $price <br>";
echo "price after tax: ";
echo add_tax($price);

The function keyword defines a function called add_tax that will execute the code block that follows. The code that makes up a function is always contained in braces. Putting $amount in parentheses after the function name stipulates that add_tax takes a single argument that will be stored in a variable called $amount inside the function.

The first line of the function code is a simple calculation that multiplies $amount by 1.09which is equivalent to adding 9% to that valueand assigns the result to $total. The return keyword is followed by the value that is to be returned when the function is called from within the script.

Running this example produces the following output:

Price before tax: 16
Price after tax: 17.44

source for this tutorial is:

Sams Teach Yourself PHP in 10 Minutes
By Chris Newman

Add Thin Border To Images

Posted in CSS, Word Press | No Comments

Tagged Under : , , , , , ,

Adding a border to your images is one of the small things that can be done to accent them. Some bloggers/web designers go all out and put lots of effort into this by adding a different border to every image others don’t care and don’t use them at all. I like to use a thin black border around all the images in my post. This little tutorial will show you how to do that.

First of all, here is an example of an image without a border around it:
paulharvey_noborder2

Here is a piture with a thin black border around it:
paulharvey_withborder2

To add a default border around every image in Word Press or CSS in general, go to the style sheet and find the element for “entry” in Word Press or typically “Content” in a regular stylesheet and add the following code:

.entry img{
	border: thin #000000 solid;
}

To do this in Word Press, do the following:
Design > Theme Editor > Select Stylesheet style.css if it’s not already open. Find the code on your style sheet that starts with .entry{ such as this:

.entry{
	line-height:20px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	padding-top:5px;
	padding-left:3px;
	padding-right:5px;
	padding-bottom:20px;
}

Add this code right below this symbol } at the end of it:

.entry img{
	border: thin #000000 solid;
}

In a typical stylesheet for an HTML page, you’d put something like the following to make sure every image in your content division, which will include subbordinate divs within it, will have a thin border around it:

#content img{
	border: thin #000000 solid;
}

You can play with this to get the results you desire. thin can be thick or a value in pixels, the #000000 can be the name of any color or hexidecimal # for any color and solid can be dotted or a few other options.

#content img{
	border: thin #000000 solid;
}

Consult your CSS manual, the web, or post questions here for additional options or information.

Lost Password In Word Press

Posted in Word Press | No Comments

Tagged Under : , ,

When you’re down and out because for some reason you can’t log into Word Press and the “create new password” link doesn’t work, because you either never get the email or your username is no longer correct, there is a cool tool from Villiage-Idiot.org you can use. You don’t have to be logged into Word Press to use it because obviously if you were logged in, you wouldn’t need it. You do however, have to have FTP access to your site.

Download the file > upload to your Word Press directory > call up page in browser > follow directions > delete file from server. It’s that simple. Give it a shot. I’ve used it and it works great.

Photoshop: Define Pattern

Posted in Photoshop | No Comments

Tagged Under : , , ,

I learned a super cool trick that is worthy of sharing. This is how you create a pattern and use it for different components. On a recent blog I installed and updated, I used a similar pattern to dress up the client’s blog because he wanted to match his existing business cards. No sweat. I used the pattern for the body background, the image background for the date, and then the background for the header because I didn’t like the sky blue I originally used. Here’s how I did it:

first set the background and foreground colors if you already know which colors you want to use. I’m going to use background #4b6ff7 and foreground #4b4640. Once the colors are set, hit CTRL+N to open a new document with both width and hieght each set at 4 px and the background set to Background Color. Select OK.

A little spec pops up with is a 16 px image of our background. Hit CTRL and the + sign nine times to make the image 1600%. and you’ll have an image like this:

Next step is to select the Pencil Tool from the tool menu. Select a 1 px brush, normal mode, and opacity to 80% in the settings menu at the top like this:

For this tutorial, you need a 1px brush, but you can toy around with mode and opacity all you like.

With the pencil tool selected, make a pattern you like. It will take you a while to get used to what the pattern will look like as a background pattern in full size, but you’ll figure it out in no time with a little trial and error. I’m using the following pattern:

If you’re happy with the final pattern, go to Edit > Define Pattern. Enter the pattern name you’d like to give it, I’m going to use samplebgpattern for mine as shown below:

Then open up a new file with a white background. I’m going to use an 800 x 200 header with a white background and fill it in with the new pattern. Once your image is open, create a new layer by going to Layer > New > Layer. You can name it whatever you like, I’m just going to use layer 1.

From here, select the paint bucket from the tool bar and set the options menu to “pattern” instead of foreground and then select the pattern you just made. There are a few preexisting patterns if you’ve never made one before. If you’ve made several in the past, you’ll know that the newest pattern you made is the furthest one at the bottom right. Here’s the menu settings you should have:

Click on the image to be filled and you’ll end up with something like this:

You can put text on it, insert images, do what ever you want. Enjoy.