Skip to main content

Adding Scripts to Your Site

Now that our new Dreamweaver Template based pages are almost ready to launch we can start to look at how best to exploit the facility for change and experiment that they offer. One of the options is the use of scripts to provide more interaction and possibly automated update. So here are some ideas:

For new webmasters, adding third-party software and scripting to
a website can be a really scary proposition. I remember when I
put my first scripts on my own website. Even with my basic DOS
programming experience in high school, I was still intimidated by
the whole process. I was so sure that I was going to screw
something up.
The very first script I ever installed on my website
was a Graphical Counter from BigNoseBird.com
(http://www.bignosebird.com/carchive/counter.shtml). I ended up
spending five days playing with the script to get it to display
just the way I wanted it displayed.
The second script I ever installed was a Recommend This Page
To A Friend script, also from BigNoseBird.com
(http://www.bignosebird.com/carchive/birdcast.shtml).
How Scripts Differ From Ordinary HTML
Basic web building uses HTML. HTML is simply a markup language
that helps you display text and images within a web page.
Most of us know the basics of how to build a webpage in HTML.
Others use website design software that interprets the requests
of the user to build a webpage in HTML.
In its most basic understanding, "scripting" is the process of
programming webpages to perform certain calculations, which will
affect how information is displayed on the webpage.
If you fill out a form on a website and hit send, chances are
that you are engaging a script of some sort to interpret the
information that you have sent to the website. If you return to a
website and it knows your username and password, then a script
has been involved in the process to make your return visit much
simpler. If you see a list of the most recent posts on a website,
then a script was used to make that information appear for your
consumption.
Scripting is most often handled in Javascript, VBscript
(Microsoft's answer to Javascript), PHP or Perl. Each one is
different in its structure and utilization.
Javascript can be added within the actual HTML of a webpage, and
it will fire when the page is loaded or when a request is made.
One way that I have recently seen Javascript used was for a page
that was doing a countdown of how much time remains until their
scheduled event. I have actually used Javascript to put news
feeds across the top of my webpages. Some Javascript is usually
placed in the page header, between the HEAD tags within the HTML.
Other Javascript is placed in the HTML body where the Javascript
activities are intended to appear.
VBscript works in the same manner as Javascript, but needs to
reside on a Microsoft Windows server.
PHP and Perl are more appropriately designated as languages. Both
are file types, and both allow you to design an entire website or
parts of a website to perform specific actions or functions.
A function is defined as, "Functions (also known as subroutines
and procedures) are chunks of code - parts of programs - which
can be called from another part of the program. Generally,
functions greatly enhance the space-efficiency and
maintainability of computer programs."
PHP and Perl Usage
Most servers have PHP and Perl functionality built into the web
hosting accounts. However, not all web hosting companies are
comfortable offering Perl (CGI-Bin) access to their users.
The reason why many web hosts shudder at the thought of making
the Perl libraries available to their users is because Perl is a
very powerful scripting language. In the hands of the wrong
person(s), Perl access in a server can be used to bring great
harm upon the server.
In order to operate Perl scripts, you must have the ability to
change and set file permissions on any file that resides on your
web hosting account. If you have just a basic Yahoo hosting
account, you will not be able to use any Perl applications on
your website. Some web hosts prohibit Perl usage at any level.
PHP is a new language that came about over the last few years. It
has been designed to allow people who do not have Perl access to
still have the ability to do scripting on their domain.
PHP generally does not require that you have access to file
permissions. In Perl, executable files must carry permissions
of 755. In PHP, most files will only be required to carry
permissions of 644, which are the same permissions a standard
webpage carries.
Fortunately for Perl programmers like me, PHP operates in many of
the same manners that Perl programs operate. The learning curve
from Perl to PHP is not very big at all.
Perl and PHP Bring With Them Powerful Libraries of Functions
What makes Perl and PHP as powerful as they are is the fact that
both utilize functions very well. Basically, a function will
carry out one specific task, and it will be able to be called
from anywhere in your software.
Generally, one of the very first actions to be taken in a script
is to INCLUDE all other files that are needed to operate the
software. The additional files generally carry many of the
functions that will be used in the software.
Then the software proceeds to carry out all of the necessary
functions in order to build a webpage in a specific, pre-defined
manner.
Programmers decide that there is a task that they perform often,
and then they build it into a function. In time, the programmer
will usually make his function available to the programming
community. And eventually, if the function is exceptionally
useful, then the function will be bundled in new releases of the
basic Perl or PHP build. All of these additional functions are
made available as the functions library.
How To Find Perl and PHP Scripts to Use On Your Website
There are actually many places you can go to find scripts to use
for your websites. Some websites offer directories of free and
paid scripts. Some websites will let you have their scripts if
they can have your email address.
Additionally, there are literally thousands of websites and
hundreds of books that will teach you how to write your own
scripts in any of these languages.
When I am in the mood to improve my coding abilities, I like
going to: http://www.planetsourcecode.com/ Planet Source Code
offers full scripts and pieces of scripts, with feedback, that
will teach me to be a better programmer.
My favorite place for locating scripts to download for free or to
buy is: http://www.resourceindex.com/
The Resource Index has one part of their site dedicated to Perl
scripts: http://cgi.resourceindex.com/
They also have one part of their site dedicated to PHP scripts:
http://php.resourceindex.com/
Another decent site for locating scripts is at:
http://www.hotscripts.com/
Many individual programmers also offer a lot of good software for
purchase or for free. A few of the good ones will be:
http://www.scriptarchive.com/
http://www.bignosebird.com/
http://www.willmaster.com/
In Conclusion...
If you have ever told yourself, "it would be cool (or useful) if
I could do this for my website's visitors," then you are in the
market to learn how to use scripts on your website.
If you have imagined it, chances are someone has programmed it.
If they have programmed it, then you will either be able to
download it for free, or to buy it at a very reasonable cost.
Before you plunk down your money to buy a program or script, be
sure that the programmer is willing to show you the script in
action. If it doesn't do what you want it to do, don't buy it. If
it does do what you want to do, then by all means, do consider
purchasing the software for use on your own site.
When programmers offer their software for sale, their
documentation is usually pretty good. They will tell you what
steps you need to take to install it on your server, and they
will tell you how to operate the software.
It is very realistic to believe that if you like what the
software does, you can have it live and operational on your
website in less than 30 minutes in most cases.
Good luck. I will be around later to see what cool stuff you have
added to your website. ;-)




---------------------------------------------------------------------
Gavyn Stewart is a writer and programmer. When we needed software
for our websites, we would always go on the hunt for software to
buy. At the end of the day when we could not find pre-packaged
software to do exactly what we wanted it to do, we built our
own. Since most programmers are not business owners, how could
they know what we really needed? We have started making some
of our own software available for purchase at:
http://www.StewartConsultants.com


OK - so we are not totally new to this - a large part of our site is done in PHP and we use a purchased Flash Script to present our streaming samples. But you get the idea.

On the Big Daddy watch front - McDar is down again this morning but there was a spike on Rankpulse yesterday and we have doubled the number of links to the site recognized by Google - quite a few of them from this blog. The rash of +'s in our search terms seems to be even more pervasive but it is not clear what difference they are making.

Popular posts from this blog

Introducing Children To Music… Strategies For Success

While we struggle to restore full menu fuctionality We thought you'd like to hear about a more uplifting topic: Introducing Children To Music - Strategies For Success I've heard a million parents lament the fact that they didn'’t get their children interested in music sooner. There are also hundreds of adults out there that wish they had learned how to play an instrument when they were younger. Studies actually support the idea that music stimulates certain brain connections and can actually help children grow smarter! Music also provides an invaluable outlet for safe expression of feelings and emotions, and can also serve as an important learning tool throughout your children's lives! Music helps educate in many ways, by developing children'’s memory skills and nourishing their spirit. Now, some children are a bit resistant to music at first, but you can easily find ways to encourage them to enjoy music in many different forms early in life. You need to si

Bigdaddy's in the Wings

Friday's customer mystery is unresolved ... But meanwhile, word on the SEO street is that, the next major re-index on Google, code name Bigdaddy, is being prepared and a few of our keywords seem to be in play. Since Jagger we have already seen our most competitive keywords drift back into effective obscurity but the rest seem pretty secure at the moment. It looks as if this could cause some further erosion but nothing too exciting. Our sub-menu problem isn't helping people to move around the site so we must get to the bottom of it. The response from support hasn't been too helpful so far but we shall persist. The production software problem is also proving intractable - technology is great when it works but more than a tad frustrating when it don't.

We're Back with the Symphonies

I can't believe it has taken so long but we are finally there and two Beethoven Symphonies have been published. An early bird has already bought the first movement of the Fifth! The hubris of recording these wonderful pieces on new world instruments caused me to pause for some time but each time I listened to them I heard something new and the overall effect was so positive I have pressed ahead. Inevitably some of the machinery was a bit creaky after such little use - not least my memory for where I had put things. We also bought a new player which is taking a little time to bed in - not helped by browser quirks on this PC which refused to play them - sorted now! We're looking to develop the use of play lists as a way of promoting sales but there is a bit more work to do on that. The auto play of the excerpt from the first movement of Beethoven's 5th is a temporary celebration and will be replaced by a more controllable solution later this week. After the repair work