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

profile

WIA Profile: Samantha Beatrice

Beatrice credits the sex positivity of Montreal for ultimately inspiring her to pursue work in adult entertainment. She had many friends working in the industry, from sex workers to production teams, so it felt like a natural fit and offered an opportunity to apply her marketing and social media savvy to support people she truly believes in and wants to see succeed.

Women In Adult ·
opinion

Understanding the Latest Server Processors

Over the last decade, we mostly stopped talking about CPU performance. Recently, however, there has been a seismic and exciting change in the CPU landscape, due to innovation by a chip company called Advanced Micro Devices (AMD).

Brad Mitchell ·
opinion

User Choice, Privacy and the Importance of Education in AV

As we discussed last month, age verification in the adult sector is critical to ensuring legal compliance with ever-evolving regulations, safeguarding minors from inappropriate content and protecting the privacy of adults wishing to view adult content.

Gavin Worrall ·
opinion

Maintaining Payment Processing Compliance When the Goalpost Keeps Moving

VIRP is the new four-letter word everyone loves to hate. The Visa Integrity Risk Program went into effect last year, and affects several business types — including MCC 5967, which covers adult and anything else with nudity, and MCC 7273, dating services that don’t allow nudity.

Jonathan Corona ·
opinion

Making the Most of Your Sales Opportunities

The compliance road has been full of twists and turns this year. For many, it’s been a companywide effort just to make it across that finish line. Hopefully, most of us can now return our attention to some important things we’ve left on the back burner for months — like driving revenue.

Cathy Beardsley ·
profile

YourPaysitePartner Marks 25-Year Anniversary Amid Indie Content Renaissance

For 25 years, YourPaysitePartner has teamed up with stars and entrepreneurial brands to bring their one-stop-shop adult content dreams to life — and given the indie paysite renaissance of the past few years, the company’s efforts have paid off in spades.

Alejandro Freixes ·
opinion

WIA Profile: B. Wilde

B. Wilde considers herself a strategic, creative, analytical and entertaining person by nature — all useful traits for a “marketing girlie,” a label she happily embraces.

Women In Adult ·
opinion

Proportionality in Age Verification

Ever-evolving age verification (AV) regulations make it critical for companies in the adult sector to ensure legal compliance while protecting the privacy of adults wishing to view adult content. In the past, however, adult sites implementing AV solutions have seen up to a 60% drop in traffic as a result.

Gavin Worrall ·
opinion

Goodbye to Noncompete Agreements in the US?

A noncompetition agreement, also known as a noncompete clause or covenant not to compete, is a contract between an employer and an employee, or between two companies.

Corey D. Silverstein ·
opinion

The Search for Perfection in Your Payments Page

There has been a lot of talk about changes to cross sales and checkout pages. You have likely noticed that acquirers are now actively pushing back on allowing merchants to offer a negative option, upsell or any cross sales on payment pages.

Cathy Beardsley ·
Show More