educational

Why I Did It: Working With Walnuts, Part 1

In this newest installment of my ongoing "Why I Did It" series, I'm going to redefine the acronym "WWW" from being short-hand for "World Wide Web" to "Working With Walnuts" ~ So what the heck am I talking about now? For some of you, it just might be the coolest thing you've read in a long time...

"The coolest thing you've read in a long time:" A bold statement indeed, and perhaps more appropriately it should be "the most helpful thing you've read in a long time:" for if you've never used them while building your sites before, I'm about to make your life a whole lot easier by exposing you to the wonderful world of HTML "includes."

As I typically do when delving into "technical" issues, I will toss this disclaimer out up-front: I am not a programmer, and often my approach is more akin to wielding a sledge-hammer than to the surgical coding precision of a "Root God" like my pal C-Dawg — and everything I discuss here should not be viewed as the "best" or most technically accurate information available. It is rather the proven techniques that I have used and developed through trial and error, cut n' paste, and several drunken rages over bits of code that have eluded me over the years. These things work on my virtually-hosted domains; use them at your own risk.

"Includes" for Fun and Profit
With that out of the way, let me enlighten those who are unfamiliar with them: "Includes" are just that; snippets of code that are "included" on (usually) multiple HTML pages for a wide variety of reasons and uses.

Why? Consider a site with *many* pages. Now say you want to update the credits and copyright info, or the navigation bar, or the background image and text colors. You could go and manually edit all of those pages, and perhaps need to do so all over again in the future. But wouldn't it be cool if you could assign the values in question to a simple text file, and then by editing that file, cause global changes to your site? Well, that's what includes can do for you!

I've used includes to provide common "headers" and "footers" on my pages. I've used them to replace the BODY tag, and I've used them to insert JavaScript into the HEAD tag. I almost always use them to insert navigational components that may be subject to change into my sites. While some alternative "work-arounds" such as using framesets for your site's navigation and Cascading Style Sheets (CSS) for BODY tag formatting are possible (and often desirable), the use of includes is often preferable. Let's take a closer look:

MS FrontPage "Include Bot"
My first exposure to using includes came from Microsoft FrontPage; a ubiquitous but quite controversial tool that I've used since version one was issued on diskette back in '94 or so. For those who are laughing, prior to my discovery of this gem from Heaven, I was writing HTML using "DosEdit" — and so FrontPage was a MAJOR improvement for me.

Anyways, at the time I had built my first network of AVS sites and was incorporating them into the first evolution of PORNWORKS. With roughly 500 pages, updating this pig was a seriously mind-numbing chore. A chore made much simpler by the FrontPage Include Bot. For those who've never used FrontPage, part of its power stems from a set of tools known as FrontPage Server Extensions that your Web Host installs on your server. These tools (known as "bots") contained an "include" bot, the value of which was dramatically shown to me when a major sponsor who provided most of the free content I used on my sites decided to change their linking URL syntax. I breathed a big sigh of relief — and thanked God that I was blessed with such powerful tools:

Because the sponsor's terms of use for their free image content dictated a link saying "Photos Courtesy of ____" underneath each image, and since each full-size pic was on a separate HTML page, I had my work cut out for me — or would have, if I hadn't used the following tag to place the sponsor's link across these several hundred pages that required it:

!--WEBBOT bot="Include" u-include="../_private/footer.htm" tag="BODY" startspan--

Now, all that I had to do was edit my footer.htm file, and voila! All of the pages were instantly updated with the sponsor's new linking code! I breathed a big sigh of relief — and thanked God that I was blessed with such powerful tools:

But what about those who do not use FrontPage? How can they use includes to perform these maintenance tasks and so much more? While other options may be available, two that I have (and do) use are PHP and Server Side Includes (SSI), both of which I'll discuss next in Part 2 ~ along with the "Walnut" revelation. Stay tuned! ~ Stephen

Copyright © 2024 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

opinion

To Cloud or Not to Cloud, That Is the Question

Let’s be honest. It just sounds way cooler to say your business is “in the cloud,” right? Buzzwords make everything sound chic and relevant. In fact, someone uninformed might even assume that any hosting that is not in the cloud is inferior. So what’s the truth?

Brad Mitchell ·
opinion

Upcoming Visa Price Changes to Registration, Transaction Fees

Visa is updating its fee structure. Effective April 1, both the card brand’s initial nonrefundable application fee and annual renewal fee will increase from $500 to $950. Visa is also introducing a fee of 10 cents for each transaction, and 10 basis points — 0.1% — on the payment volume of certain merchant accounts.

Jonathan Corona ·
opinion

Unpacking the New Digital Services Act

Do you hear the word “regulation” and get nervous? When it comes to the EU’s Digital Services Act (DSA), you shouldn’t worry. If you’re complying with the most up-to-date card brand regulations, you can breathe a sigh of relief.

Cathy Beardsley ·
opinion

The Perils of Relying on ChatGPT for Legal Advice

It surprised me how many people admitted that they had used ChatGPT or similar services either to draft legal documents or to provide legal advice. “Surprised” is probably an understatement of my reaction to learning about this, as “horrified” more accurately describes my emotional response.

Corey D. Silverstein ·
profile

WIA Profile: Holly Randall

If you’re one of the many regular listeners to Holly Randall’s celebrated podcast, you are already familiar with her charming intro spiel: “Hi, I’m Holly Randall and welcome to my podcast, ‘Holly Randall Unfiltered.’ This is the show about sex, the adult industry and the people in it.

Women In Adult ·
trends

What's Hot Now: Leading Content Players on Trending Genres, Monetization Strategies

The juggernaut creator economy hurtles along, fueled by ever-ascendant demand for personality-based authenticity and intimacy — yet any reports of the demise of the traditional paysite are greatly exaggerated.

Alejandro Freixes ·
opinion

An Ethical Approach to Global Tech Staffing

One thing my 24-year career as a technologist working to support the online adult entertainment industry has taught me about is the power of global staffing. Without a doubt, I have achieved significantly more business success as a direct result of hiring abroad.

Brad Mitchell ·
opinion

Finding the Right Payment Partner

Whenever I am talking with businesses that are just getting started, one particular question comes up a lot: “How do I get a merchant account?” It’s a simple question, but it has a complicated answer.

Jonathan Corona ·
opinion

The Taxman Cometh for Every Business

February may be the month of romance, but it is also a time when we need to think about something that inspires very little love: taxes. April is not far away, and the taxman is always waiting. This year, federal and most state income taxes are due Monday, April 15.

Cathy Beardsley ·
opinion

The Continuous Journey of Legal Compliance in Adult

The adult entertainment industry is teeming with opportunity but is also fraught with challenges, from anticipating consumer behavior to keeping up with technological innovation. The most labyrinthine of all challenges, however, is the world of legal compliance.

Corey D. Silverstein ·
Show More