Results 1 to 12 of 12

Hybrid View

  1. #1

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763

    HTML code, posting a picture

    HTML is an evil nasty thing, none of it makes sense and that is the idea of it, there are high and low levels of HTML much like the martial arts, but will high level HTML win out? Foked if I know, anyway this is just about posting a poxy jpg or gif.

    First off you got to size it down to a reasonable level, this can be done here, now you got to name the bugger, sv000023.jpg doesn't mean anything to search engines, "my thai girlfriend naked.jpg" does and helps google help people find those interesting pictures.

    So the coding,
    <img
    src="mydirtypicture.jpg"

    Why are they on different lines you may ask, foked if I know, bit like the monkeys, the firehose and the step ladder.

  2. #2
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    This is almost as bad as your cooking threads, Dog.

  3. #3
    Excommunicated baldrick's Avatar
    Join Date
    Apr 2006
    Last Online
    Today @ 05:50 AM
    Posts
    25,354
    Quote Originally Posted by dirtydog View Post

    So the coding,
    <img
    src="mydirtypicture.jpg"
    syntax error line 0 - where is the end of your fcuking request ?

    and I think you have found a bug in vbulletin - try and quick quote the section I have quoted - it starts to parse the img tag - wonder if it is exploitable

  4. #4
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    Quote Originally Posted by baldrick
    wonder if it is exploitable
    Kinda doubt it, being what appears to be a javaScript or DOM error message.
    There is no closing bracket and in xHTML there would need to be a closing tag or at least set up as a self closing tag.
    let me try a properly set up img tag;
    <img src="http://harley-tours-thailand.com/images/MaeHongSon-MaeSaiHarleyDavidsonTour-HarleyDavidson-ThailandHotel-evening.jpg" alt="Bikes in Chiang San" title="" width="631" height="420" />
    When the people fear their government, there is tyranny; when the government fears the people, there is liberty -- T. Jefferson


  5. #5
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    Nope. Putting HTML directly into a post really shouldn't work. When settng up a form such as this one you want to convert things like "<" to their respective codes so they render as text and not the actual control characters.

  6. #6
    Thailand Expat
    Marmite the Dog's Avatar
    Join Date
    Jun 2005
    Last Online
    08-09-2014 @ 10:43 AM
    Location
    Simian Islands
    Posts
    34,827
    MKP?.

  7. #7
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    MCP??

  8. #8

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    Got a great new thread for you frankie HTML links.

  9. #9
    Not a Mod. Begbie's Avatar
    Join Date
    Mar 2006
    Last Online
    @
    Location
    Lagrangian Point
    Posts
    11,367
    What's this all about ?

    HTML doesn't work when included in a post

  10. #10

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    ^There is a reason for that.
    HTML code is Off

  11. #11

    R.I.P.


    dirtydog's Avatar
    Join Date
    Jun 2005
    Last Online
    @
    Location
    Pattaya Jomtien
    Posts
    58,763
    Lets have a quick look at what frankie has done here.
    <img src="http://harley-tours-thailand.com/images/MaeHongSon-MaeSaiHarleyDavidsonTour-HarleyDavidson-ThailandHotel-evening.jpg" alt="Bikes in Chiang San" title="" width="631" height="420" />

    This bit tells the page that there is going to be a picture.
    <img src="

    This bit is the bit you may sometimes see when pictures load up real slow and also the search bots see this and tell it what the picture is about if you labelled it correctly as opposed to labeling everything as "dirty sex pictures".
    alt="Bikes in Chiang San"

  12. #12
    Northern Hermit
    friscofrankie's Avatar
    Join Date
    Jul 2005
    Last Online
    @
    Location
    Chiangmai, Thailand
    Posts
    7,526
    Quote Originally Posted by friscofrankie
    title="" width="631" height="420"
    Going even further, You see above I put in an "alt" tag this is read by search engines and is required for all images if you want your code to be xHTML compliant.
    This also gives you that nice little floating pop up when you mouse over in Internet explorer. The title tage should actually be the same and is handy and compliant for other tags as well (great way to put a help title on a link; too bad IE doesn't read it; maybe 8 does?) the alt & title attributes can be empty but the alt is required (e.g 'alt="" ') as stated above. The width & height attributes tell your browser what space to reserve for your image. In most modern browsers the page content can now continue to load around the reserved area while the image loads in the back ground. If you leave these attributes empty some browsers will interpret that as "0" and your image will not be rendered (rightly so), the space being filled by whjatever comes next in the code (depends on positioning and otehr styl attributes perhaps stored in a css file).

    Now if you are paying attention, you may have noticed that extra space and slash beofer the closing right bracket. This is a way to "self close" a tag in lieu of a </img> tag. Many engines will not recognize the "/>" as a closing tag unless there is a preceding space, don't forget the space. So, in order to have every advantage and be accepted as xHTML strict compliant I always add it. xHTML is a subset of xml delivering HTML tags. All of which is based on the SGML (Standard Generalized Markup Language) whish is based on GML the grandaddy of 'em all. it gets weird and there is no reason to lear the history unless you're bent that way.

    There are two standards adn you tell the browser what you are presenting in teh first line of code: for this page it is:
    "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"
    for all the sites I build i use the doctype strict as opposed to transitional.
    There are several other standards available; I've got a list of 'em somewhere and they are posted on the net

    There are even ways to trigger a "Quiks mode" for many browsers, then you gotta know the borwsers "quirks" IE has plenty, let me tell you. Don;t use Quirks mode unless you are serving to a closed intranet and can control client configs better yet don;t use them.

    There are ways, using xHTML to even add attributes that are acceptable but requires you to serve up your own DTD and declare your own namespace. This is tedious and requires a helluva lot more coding inteh HTML document diluting what ever keyword density you may have.

    If someone is truly interested in learning HTML to build sites for others or even tobuild a site that will drive business to your door, i would highly recommend skipping the transitional and simple HTML standards and learning strict xHTML. Good ol' HTML 4.01 promotes sloppy coding IMO it is easy to put up a page with it and is very forgiving of improperly nested tags and unclosed tags, but can lead to inconsistent and just plain ugly results, especially when adding in cascading style sheets and some DOM manipulation via Javascript.

    HTML doesn't work when included in a post
    Yeah as I posted earlier the brackets that start and stop tags "<" & ">" are put into the DB as htrml codes that allow a browser to render them as you see above. This si to prevent all kinds of ugly shit from happening. All a forum is is a complex and advanced Content management system with limited styling options. Each poster contributes content the forum then manages it to keep posts in the right thread under the right forum.

    If you were allowed to enter html there are dangers to the users and the render of the forum. The over head on filtering tag types (Don't allow <script></script tags for instance or make sure each <xxx> has a corresponding </xxx> closing tag for another) would make give this forum a huge footprint and the admin would be at the mercy of the coder that wrote this software to have ensured every malicious use of ever html tag was being filtered. Not sure I'd want to do that.

    For a hobby site or a vanity site much of the above is not necessary and normal HTML will work. But if you are going to do sites for others or want good SEO results, take the time to learn proper xHTML. well formed XML is much easier for Search Engines to parse and index properly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •