This blog site is not meant to be any information that is distributed to the general public. It is to serve as shared documentation between the DNSTC developers; however, if you find something useful and would like to use it, go right ahead.

Thursday, February 24, 2011

Password Protecting a Directory with .htaccess

There have been many occasions where password protecting a directory is the ultimate in web security. This can be used by clients to hide information that they do not want their public to know about or access, it can also be used to secure information for employees of a company.

Instead of writing a tutorial about this, I went to the "Net" and found a great web page resource that will actually create the password file for you...

Here is a quote from that page:

Password protecting a directory can be done several ways. Many people use PHP or ASP to verify users, but if you want to protect a directory of files or images (for example), that often isn't practical. Fortunately, Apache has a built-in method for protecting directories from prying eyes, using the .htaccess file.

In order to protect your chosen directory, you will first need to create an .htaccess file. This is the file that the server will check before allowing access to anything in the same directory. That's right, the .htaccess file belongs in the directory you are protecting, and you can have one in each of as many directories as you like.

The way the password protection works, if there is any page within that directory accessed, the users will be prompted to enter a username and password.

For more information about this: http://www.addedbytes.com/lab/password-protect-a-directory-with-htaccess/


 

Monday, February 21, 2011

Getting the Word out Using Word

Not only can DNS Technology Consultants, Inc. develop custom www solutions for you, but we have the expertise to help you with making computers work for you and you not work from computers.

Have you ever been in a situation where you want to get something out to everyone, you have to type up a draft... copy/paste it to e-mail, Facebook, send it to your webmaster, post it to Twitter, before you know it, the phone rings and you forget where you were with your announcement.

How would you like to sit at your desktop using MS Word and simply open up a new document, type in some information, click a button… and that new information will go to; your website, your FaceBook Page, and your Twitter account all at the same time?

We can make it happen, contact us today for details; btw… this is exactly how this post was made.

DNSTC Welcomes Bloomfield-Mespo Schools

We would like to welcome Bloomfield-Mespo Local Schools to our on-line family.

We began the new design of their website in the last quarter of 2010 and through several e-mail conversations back and forth, the website was officially released the middle of January.

Their new website is running our new version of WSMS and they have been working feverously getting all of their staff up to speed with maintaining their website on a regular basis.

The WSMS system allows them to assign certain web pages to different staff members so that updates are not the sole responsibility of a single person.

You can check out their new website at: http://www.bloomfield-mespo.org.

DNSTC Welcomes Bloomfield-Mespo Schools

We would like to welcome Bloomfield-Mespo Local Schools to our on-line family.

We began the new design of their website in the last quarter of 2010 and through several e-mail conversations back and forth, the website was officially released the middle of January.

Their new website is running our new version of WSMS and they have been working feverously getting all of their staff up to speed with maintaining their website on a regular basis.

The WSMS system allows them to assign certain web pages to different staff members so that updates are not the sole responsibility of a single person.

You can check out their new website at: http://www.bloomfield-mespo.org.

Sunday, February 20, 2011

I don't think we need a website

When I started this business over a decade ago, that was the comment I got about 7 out of 10 times when I tried to approach a business about doing a website for them. In fact, it was very hard in the beginning. A lot of people thought that the WWW was just a fad; it wouldn't last, or didn't even know what the Internet was. They didn't see the vision of the commercial aspect of the web, or even how future generations would surpass the Internet and go directly to retrieving their information from a cell phone instead of a computer.

Within the last 10 years, times have changed. I have gone from seeking out new clients to trying to keep up with the requests of individuals who now realize…. Wow, we have to get on the Internet to survive.

Now, I get the comment… I don't think we need a website, we need to be on Facebook, we need to send out e-mail marketing, we need cell phone applications… well, let me just answer that with this. All of those "auxiliary" services mean nothing without a stable professional website.

As a business owner, need to consider the following:

  1. You still need a foundation for your Internet Marketing. Even the bible refers to, "A foolish man builds his house upon the sand". Can you get by with a "free" Facebook Page? Absolutely you can. Does it look creditable and acceptable to your target market, or even to search engines, to not have a professional website to back it? Absolutely. You still need that strong foundation for your visitors to come to either get more information or find out more information about you.
  2. If you have something different you want to offer your clients from what your competitors offer, you need to have a website to house those applications or services. These cannot be added to a social networking site, yet you can reference them from your social networking page.
  3. What are your competitors doing? How are you going to tell others about your site if you do not have a site? You need a fully qualified registered domain if you want to do search engine promotion, back link promotions, e-mail marketing, and other services…
  4. Social Networking does have its place and it is very important. Use your social network page to make announcements, or to drive others back to your website to gain more information.

Anyone in business should have a professional website. If not, you are losing out on millions of sales leads a day.

What I tell my clients (or potential clients) today is… if you are not doing it, you can bet your competitor is doing it.

  

Preloading Images with Javascript

Problem:

There is a delay when you move your mouse over an image where the second image takes a while for it to be displayed on the screen.

Solution:

Preload the secondary image.

Description:

Preloading images is a technique often used by web developers when they are incorporating Rollover Effects or other image scripts which work more quickly when the images for them are loaded within the browser's cache as soon as possible.

For example, when developing a roll-over effect, if you move the mouse of the image for the first time, there is a delay in displaying the image… this can be easily fixed by preloading the image through the use of javascript.

Here is how it is done:

  1. Get the size of your image, i.e. width and height

  2. Add the following code to your <head> section of your page:




<SCRIPT language="JavaScript">
<!--
if (document.images)
{
pic1= new Image(100,25);
pic1.src="http://someplace.com/image1.gif";
}
//-->
</SCRIPT>


Explanation:

  • The condition statement checks to see if it is an older browser and if javascript is actually supported.

  • The pic1 = new Image statement creates a new option for the image. The two numbers within the parenthesis is the width and height of the image.

  • If you have multiple images, just continue with pic2, pic3, …

  • The line with the URL is the URL to the image.

Saturday, February 19, 2011

Verification of Delete

When creating a web application, you are most often going to have an option to delete a record from a database. In the past, this used to be done by sending the user to another page and ask for a verification of delete; however, the following javascript code can be used to verify deletion before the actual deletion actually takes place.

Add the following to the section of the page:
<script language="javascript" type="text/javascript">

function verifyDelete(page) {
if (confirm("Are you sure you want to delete this report?")) {
location.href=page;
} else {
return false;
}
}
</script>

To call the function within the page itself, add the following to a link, button, or image:
<a href="javascript:verifyDelete('page_that_does_the_delete.php?key=#')">
delete</a>

Now, when the visitor clicks on the delete, a pop-up windows comes up and prompts asking if they are sure they want to delete the information. If they click on Cancel, then it just closes the pop-up and nothing happens. If they click on OK, then the delete program is called and the record is deleted.