Experimental forum for "Technology" discussions (computers, cameras, etc).

Re: Learn to Program: BBCode

Postby Craig Muhonen » Sun Sep 12, 2021 8:52 am

As far as your golf game goes Bob, "Find the bottom of your swing, and then just let the ball get in the way of your swing"
Sometimes you gotta' push the stick forward while you're lookn' at the ground
Craig Muhonen
User avatar
Contributor
Contributor
 
Posts: 934
Joined: Tue Nov 05, 2019 9:58 pm
Location: The Canyons of the Ancients

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Sun Sep 19, 2021 8:34 am

Quoting

OK, here's what we've covered so far:





FeatureExampleOpening tagClosing tagResult
Bold[b]Cape Kiwanda[/b][b][/b]Cape Kiwanda
Italic[i]Oregon[/i][i][/i]Oregon
Underline[u]1978[/u][u][/u]1978
Color[color=#FF0000]Glider[/color][color=#FF0000][/color]Glider


The next tag is one that's used automatically when you click the "Quote" button to reply to someone's post. It's called the "quote tag" and it looks something like this:

[quote="PersonsName"]Whatever they said[/quote]


Just like all other tags, the "quote" tag comes in pairs just like two bookends. There's an opening tag (on the left) and a closing tag (on the right). And just like all other tags, the closing tag starts with a "slash" ( [/quote]). The opening "quote" tag also takes an optional parameter which is the name of the person being quoted. The result looks like this:

PersonsName wrote:Whatever they said

You can see that the name is included as part of the quote block as "PersonsName wrote". That format can differ with different forum themes, but it will always show the name that you included. You can also make a quote block without a name. For example:

[quote]I invented the wheel![/quote]


That will look like this:

I invented the wheel!


You can see that there's no name in the quote because we don't know who wrote it.

One of the common reasons for using the quote tag manually is to break up a long quote and respond to each part separately. For example, here's a famous quote:

Declaration wrote:We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.


That could be manually broken into several separate quotes:

Declaration wrote:We hold these truths to be self-evident ...

Declaration wrote:... that all men are created equal ...

Declaration wrote:... that they are endowed by their Creator with certain unalienable Rights ...

Declaration wrote:... that among these are Life, Liberty and the pursuit of Happiness.


The important thing to remember about the quote tag is that the person's name must be in quotes (shown in red here):

[quote="PersonsName"]Whatever they said[/quote]


Exercise 3:

Post a famous quote to this topic and include the name of the person who said it (or wrote it) in the quote tag. Also post a second famous quote to this topic without any name in the quote tag.
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Sun Sep 19, 2021 11:57 am

Here's my solution to Exercise 3:

Here's a quote where I know the name. This was posted to the U.S. Hawks forum by Rick Masters on March 21st, 2015. Here's the link:

      https://ushawks.org/forum/viewtopic.php?f=2&t=1787&p=10842#p10842

Here's the quote:

Rick Masters wrote:People talk about the sport of hang gliding dying. It's not dying. It's being murdered. By the U$hPA.


Here's a quote where I don't know the name:

It is better to be on the ground wishing you were in the air ...
        ... than to be in the air wishing you were on the ground.
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Sat Oct 23, 2021 12:59 am

Lists

The list tag will introduce a new level of complexity to our BBCode. But let's first review all the tags that we've covered so far:






FeatureExampleOpening tagClosing tagResult
Bold[b]Cape Kiwanda[/b][b][/b]Cape Kiwanda
Italic[i]Oregon[/i][i][/i]Oregon
Underline[u]1978[/u][u][/u]1978
Color[color=#FF0000]Glider[/color][color=#FF0000][/color]Glider
Quote[quote="Ben Franklin"]Lost time is never found again.[/quote][quote="Ben Franklin"][/quote]
Ben Franklin wrote:Lost time is never found again.


If you look carefully you'll see a simple pattern of one opening tag eventually followed by one closing tag:






FeatureOpening tagClosing tag
Bold[b][/b]
Italic[i][/i]
Underline[u][/u]
Color[color=#FF0000][/color]
Quote[quote="Ben Franklin"][/quote]


A List will also have an opening tag and a closing tag, but it will require additional tags between those tags to specify the items in the list. Here's an example listing the structural tubes found on many modern gliders:

  • Leading Edges
  • Keel
  • Crossbar
  • Downtubes
  • Base Tube
  • Kingpost
Here's what that BBCode looks like:

[list][*]Leading Edges
[*]Keel
[*]Crossbar
[*]Downtubes
[*]Base Tube
[*]Kingpost[/list]

You'll notice the expected opening and closing tags of [list] and [/list]. But you'll also notice the "star" tag of [*] in front of each item in the list. This is something that we haven't seen in any of our simpler examples.

Exercise 4:

Post a short list of anything related to hang gliding.
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Learn to Program: BBCode

Postby Bill Cummings » Sat Oct 23, 2021 10:23 am

How about a, strike through line?
Bill Cummings
User avatar
Contributor
Contributor
 
Posts: 3359
Joined: Wed Jul 13, 2011 6:20 pm
Location: Las Cruces NM 88005 (Region 4)

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Sat Oct 23, 2021 9:44 pm

Bill Cummings wrote:How about a, strike through line?

Yes   sir   master   your highness   your eminence   Bill!    :salute:

In HTML there are at least 2 tags for strikethrough: <s> and <del>. The <del> version seems to be preferred, and that's the one we use here on the U.S. Hawks. Here's how it might be used:

To get this:

    I like love hang gliding!

Type this:

    I [del]like[/del] [ins]love[/ins] hang gliding!

You may notice that the underlining of the word "love" wasn't done with the [u] tag. Instead, I used the [ins] tag. This points out a subtle shift in the historical usage of HTML. In the early days, HTML was seen as a presentation language. In other words, if I wanted something to be presented as underlined, then I would use the [u] tag. The same with strikethrough being presented with [s].

But over time, HTML has moved from being purely presentational to being more semantic. So tags with meanings (or intentions) began to be preferred over tags that specified a particular presentation. Since the strikethrough font is generally intended to show deletion, the <s> tag became less preferred than the <del> tag which expressed the intention of deleting text rather than just showing text with a line through it. So the pair of tags <del> and <ins> became the preferred way to express deletion and insertion respectively (preferred over <s> and <u>).

Personally, I have mixed feelings on the intention/presentation issue. On one hand, I like the direct control of simply specifying that I want a line through my text without implying anything about what it means. On the other hand, using something like <ins> and <del> allows automated updating of text based on those intentions. It also allows for different kinds of presentation (maybe red for delete and green for insert) as well as better presentations for people with disabilities (screen readers, etc).

But regardless of my preferences (either way), the trend seems to be toward semantic mark up, and that's what we currently have on this forum.
 
 
P.S. After having said all of that, I decided to just go ahead and implement a real strikethrough using [s].

      This is a strikethrough using [s]: strikethrough
      This is a strikethrough using [del]: strikethrough

So now we have both. They look about the same here, but use the [s] version when you want to force a strikethrough regardless of context, and use the [del] when you want to indicate deletion regardless of how it might be presented in someone else's browser.

I hope that helps Bill. Thanks for making the U.S. Hawks better!!!!
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Mon Oct 25, 2021 11:46 pm

OK, here's my "homework" for Exercise 4:

  • Sherri Lightner
  • Barbara Bry
  • Joe LaCava

If this were a Jeopardy answer, the question would be:

Who are three San Diego City Councilmembers who have ignored the
deaths, bullying, and mismanagement at the Torrey Pines Gliderport?
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Re: Learn to Program: BBCode

Postby Craig Muhonen » Tue Oct 26, 2021 1:03 pm

"FOOD FOR THOUGHT"
These 'rosters' of truly , Dangerous, Stupid People DSP's, must always be called out.
,
and remember as Dr. Jordan Peterson says, "Don't talk to people who aren't listening to you".

These could also be some great Jeopardy questions, in this book by Carlo M. Cipolla ,at,
https://www.amazon.com/gp/aw/d/0385546475/ref=dbs_a_w_dp_0385546475
Sometimes you gotta' push the stick forward while you're lookn' at the ground
Craig Muhonen
User avatar
Contributor
Contributor
 
Posts: 934
Joined: Tue Nov 05, 2019 9:58 pm
Location: The Canyons of the Ancients

Re: Learn to Program: BBCode

Postby Chris McKeon » Wed Oct 27, 2021 8:12 am

1977
Chris McKeon
User avatar
Contributor
Contributor
 
Posts: 1574
Joined: Wed Jul 31, 2013 7:46 pm

Re: Learn to Program: BBCode

Postby Bob Kuczewski » Sun Dec 19, 2021 7:33 am

Lists with Numbers

The last exercise introduced lists. By default, the list tag will generate a "bullet list" where each item has a "dot" (or "bullet point") in front of it. That kind of list is often used to express a collection of items that don't need to be in any particular order.

But sometimes the order of the items is important. For example, this list expresses the general steps to set up a typical single-surface hang glider:

  1. Unzip the glider bag
  2. Remove the battens
  3. Set up the control bar
  4. Flip the glider onto the control bar
  5. Tie down the glider as needed
  6. Remove the bag, sail ties, and pads
  7. Spread the wings
  8. Insert the central battens
  9. Tension the sail
  10. Attach rear kingpost wire
  11. Attach the nose wire
  12. Insert the outer battens
  13. Install washout struts and tip wands
  14. Preflight the glider carefully

You'll notice that each item is numbered to imply an ordering. To get this numbering, you just add an "=1" inside the opening "list" tag like this:

        [list=1]

The rest of the list is unchanged. It's that easy. Here's what that BBCode looks like:

[list=1]
[*]Unzip the glider bag
[*]Remove the battens
[*]Set up the control bar
[*]Flip the glider onto the control bar
[*]Tie down the glider as needed
[*]Remove the bag, sail ties, and pads
[*]Spread the wings
[*]Insert the central battens
[*]Tension the sail
[*]Attach rear kingpost wire
[*]Attach the nose wire
[*]Insert the outer battens
[*]Install washout struts and tip wands
[*]Preflight the glider carefully
[/list]


Compare the code above to the results further above. Where did the numbers come from? They were automatically generated. Each number in the sequence was inserted in place of each item tag ( [*] ). This is very helpful when you're editing a list because you can add or remove items without renumbering the rest of the list.


Exercise 5:

Post a short numbered list of steps for anything related to hang gliding.
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8374
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

PreviousNext
Forum Statistics

Who is online

Users browsing this forum: No registered users and 8 guests

Options

Return to Technology Forum

cron