Advertisement:

Author Topic: Celebrity Quotes  (Read 50109 times)

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Celebrity Quotes
« on: May 27, 2005, 01:43:27 PM »
This mod will add a dropdown box for instant celebrity quotes to your forum. However, the way I have done it requires the Custom BBCode mod to be installed. First, go to your Custom BBCode box and copy/paste this into it:
Code: [Select]
cableguy <B>Larry the Cable Guy says:</B><BR><TABLE BORDER=2 WIDTH=75%><TR><TD WIDTH=100><IMG SRC="http://www.opticalnightmare.wm-talk.com/images/icons/larrythecableguy.jpg" align=left BORDER=1></TD><TD>$1</TD></TR></TABLE>
conan <B>Conan O'Brien says:</B><BR><TABLE BORDER=2 WIDTH=75%><TR><TD WIDTH=110><IMG SRC="http://www.opticalnightmare.wm-talk.com/images/icons/conan.jpg" align=left BORDER=1></TD><TD>$1</TD></TR></TABLE>
johncleese <B>John Cleese says:</B><BR><TABLE BORDER=2 WIDTH=75%><TR><TD WIDTH=76><IMG SRC="http://www.opticalnightmare.wm-talk.com/images/icons/johncleese.jpg" align=left BORDER=1></TD><TD>$1</TD></TR></TABLE>
arnold <B>Arnold Schwarzenegger says:</B><BR><TABLE BORDER=2 WIDTH=75%><TR><TD WIDTH=78><IMG SRC="http://www.opticalnightmare.wm-talk.com/images/icons/arnold.jpg" align=left BORDER=1></TD><TD>$1</TD></TR></TABLE>

It would be appreciated if you got your own hosting for the images. Then, open your Themes > Default > Post.template.php, and look for this:
Code: [Select]
// Print a drop down list for all the colors we allow!
if (!isset($context['disabled_tags']['color']))
echo ' <select onchange="surroundText(\'[color=\'+this.options[this.selectedIndex].value+\']\', \'[/color]\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt['change_color'], '</option>
<option value="Black">', $txt[262], '</option>
(The other colors that go in between)
<option value="LimeGreen">', $txt[275], '</option>
</select>';

After, press ENTER and add this:
Code: [Select]
// Print a drop down list for miscellaneous code!
if (!isset($context['disabled_tags']['misc.']))
echo ' <select onchange="surroundText(\'[\'+this.options[this.selectedIndex].value+\']\', \'[/\'+this.options[this.selectedIndex].value+\']\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">', $txt, '</option>
<option value="cableguy">', cableguy, '</option>
<option value="conan">', conan, '</option>
<option value="johncleese">', johncleese, '</option>
<option value="arnold">', arnold, '</option>
</select>';

And there you have it. Instant quotes from John Cleese, Arnold Schwarzenegger, Larry the Cable Guy, and Conan O'Brien. Presented by Mexican_Pirate. Revolutionizing the way you waste your time.

Offline z3rb

  • Semi-Newbie
  • *
  • Posts: 41
Re: Celebrity Quotes
« Reply #1 on: May 28, 2005, 09:16:25 AM »
nice, i like how it is on your forum.

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #2 on: May 28, 2005, 10:16:01 AM »
You realize that the HTML you posted in that first block is not valid for XHTML which is the default for this board.

Offline z3rb

  • Semi-Newbie
  • *
  • Posts: 41
Re: Celebrity Quotes
« Reply #3 on: May 28, 2005, 12:33:20 PM »

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Re: Celebrity Quotes
« Reply #4 on: May 31, 2005, 11:46:22 AM »
You realize that the HTML you posted in that first block is not valid for XHTML which is the default for this board.
But it is valid if you Copy/Paste it into the box that is given by the "Custom BBCode" mod. Like z3rb said, even go to my web site to see it in action.

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #5 on: May 31, 2005, 11:52:53 AM »

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Re: Celebrity Quotes
« Reply #6 on: May 31, 2005, 12:20:02 PM »
Oh my... That's... that's not good... So how do I fix it?

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #7 on: May 31, 2005, 12:48:25 PM »
probably by using standard compliant markup

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Re: Celebrity Quotes
« Reply #8 on: May 31, 2005, 01:28:28 PM »
I don't know XHTML, though.

And does that thing see all plain HTML as an error? Because I've had no problems with this code, no matter what browser I try it in.

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #9 on: May 31, 2005, 01:34:02 PM »
first all tags are suppose to be lowercase
<B> = invalid
<b> = valid

Second every tag must be closed
<br> = invalid
<br/> = valid

Third all attribute values must be enclosed in quotes
<table border=2> = invalid
<table border="2"> = valid

Forth all images must have an alt specified
<img src="blah.jpg" /> = invalid
<img src="blah.jpg" alt="" /> = valid

There might be more things also.  Just look at the validation errors.  For the most part they are fairly easy to understand

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Re: Celebrity Quotes
« Reply #10 on: May 31, 2005, 01:46:32 PM »
That's it? That's all XHTML is? That's easy, I'll go fix it.

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #11 on: May 31, 2005, 01:48:15 PM »
No thats not "all" XHTML is, but thats the majority points I saw in your example code

Offline Tristan Perry

  • SMF Hero
  • ******
  • Posts: 2,498
  • Gender: Male
    • Tristan Perry
Re: Celebrity Quotes
« Reply #12 on: May 31, 2005, 01:57:45 PM »
I wouldn't worry too much about being XHTML compliant. I don't stick to it at the moment and my website displays fine in Internet Explorer, Opera and Firefox. Although it has some advantages, being XHTML compliant is more for added peace of mind and makes your website look good to web designs and the like.

*Waits to be flamed*  :P What I have said above it true, for me. In my experiences complying to XHTML has been a waste of time.

Offline Mexican_Pirate

  • Semi-Newbie
  • *
  • Posts: 33
Re: Celebrity Quotes
« Reply #13 on: May 31, 2005, 02:03:34 PM »
Okay, I got it done the *right* way, just for all of you who need it to be correct.
Code: [Select]
cableguy <b>Larry the Cable Guy says:</b><br/><table border=2 width="75%"><tr><td width="100"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/larrythecableguy.jpg" align="left" border="1" alt="Photo of Larry the Cable Guy" /></td><td>$1</td></tr></table>
conan <b>Conan O'Brien says:</b><br/><table border="2" width="75%"><tr><td width="110"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/conan.jpg" align="left" border="1" alt="Photo of Conan O'Brien" /></td><td>$1</td></tr></table>
johncleese <b>John Cleese says:</b><br/><table border="2" width="75%"><tr><td width="76"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/johncleese.jpg" align="left" border="1" alt="Photo of John Cleese" /></td><td>$1</td></tr></table>
arnold <b>Arnold Schwarzenegger says:</b><br/><table border="2" width="75%"><tr><td width="78"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/arnold.jpg" align="left" border="1" alt="Photo of Arnold Schwarzenegger" /></td><td>$1</td></tr></table>
And you know what? It doesn't even look different, all that did was make it more confusing.

Offline Tristan Perry

  • SMF Hero
  • ******
  • Posts: 2,498
  • Gender: Male
    • Tristan Perry
Re: Celebrity Quotes
« Reply #14 on: May 31, 2005, 03:10:06 PM »
Okay, I got it done the *right* way, just for all of you who need it to be correct.
Code: [Select]
cableguy <b>Larry the Cable Guy says:</b><br/><table border=2 width="75%"><tr><td width="100"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/larrythecableguy.jpg" align="left" border="1" alt="Photo of Larry the Cable Guy" /></td><td>$1</td></tr></table>
conan <b>Conan O'Brien says:</b><br/><table border="2" width="75%"><tr><td width="110"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/conan.jpg" align="left" border="1" alt="Photo of Conan O'Brien" /></td><td>$1</td></tr></table>
johncleese <b>John Cleese says:</b><br/><table border="2" width="75%"><tr><td width="76"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/johncleese.jpg" align="left" border="1" alt="Photo of John Cleese" /></td><td>$1</td></tr></table>
arnold <b>Arnold Schwarzenegger says:</b><br/><table border="2" width="75%"><tr><td width="78"><img src="http://www.opticalnightmare.wm-talk.com/images/icons/arnold.jpg" align="left" border="1" alt="Photo of Arnold Schwarzenegger" /></td><td>$1</td></tr></table>
There's still a few mistakes, e.g. "border=2"

And you know what? It doesn't even look different, all that did was make it more confusing.
Yep. It takes time and effort for.. hardly any gain. Fairly pointless if you ask me.

Offline z3rb

  • Semi-Newbie
  • *
  • Posts: 41
Re: Celebrity Quotes
« Reply #15 on: May 31, 2005, 03:24:44 PM »
yeah, whats the point in it being XHTML compliant?

Offline Thantos

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 16,163
  • Gender: Male
Re: Celebrity Quotes
« Reply #16 on: May 31, 2005, 03:32:50 PM »
Quote
Yep. It takes time and effort for.. hardly any gain. Fairly pointless if you ask me.
Standards exist for a reason.  They are not pointless.  If you don't want to follow the standard thats fine, at least remove that image at the bottom of the forum that says you do.

Quote
I wouldn't worry too much about being XHTML compliant. I don't stick to it at the moment and my website displays fine in Internet Explorer, Opera and Firefox. Although it has some advantages, being XHTML compliant is more for added peace of mind and makes your website look good to web designs and the like.
What about the host of other browsers out there?  By following the standard you can ensure that it will displaying correctly and if you didn't make any assumptions it should look the same.

A lot of these can be fixed with a simple text editor and using find and replace

As I said if you don't want to follow the standard fine, but I will point it out since its a goal we should strive for.

Offline Ben_S

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,702
  • xxx
Re: Celebrity Quotes
« Reply #17 on: May 31, 2005, 03:44:18 PM »
And you know what? It doesn't even look different, all that did was make it more confusing.
Yep. It takes time and effort for.. hardly any gain. Fairly pointless if you ask me.

No problem if it's for you own board only, if it's in tips and tricks though, it needs to be valid for the reasons mike said.
Liverpool FC Forum with 14 million+ posts.

Offline Tristan Perry

  • SMF Hero
  • ******
  • Posts: 2,498
  • Gender: Male
    • Tristan Perry
Re: Celebrity Quotes
« Reply #18 on: May 31, 2005, 04:09:34 PM »
Disclaimer: Firstly I don't mean to sound argumentative, I'm mearly saying what I know/have learnt from my past experiences.

Standards exist for a reason.  They are not pointless.  If you don't want to follow the standard thats fine, at least remove that image at the bottom of the forum that says you do.
Not meaning to sound dense or anything, although what is the reason? Also I have removed the XHTML compliant image from the bottom of my forum..?

What about the host of other browsers out there?  By following the standard you can ensure that it will displaying correctly and if you didn't make any assumptions it should look the same.

A lot of these can be fixed with a simple text editor and using find and replace

As I said if you don't want to follow the standard fine, but I will point it out since its a goal we should strive for.
The host of other browsers? The one's I reffered to (Firefox reffering to Mozilla and Netscape BTW) account for about 0.1% of the browser usage on the internet, if that. There are other browsers out there, although they aren't used much.

Also I have heard (Before now) that following the standards supposedly makes sure that you're website displays correctly in all browsers, although that's not true. Web standards are nowadays generally using XHTML and CSS: CSS for style and general layout, XHTML for content. CSS2 intergration for the most used browsers is very poor. If I make a website following the strictest web standards it will look terrible in different browsers and making it cross-browser is a nightmare. Using HTML for layout and content and CSS for a bit of styles has worked much better for me: Fast enough loading pages and works well in 99.9% of internet user's browsers.

No problem if it's for you own board only, if it's in tips and tricks though, it needs to be valid for the reasons mike said.
Sure, I hadn't realized that.
« Last Edit: May 31, 2005, 04:11:34 PM by Tau Online »

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Celebrity Quotes
« Reply #19 on: May 31, 2005, 09:16:30 PM »
I'm glad to hear you don't care about:
  - my friend who largely uses a PDA.
  - my other friend who is blind.
  - my brother who often uses Links while recompiling his kernel to a new burning-edge version.

Web standards are also about just plum being correct.  If I see a website which isn't correct, it leads me to believe the person maintaining it isn't trustworthy; if they don't care to be correct with HTML, who knows what else they just "do what works" for?

For example, I'd never hire a lawyer with bad HTML in his or her website.  This means he or she either doesn't care enough to hire knowledgable people to get the job done RIGHT, doesn't do it right HIMSELF (or herself), or doesn't even KNOW there's a problem.  Any of those three are sure to reflect on his or her legal practices.

I see you don't talk lik u dnt now how 2 spel
y do u typ rite xcpt wit htm? I can stil red it! every1 can

-[Unknown]
« Last Edit: May 31, 2005, 09:20:58 PM by [Unknown] »