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.

Wednesday, December 14, 2011

Choosing your Site Colors

If you have every got stumped on coming up with a color scheme for a website, try the Color Hunter website at http://www.colorhunter.com/.

With this website, you can upload an image, and the site will generate an odd number of colors (five) that can be used as the color palette for your web design and layout.

This is a great site too to give to clients to help them determine what they are looking for with the design. We sometimes save these swatches and e-mail them to the client as well.

This site has been added to our Utilities and resources page too. GREAT TOOL!

Should I Use Facebook as My Website?


I have debated this topic with many business owners in the past; however, according to the terms of use with Facebook, here is the proper way to get your business on Facebook.


Thursday, December 8, 2011

Add Google +1 to Your Website






We will have more information on this at a later date (as to why you want to add this to your site if you have social networking links), but for now, we would like to just provide the page that will help you setup your Google +1 button.


The page is: http://www.google.com/webmasters/+1/button/index.html

Once you add this to your site, your visitors can then click on the Google +1 icon to share the information within Google + (and within the search results for your page).
Again, as mentioned before, we will have more information on this later.

Wednesday, December 7, 2011

10 Tips Every Website Owner Should Know

This helpful article lays out 10 tips that every owner of every website should know to encourage others to link to their site. Topics include being at the forefront of new topics, using the power of social media, and starting off strong. By utilizing these 10 tips, the traffic to your site should increase drastically.


Monday, November 21, 2011

Configuring WordPress to have a thumbnail with article excerpt

We have recently begun to post RSS feed information on client websites. One of the issues we were having was the ability to include thumbnails next to the displays of the article excerpts. After many hours of looking through the WordPress code and the RSS2HTML utility, I found that WordPress needs a plug-in in order to make this happen correctly.

I downloaded, installed, and tested the Thumbnail for Excerpts – by Radu Capan… this plugin was exactly what we were looking for. Now there is a thumbnail next to the excerpts and all is well. This plug-in also has the capability to be configured.

You can download the plug-in at: http://www.cnet.ro/wordpress/thumbnailforexcerpts/

Saturday, November 19, 2011

What Search Engines See

nowing what search engines see when crawling your site and associated web pages is important to web designers and SEO analyzing. There are several tools out on the Internet that will help you review your coding and check the appropriate mark-up, but what does your page look like when all of this browser related information is removed? Stripping theses elements down to the bare minimum of text is what needs to be done in order to analyze key words and data that are important to writing your text so that it is optimized for organic search results.

The following tool is an excellent resource to help you with this task:

http://www.wmtips.com/tools/keyword-density-analyzer/

You are able to enter any URL and the tool will strip out all HTML/CSS/Javascript and provide you with the actual text that you can review to determine if a change to your data needs to be made.
With the report that this utility generates, you can then see the keyword phrases that are within the text, the percentage of the keyword density, and the Word Statistics that will tell you where the words or phrases appear within the tags.

7 Useful CSS Tools

“CSS or Cascading Style Sheets is still one of the most popular modes of designing a working website, yet, for many designers it can be at times a lengthy and tedious job. Thus, many web designers have [taken] to using CSS tools in order to quicken the process up as well as have more control over design elements…” This article by Marie Coles on September 4, 2010 outlines 7 Useful CSS tools. Read the article.

Tuesday, May 24, 2011

Scheduling Cron Jobs on Linux

Occasional we may need to setup some scheduled jobs for clients (or DNSTC websites). I found this website that explains the CRON utility pretty good and gives some great examples on how to modify and manage CRON jobs.

http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

Saturday, March 12, 2011

Getting the Word our 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.

Add a day, a week, 2 weeks, a month or multiple days to any date

Use the following to add time to the current date.

$date = date("Y-m-d");// current date
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");

Thursday, March 10, 2011

Removing the Continue Reading From the RSS feed in the TwentyTen Theme

When I started playing with the RSS feeds, I noticed that the feed would truncate and then add a link at the end that said Continue Reading with an arrow. I tried for a few hours to remove this since it was not fitting in with what I was trying to accomplish in the layouts. It turns out that this is actually added by the theme itself to the RSS feed.

For the purpose of using a blog for RSS news feeds, I have been just using the default TwentyTen Theme. You can actually go into the theme and remove that annoying Continue Reading if you want.

Here is how:

  1. Edit the file: [wordpress directory]/wp-content/themes/twentyten/functions.php
  2. Do a search for "Continue Reading" (Normally around line 241)
  3. Comment out the link within the function that starts with return…
  4. Save the file

Removed!


 

 

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.

Friday, February 18, 2011

Creating a new page type in WSMS

WSMS is a CMS system developed by DNS Technology Consultants, Inc.

The following are the directions on how to add a new page type in WSMS: 

  1. Create the new table (if needed)

  2. Add the new page to the pageTypes table in wsms_wsms

  3. If there is anything special that needs to take place for the page when the page is created, then add it to aj-new-page-add.php.

  4. Add the menu items for the new page into the menuitems table in wsms_wsms.

  5. Create the editor page for the content.

  6. Add a new function in wsms_ajax.js

  7. Go back to the menutiems table in wsms_wsms and add the new function that you created for the editor.

  8. Add a new reference in wsms_display_functions.php

  9. Add the table to the table definitions in wsms_wsms so that it can be installed.

Monday, February 14, 2011

Inserting Page Breaks when Printing Reports

Sometimes we have to create reports that are HTML based. Of course HTML is not conducive to formatted pages when being printed. You can, however, format the output using a combination of CSS code and DIV tags. This will then insert page breaks when the report is sent to the printer. Please be advised, that these page breaks will not be visible on the screen, but will be visible is you do a print preview.


In the CSS of the document or attached CSS add the following:

div.pagebreak {
page-break-after: always;
}

In the body of the document where you want to place the page break at the following:


<div class="pagebreak"> </div>

This will create a page break when the pages are printed.


For more information about CSS page breaks.


http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=909145&SiteID=1

Delete All Records in a MySQL Table – Quick Reference

Occasionally you may need to remove all records from a database table to reset the data. The following code is a quick reference to delete all of the records within a table. It can be copy/paste into a PHP page, then it will work after modify the reference to the database and/or tables.

This is just quick reference to remove all records from a database:

PHP Code:


$deleteSQL = "DELETE FROM inventory";
mysql_select_db($database_database, $databse);
$Result1 = mysql_query($deleteSQL, $database) or die(mysql_error());

Adding or Subtracting Dates in PHP

Working with dates within PHP sometimes come in handy, yet the syntax is not quite something that is easy to remember. You can add or subtract; days, months and years to the current date by using the mktime() function.


Here is some quick PHP code to add a month to the current date:
$next_month = mktime(0, 0, 0, date("m")+1, date("d"), date("y"));
$outDate = date("Y-m-d", $next_month);

For more on the mktime() function: http://php.net/manual/en/function.mktime.php


For more on the date() format function: http://php.net/manual/en/function.date.php

Turning on PHP errors on the Server

By default, if there is a PHP error, it is not displayed on the screen to the user. This is done for security reasons, but it does not aid the programmer in troubleshooting the issue. If you place some code within the .htaccess file, you can turn on the error display. The following code is used to turn on the error display for troubleshooting purposes:



php_flag display_errors on
php_value error_reporting 7


To add this code, perform the following:

  1. Use putty to log into server.
  2. cd to the appropriate /home/<users>/www directory
  3. nano .htaccess
  4. Copy and paste the code above to the file
  5. Save the .htaccess file… control/o

If you now refresh the page, you should see the error and you can be off to troublshoot!

Sunday, February 13, 2011

Submitting e-mail to pop-up window

Problem:

We had an issue with e-mail sending on an ASP Intranet and had to come up with a solution to redirect the sending of mail to a PHP page on the client's website.  The client's website did not have access to sendmail or any other program that could be used to send out the e-mail messages.

Solution:

To do this, we had to submit the data to a PHP page using a pop-up window, the only problem this caused was the form stayed on the screen with the entered data after it was submitted, since we used a pop-up window to submit the data.

I was able to solve this problem by adding the following code as an attribute to the form tag:
onsubmit="window.location='newpage.htm';"

This then changes the page that contains the form at the same time it is submitting the data to a pop-up page.

WYSIWYG Editor

I have purchased a WYSIWYG editor that can be used in any of the programming that DNSTC does and requires an editor.  A WYSIWYG editor is just that... What you see is what your get... this type of editor is used to replace textareas within a form.

The following is the documentation for the WYSIWYG editor that I purchased.

 http://www.wysiwygpro.com/index.php?id=56