New html mockup code
Matthew Leverton

Before you read this post press the hard refresh button on your browser (e.g., CTRL-F5).

Overview

The A.cc HTML mockup (yes, a bad pun on markup) code has been overhauled. Almost everything is different, so you really do need to pay attention to the changes. This is not an attempt to fix any shortcomings in the implementation of the previous version. Instead, the focus was on modernizing the language itself to be less whimsical than the bbcode-ish variety.

For the impatient, refer to the Cheat Sheet. <-- IF YOU ONLY HAVE A FEW MOMENTS TO LIVE, READ THIS

I wrote the thing entirely over the past weekend. As always, I do no advanced testing. Edge cases are particularly prone to doing weird things. If you come across something that isn't displayed properly, then tell me about it. But first make sure it isn't by-design behavior by reading how everything is supposed to work.

If you find ways to inject arbitrary HTML and JavaScript, please tell me privately and give me at least 20 years to fix it before publicly disclosing it. I am not interested in DoS or anything like that. So don't try.

If you have comments, concerns, or questions, then ask (after reading all of the material).

It is not backward compatible; don't ask for it to be.

What's new?

HTML tags replace old [square bracket] tags

Think <b> instead of [b], <quote> instead of [quote], etc. All tags must be well formed XHTML. This means:

  • All attributes have a name and a value

  • All attribute values must be quoted with double quotes.

  • All tags must be closed, and in the proper sequence.

The following are errors:

  • <foo bar> - bar has no value.

  • <foo bar=1> - bar's value is not quoted.

  • <foo><bar></foo></bar> - foo is closed before <bar>

  • <img src="foo.png"> - The tag is not closed. It can be closed with a trailing slash: <img src="foo.png" />

Unlike real XHTML, all errors are ignored. This allows you to not have to worry about escaping XHTML characters. e.g., you can safely enter fake tags like <grin> or invalid sequence like <a-b>.

There are limitations on what tags can hold. It should be obvious, but things like <a><quote> are not allowed. The invalid inner tags will just be printed out as-is.

The escape character: \

In some situations, you may want to disable transformations from taking place. To do that, you can prefix them with a \ character. The escape sequence only goes into effect if the next character can be escaped. So both a single \ and double \\ will show up just fine, as there's nothing to escape. It's meant for something like \<b> to be displayed as <b>.

Again, the goal is for it to just work. If you find yourself wanting to escape a character, it will probably work. If not, it will probably show up as-is.

One exception is that smileys cannot be escaped. However, they now must be preceded by whitespace. Thus Foo::Par doesn't trigger a smiley, nor does a bewildered question???

Automatic spacing

Paragraphs and new lines automatically inserted. A technicality: <p> tags are now generated in place of double <br /> tags.

Note that most inline tags do not support spacing. This is by design! If you try to put line breaks inside (e.g.) <b> tags, nothing will happen (other than a single whitespace character).

Wiki shorthand

Most of the tags can be triggered via wiki-like symbols. e.g., *bold* -> bold, /italics/ -> italics, _underline_ -> underline. It especially makes lists easy to use.

Refer to the cheat sheet for the full list.

Headers

The <h1> ... <h5> tags are now implemented. Handle with care!

Very few posts need them. Unless you are composing a very complex document with logical sub-sections, do not use them.

And when you do use them, don't feel compelled to start out with <h1> or <h2>. They both add horizontal lines which may be distracting in a small post. <h3> is more appropriate to divide a medium sized post up into a few sections.

Pre-formatted text

The <pre> tag now works exactly like it does in regular HTML. All inline tags that do not change the size of the font can be used inside it.

There is a new <terminal> tag that can be used to display output from a terminal, compiler, etc. It will likely replace most usage of <pre>. It scrolls like a <code> box, but does not get colored.

References

Back up your madeup facts with references via the <ref> tag. e.g.:

The Honan Chapel is located in Cork, Ireland. [1]

Spoilers

"Spoiler" text can be hidden via the <spoiler> tag. The contents will be hidden until you click the "reveal" link.

Embedded objects

Multimedia can be embedded via the <object> tag. By default, embedded content will be an image. Clicking on the image will create the embedded object's widget.

You can adjust the default behavior in one of two ways (not implemented yet):

  1. More Strict: Embedded objects are always displayed as text links, or


  2. Less Strict: Embedded objects are automatically activated. (Not to be confused with automatically playing.)

Embedding an image is the same thing as using the <img> tag, so none of the above applies to them.

Currently, not much is actually implemented other than an mp3 player. But the idea is that it could support any type of embedded content.

Inline images

There are a few subtle changes to the images:

  • Clicking on thumbnails will not ever display any image larger than 1024 pixels. I'm tired of people uploading five billion megapixel images showing off grains and blurs. To display the super-full sized image, you will have to shift-click on it.


  • If a thumbnail is also a link, you can activate the link via ctrl-clicking on the image. Those thumbnails will have blue borders. (But I still don't recommend putting images inside links.)


  • Images from attachments are no longer cached! If you upload an attachment, link to it, and then delete it, the original full size image will be gone.

    Also, strictly to save disk space, images are no longer double cached. Displaying the same image from multiple sources will result in a single cached instance.


  • Inline images (e.g., BMP) that are not web-friendly are converted to PNG files.

Wiki Marks

The wiki style is easy to use, yet doesn't get in the way when you don't want it. You can generally mix and match wiki marks with XHTML without any problems.

One basic restriction that applies to all wiki marks is that they only work on a single line.

Font styles

There are four font styles that can be activated via wiki marks:

  • *bold* -> bold

  • /italics/ -> italics

  • _underline_ -> underline

  • -strikeout- -> strikeout

To prevent accidental transformations, they are only triggered if they wrap words or phrases. Even a space before or after (e.g., * foo * ) will prevent anything from happening. Punctuation is not considered to start a word.

As a side effect of that, you cannot nest them one after the other: */bold italics?/* becomes /bold italics?/. However, there will likely be an exception added to allow that.

Headers

The wiki marks for the headers are an equal number of equal signs that begin and end a line.

= H1 =
== H2 ==
etc...

The end lines are relative to the original text format. Something like this will not work:

<quote>= H1 =</quote>

Lists

Lists are much easier to use with wiki marks than with XHTML tags.

Simple List

The first character must be an asterisk followed by a single space.

* line one
* line two

  • line one

  • line two

Double Spacing

You can double space lists as exepected.

* line one
* line two

* double space

  • line one

  • line two


  • double space

Nested List

Each nested layer must line up precisely under the previous layer. Anything else will 'break' the list.

* A
  * A.1
  * A.2
* B

  • A

    • A.1

    • A.2

  • B

Lists with Paragraphs

You can use paragraphs with wiki lists as long as you maintain the indentation level.

* First Paragraph.

  Second Paragraph.
* Next point.

  • First Paragraph

    Second Paragraph

  • Next point.

Ordered Lists

Replace the asterisk with a pound (#) sign to use number lists.

# Point #1
# Point #2

  1. Point #1

  2. Point #2

Links

As before, any plain text link will be transformed into an active web link.

If you wish to give a link a name, you can use the following format:

[http://www.allegro.cc Allegro.cc] -> Allegro.cc

The caption portion is not optional! If you don't want a caption, then don't included the brackets. To learn why, read the next section...

References

To create a reference, simply use a wiki link with no caption.

SDL sucks! [http://www.allegro.cc] -> SDL sucks! [2]

The link must be to an HTML or plain text page. To learn why, read the next section...

Images and Embedded Objects

To embed an image or supported object, just do this:

[http://www.allegro.cc/files/attachment/597831]
media player

Tests

Miscellaneous

Spoiler Tag

Why did the chicken cross the road?

Because he wanted to get hit by a car!

Terminal Output

D:\CodeBlocks\allegro>cmake -G "MinGW Makefiles" -DSHARED=on
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: D:/CodeBlocks/MinGW/bin/gcc.exe
-- Check for working C compiler: D:/CodeBlocks/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: D:/CodeBlocks/MinGW/bin/g++.exe
-- Check for working CXX compiler: D:/CodeBlocks/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using MINGDIR: D:/CodeBlocks/MinGW/bin
-- Performing Test HAVE_DM_POSITION
-- Performing Test HAVE_DM_POSITION - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include files ALLEGRO_HAVE_DIRENT_H
-- Looking for include files ALLEGRO_HAVE_DIRENT_H - found
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H
-- Looking for include files ALLEGRO_HAVE_INTTYPES_H - found
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H
-- Looking for include files ALLEGRO_HAVE_LINUX_JOYSTICK_H - not found.
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H
-- Looking for include files ALLEGRO_HAVE_STDBOOL_H - found
-- Looking for include files ALLEGRO_HAVE_STDINT_H
-- Looking for include files ALLEGRO_HAVE_STDINT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H
-- Looking for include files ALLEGRO_HAVE_SYS_IO_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H
-- Looking for include files ALLEGRO_HAVE_SYS_STAT_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H
-- Looking for include files ALLEGRO_HAVE_SYS_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_TIME_H
-- Looking for include files ALLEGRO_HAVE_TIME_H - found
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H
-- Looking for include files ALLEGRO_HAVE_SYS_UTSNAME_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H
-- Looking for include files ALLEGRO_HAVE_SYS_TYPES_H - found
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_SYS_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_MACHINE_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H
-- Looking for include files ALLEGRO_HAVE_LINUX_SOUNDCARD_H - not found.
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H
-- Looking for include files ALLEGRO_HAVE_OSATOMIC_H - not found.
-- Looking for getexecname
-- Looking for getexecname - not found
-- Looking for mkstemp
-- Looking for mkstemp - not found
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for mprotect
-- Looking for mprotect - found
-- Looking for sched_yield
-- Looking for sched_yield - not found
-- Looking for stricmp
-- Looking for stricmp - found
-- Looking for strlwr
-- Looking for strlwr - found
-- Looking for strupr
-- Looking for strupr - found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for ftello
-- Looking for ftello - not found
-- Check size of _Bool
-- Check size of _Bool - done
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV
-- Performing Test ALLEGRO_HAVE_PROCFS_ARGCV - Failed
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H
-- Performing Test ALLEGRO_HAVE_SV_PROCFS_H - Failed
-- Performing Test ALLEGRO_HAVE_VA_COPY
-- Performing Test ALLEGRO_HAVE_VA_COPY - Success
-- Check if constructors are supported - yes
-- Found DINPUT: D:/CodeBlocks/MinGW/include
-- Found D3D9: D:/CodeBlocks/MinGW/include
-- Found DSOUND: D:/CodeBlocks/MinGW/include
-- Found ZLIB: D:/CodeBlocks/MinGW/lib/libz.a
-- Found PNG: D:/CodeBlocks/MinGW/lib/libpng.a
-- Found JPEG: D:/CodeBlocks/MinGW/lib/libjpeg.a
-- Found FLAC: D:/CodeBlocks/MinGW/include
-- Performing Test FLAC_COMPILES
-- Performing Test FLAC_COMPILES - Success
-- Found VORBIS: D:/CodeBlocks/MinGW/include
-- Performing Test VORBIS_COMPILES
-- Performing Test VORBIS_COMPILES - Success
-- Found SNDFILE: D:/CodeBlocks/MinGW/include
-- Found Freetype: D:/CodeBlocks/MinGW/lib/libfreetype.dll.a
-- Configuring done
-- Generating done
-- Build files have been written to: D:/CodeBlocks/allegro

D:\CodeBlocks\allegro>mingw32-make
Scanning dependencies of target allegro
[  0%] Building C object CMakeFiles/allegro.dir/src/allegro.c.obj
[  1%] Building C object CMakeFiles/allegro.dir/src/bitmap_new.c.obj
[  1%] Building C object CMakeFiles/allegro.dir/src/blenders.c.obj
[  2%] Building C object CMakeFiles/allegro.dir/src/config.c.obj
[  2%] Building C object CMakeFiles/allegro.dir/src/convert.c.obj
[  3%] Building C object CMakeFiles/allegro.dir/src/display_new.c.obj
[  3%] Building C object CMakeFiles/allegro.dir/src/display_settings.c.obj
[  4%] Building C object CMakeFiles/allegro.dir/src/dtor.c.obj
[  4%] Building C object CMakeFiles/allegro.dir/src/events.c.obj
[  5%] Building C object CMakeFiles/allegro.dir/src/evtsrc.c.obj
[  5%] Building C object CMakeFiles/allegro.dir/src/fshook.c.obj
[  6%] Building C object CMakeFiles/allegro.dir/src/fshook_stdio.c.obj
[  6%] Building C object CMakeFiles/allegro.dir/src/graphics.c.obj
[  7%] Building C object CMakeFiles/allegro.dir/src/inline.c.obj
[  7%] Building C object CMakeFiles/allegro.dir/src/joynu.c.obj
[  8%] Building C object CMakeFiles/allegro.dir/src/keybdnu.c.obj
[  8%] Building C object CMakeFiles/allegro.dir/src/libc.c.obj
[  9%] Building C object CMakeFiles/allegro.dir/src/math.c.obj
[  9%] Building C object CMakeFiles/allegro.dir/src/memblit.c.obj
[ 10%] Building C object CMakeFiles/allegro.dir/src/memdraw.c.obj
D:\CodeBlocks\allegro\src\memdraw.c:67: warning: '_hline8' defined but not used
D:\CodeBlocks\allegro\src\memdraw.c:68: warning: '_hline16' defined but not used
D:\CodeBlocks\allegro\src\memdraw.c:69: warning: '_hline24' defined but not used
[ 10%] Building C object CMakeFiles/allegro.dir/src/memory.c.obj
[ 11%] Building C object CMakeFiles/allegro.dir/src/mousenu.c.obj
[ 11%] Building C object CMakeFiles/allegro.dir/src/path.c.obj
[ 12%] Building C object CMakeFiles/allegro.dir/src/pixels.c.obj
[ 13%] Building C object CMakeFiles/allegro.dir/src/rotate.c.obj
[ 13%] Building C object CMakeFiles/allegro.dir/src/system_new.c.obj
[ 14%] Building C object CMakeFiles/allegro.dir/src/threads.c.obj
[ 14%] Building C object CMakeFiles/allegro.dir/src/timernu.c.obj
[ 15%] Building C object CMakeFiles/allegro.dir/src/tls.c.obj
[ 15%] Building C object CMakeFiles/allegro.dir/src/unicode.c.obj
[ 16%] Building C object CMakeFiles/allegro.dir/src/utf8.c.obj
[ 16%] Building C object CMakeFiles/allegro.dir/src/misc/bstrlib.c.obj
[ 17%] Building C object CMakeFiles/allegro.dir/src/misc/vector.c.obj
[ 17%] Building C object CMakeFiles/allegro.dir/src/win/winput.c.obj
[ 18%] Building C object CMakeFiles/allegro.dir/src/win/wjoydrv.c.obj
[ 18%] Building C object CMakeFiles/allegro.dir/src/win/wjoydxnu.c.obj
[ 19%] Building C object CMakeFiles/allegro.dir/src/win/wkeybdnu.c.obj
[ 19%] Building C object CMakeFiles/allegro.dir/src/win/wmcursor.c.obj
[ 20%] Building C object CMakeFiles/allegro.dir/src/win/wmouse.c.obj
[ 20%] Building C object CMakeFiles/allegro.dir/src/win/wnewsys.c.obj
[ 21%] Building C object CMakeFiles/allegro.dir/src/win/wnewwin.c.obj
[ 21%] Building C object CMakeFiles/allegro.dir/src/win/wthread.c.obj
[ 22%] Building C object CMakeFiles/allegro.dir/src/win/wtime.c.obj
[ 22%] Building C object CMakeFiles/allegro.dir/src/win/wxthread.c.obj
[ 23%] Building CXX object CMakeFiles/allegro.dir/src/win/d3d_bmp.cpp.obj
[ 23%] Building CXX object CMakeFiles/allegro.dir/src/win/d3d_disp.cpp.obj
D:\CodeBlocks\allegro\src\win\d3d_disp.cpp:873: warning: unused parameter 'flags'
D:\CodeBlocks\allegro\src\win\d3d_disp.cpp:606: warning: unused parameter 'flags'
[ 24%] Building C object CMakeFiles/allegro.dir/src/opengl/extensions.c.obj
[ 25%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_bitmap.c.obj
[ 25%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_draw.c.obj
[ 26%] Building C object CMakeFiles/allegro.dir/src/opengl/ogl_display.c.obj
[ 26%] Building C object CMakeFiles/allegro.dir/src/win/wgl_disp.c.obj
Linking CXX shared library lib\liballegro-4.9.9.dll
Creating library file: lib\liballegro-4.9.9.dll.a
CMakeFiles\allegro.dir\src\win\wjoydxnu.c.obj: In function `joystick_enum_callback':
D:/CodeBlocks/allegro/src/win/wjoydxnu.c:594: undefined reference to `_c_dfDIJoystick'
CMakeFiles\allegro.dir\src\win\wjoydxnu.c.obj: In function `joydx_init_joystick':
D:/CodeBlocks/allegro/src/win/wjoydxnu.c:712: undefined reference to `_DirectInput8Create@20'
CMakeFiles\allegro.dir\src\win\wkeybdnu.c.obj: In function `wkeybd_init_keyboard':
D:/CodeBlocks/allegro/src/win/wkeybdnu.c:508: undefined reference to `_DirectInput8Create@20'
D:/CodeBlocks/allegro/src/win/wkeybdnu.c:522: undefined reference to `_c_dfDIKeyboard'
CMakeFiles\allegro.dir\src\win\wmouse.c.obj: In function `mouse_directx_init':
D:/CodeBlocks/allegro/src/win/wmouse.c:752: undefined reference to `_DirectInput8Create@20'
D:/CodeBlocks/allegro/src/win/wmouse.c:773: undefined reference to `_c_dfDIMouse'
CMakeFiles\allegro.dir\src\win\d3d_disp.cpp.obj: In function `_al_d3d_init_display':
D:/CodeBlocks/allegro/src/win/d3d_disp.cpp:804: undefined reference to `_Direct3DCreate9@4'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [lib/liballegro-4.9.9.dll] Error 1
mingw32-make[1]: *** [CMakeFiles/allegro.dir/all] Error 2
mingw32-make: *** [all] Error 2

D:\CodeBlocks\allegro>

Images

BMP to PNG conversion

The following image's native format is BMP, but it has been converted to PNG for inline display.

598062

Large Images

This image is 1600x1200, so it is larger than the 1024 pixel cut off. To view the original, shift-click on it.

{"name":"go4sophiabush003yq7.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/e\/ceee7dda469b075c55a66c3855cc5e89.jpg","w":1600,"h":1200,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/c\/e\/ceee7dda469b075c55a66c3855cc5e89"}go4sophiabush003yq7.jpg

Embedded Objects

Audio Player

Audio can be embedded, including hit songs like Jesus Lives, Do This Dance, Judas' Ants:

media player

Video Player

Currently only Youtube videos are supported. There is no embedded widget yet.

video

Jonatan Hedborg

Very nice!

Christopher Bludau

Wow. Very nice additions.
Looking forward to all the formatted posts in the future

I especially like the reference feature.

Trezker

/me looks forward to all the mistakes people will make.

Can you add /me mockup too while you're on a roll?

Niunio

Nice. A new language to learn...

Just kidding.

Will you release the sources? It would be useful for some web projects I have.

Timorg

When I shift click on the image, it becomes fullscreen, with no way other than alt-f4 to close the window.

I tried to upload a screenshot as a jpeg, but it stalled at 6% I clicked the attachment button to hide it, and now when I try and click it to bring down the form, it doesn't do anything.

But keep up the good work.

Oh and I cant submit the post because of the attachment issue. Time to cut and paste to a new post.

ReyBrujo

Interesting. I would have liked if you could have implemented the MediaWiki way of marking italics (two single quotes) and bold (three single quotes), like ''italics'' and '''bold''' too, since you already use the links and lists that are standard.

I would ask three things for the referencing. The first is that the small number in the reference section links to where the reference is used (in large posts, if you click a reference and go to a new section, it is a pain to locate the position again). The second is to highlight the reference that has been clicked. The third is that when you jump to the reference, it is hidden by the navigation bar at the top, so it is pretty much unusable right now. Well, it is usable as long as you don't click the reference number

Other than that, it looks promising.

Ah, and not more rickrolling apparently.

Mark Oates
  • Sophia Bush

    1. DAYUM!!

ReyBrujo

Hmm... the first time I saw this post the headers in your original post were all of the same size, with a grey background. That made that so cool! After clearing the cache, they are like HTML ones >_<

bamccaig

Very cool improvements, ML. I especially like the <terminal> tag and escape character! :D The Wiki shorthand is awesome too and the new image size restriction works beautifully in my current browser.

All tags must be well formed XHTML.

You called it XHTML just to avoid using the term XML, didn't you? :P

The spoiler tag doesn't seem to work in the preview... :-/

ReyBrujo said:

...when you jump to the reference, it is hidden by the navigation bar at the top, so it is pretty much unusable right now.

Yeah, the reference number currently takes me past the references at the bottom of the posts. Basically to the sig.

Is the cheat sheet going to remain incomplete or is that temporary?

Also, is the markup code closed source or can we get a copy?

Mark Oates
Quote:

The spoiler tag doesn't seem to work in the preview...

the spoiler tag doesn't seem to work.

Ib Quezada

Cool! Nice all the new additions.
Just as a technical question to Mathew, Did you have to change all the previous threads to the new mockup format?

Neil Walker

Can we have a reverse reveal option on a reveal? Just in case somebody is referencing something which is rather long but there's stuff below and you want to hide it again?

btw, I pasted in some wiki and the <spoiler> tags disappeared as did the text beneath it.

Early years and league triumphs Sunderland-based schoolteacher James Allan founded the Sunderland & District Teachers Association Football Club on 17 October 1879.[3] The name of the club was changed to Sunderland Association Football Club in 1881, after other professions were allowed to join. This increased the pool of players and improved the club's financial base.[4] However, Allan grew dissatisfied with the changing attitude in the club towards professionalism.[5] He left to found Sunderland Albion, and the two Sunderland clubs formed a rivalry that lasted until Albion's demise in 1892.[5] Sunderland were admitted into The Football League for the 1890–91 season. They replaced Stoke City, who had failed to be re-elected, becoming the first new club to join the league since its inauguration in 1888.[6] During the late 19th century, they were declared the "Team of All Talents" by William McGregor,[7] the founder of the league, after a 7–2 win against Aston Villa. Sunderland won the league championship in the 1891–92 season, one season after joining The Football League. The club's 42 points were five clear of nearest rivals Preston North End, and this performance led The Times to describe the players as "a wonderfully fine team".[2] Sunderland successfully defended the title the following season, aided by centre forward Johnny Campbell, who broke the 30-goal mark for the second time in consecutive seasons. In the process, they became the first team to score 100 goals in a season, a feat not matched until 1919–20, when West Bromwich Albion set a new record.[8] Sunderland came close to winning a third successive league championship in the 1893–94 season, finishing second behind Aston Villa. However, they regained the title in the 1894–95 season, ending the season five points ahead of Everton. After winning the English League Championship, Sunderland played against Heart of Midlothian, the champions of the Scottish League, in a game described as the Championship of the World title match.[9] Sunderland won the game 5–3 and were announced "champions of the world".[10] Sunderland came close to winning another league title in the 1897–98 season, when they finished as runners-up to Sheffield United.[11] That season was their last at Newcastle Road, as they moved to Roker Park the following season.[12] After coming second in 1900–01, the club won their fifth league title in the 1901–02 season, beating Everton by a three point margin.[13] In 1904, Sunderland's management was embroiled in a payment scandal involving player Andrew McCombie. The club was said to have given the player £100 (£7,700 today) to help him start his own business, on the understanding that he would repay the money after his benefit game.[14] However, McCombie refused to repay the money, claiming it had been a gift. An investigation conducted by the Football Association concluded that the money given to McCombie was part of a "re-signing/win/draw bonus", which violated the Association's rules. Sunderland were fined £250 (£19,300 today), and six directors were suspended for two and a half years for not showing a true record of the club's financial dealings. Sunderland manager Alex Mackie was also suspended for three months for his involvement in the affair.[14][15] [edit] Further league championship titles On 5 December 1908, Sunderland achieved their highest ever league win, against north-east rivals Newcastle United. They won the game 9–1; Billy Hogg and George Holley each scored hat-tricks.[16] The club won the league again in 1913,[17] but lost their first FA Cup final 1–0 to Aston Villa.[18] This was the closest the club has come to winning the league title and the FA Cup in the same season.[19] Two seasons later the First World War brought the league to a halt. After the league's resumption, Sunderland came close to winning another championship in the 1922–23 season, when they were runners-up to Liverpool.[20] They also came close the following season, finishing third, four points from the top of the league.[21] The club escaped relegation from the First Division by one point in the 1927–28 season despite 35 goals from Dave Halliday. The point was won in a match against Middlesbrough, and they finished in fifteenth place.[22] Halliday improved his goal scoring to 43 goals in 42 games the following season,[23] an all-time Sunderland record for goals scored in a single season.[24] The club's sixth league championship came in the 1935–36 season,[25] and they won the FA Cup the following season, after a 3–1 victory against Preston North End at Wembley Stadium.[26] The remainder of the decade saw mid-table finishes, until the league and FA Cup were suspended for the duration of the Second World War. Some football was still played as a morale boosting exercise, in the form of the Football League War Cup. Sunderland were finalists in the tournament in 1942, but were beaten by Wolverhampton Wanderers.[27] For Sunderland, the immediate post-war years were characterised by significant spending; the club paid £18,000 (£458,000 today) for Carlisle United's Ivor Broadis in January 1949.[14] Broadis was also Carlisle's manager at the time, and this is the first instance of a player transferring himself to another club.[28] This, along with record-breaking transfer fees to secure the services of Len Shackleton and Welsh international Trevor Ford, led to a contemporary nickname, the "Bank of England".[29] The club finished third in the First Division in 1950,[30] their highest finish since the 1936 championship. [edit] Financial troubles and cup success The late 1950s saw a sharp downturn in Sunderland's fortunes, and the club was once again implicated in a major financial scandal in 1957.[15] Found guilty of making payments to players in excess of the maximum wage, they were fined £5,000 (£87,000 today), and their chairman and three directors were suspended.[14][31][32] The following year, Sunderland were relegated from the highest division for the first time in their 68-year league history.[33] Sunderland's absence from the top flight lasted six years. The club came within one game of promotion back to the First Division in the 1962–63 season. Sunderland required only a draw in their final game against promotion rivals Chelsea, who had another game left to play after this match, to secure promotion. However, they were defeated,[34] and Chelsea won their last game 7–0 to clinch promotion, finishing ahead of Sunderland on goal difference.[35] After the close call in the previous season, the club was promoted to Division One in 1964 after finishing in second place. Sunderland beat Charlton Athletic in the final stages of the season, where they clinched promotion with a game to spare.[36] At the end of the decade, they were again relegated to the Second Division after finishing 21st.[37] The memorial for 1973 FA Cup final winning manager Bob Stokoe Sunderland won their last major trophy in 1973, in a 1–0 victory over Don Revie's Leeds United in the FA Cup Final.[38] A Second Division club at the time, Sunderland won the game, mostly thanks to the efforts of their goalkeeper Jimmy Montgomery, who saved two of Peter Lorimer's shots at goal in quick succession.[39] Ian Porterfield scored a volley in the 30th minute to beat Leeds and take the trophy.[39] Since 1973 only two other clubs, Southampton in 1976,[40] and West Ham United in 1980,[41] have equalled Sunderland's achievement of lifting the FA Cup while playing outside the top tier of English football. By winning the 1973 FA Cup Final, Sunderland qualified for the UEFA Cup Winners' Cup, the club's only appearance in European competition to date.[42] Sunderland beat Vasas Budapest 3–0 on aggregate, and were drawn against Lisbon club Sporting in the second round.[42] They won the first leg at Roker Park 2–1 but were defeated 2–0 in the away leg, and were knocked out of the competition 3–2 on aggregate.[42] After spending six seasons in the Second Division, Sunderland were promoted to Division One in the 1975–76 season; they topped the table over Bristol City by three points.[43] However, Sunderland were relegated the following season back into Division Two, without their FA Cup Final winning manager Bob Stokoe, who had resigned because of health problems at the start of the season.[44] The club celebrated its 100-year centenary in the 1979–80 season with a testimonial against an England XI side, which they lost 2–0.[45] Sunderland appeared in their only League Cup final in 1985, but lost 1–0 to Norwich City.[46] A camaraderie was forged between supporters of the two clubs in this match, and as a result, every time Sunderland and Norwich meet, the Friendship Trophy is contested.[47] Sunderland are the current holders of the trophy, having beaten Norwich 1–0 on 2 December 2006.[48] In 1987, Sunderland saw one of the lowest points in their history, when they were relegated to the Third Division of the English league for the first time.[49] Under new chairman Bob Murray and new manager Denis Smith, the club was promoted the following season.[50] In 1990, they were promoted back to the top flight in unusual circumstances. Sunderland lost to Swindon Town in the play-off final, but Swindon's promotion was revoked after the club was found guilty of financial irregularities and Sunderland were promoted instead.[51] They stayed up for one year before being relegated on the final day of the following season.[52] The Davy lamp monument, outside the Stadium of Light Sunderland's last outing in a major final came in 1992 when, as a Second Division club, they returned to the FA Cup final. There was to be no repeat of the heroics of 1973, as Sunderland lost 2–0 to Liverpool.[53] The early 1990s was a turbulent period for the club. In 1995, they faced the prospect of a return to the third-tier of English football.[54] Peter Reid was brought in as manager, and quickly turned things around. Reid's time in charge had a stabilising effect; he remained manager for seven years, one of the longest tenures in Sunderland's history.[55] After promotion from Division One in the 1995–96 season, Sunderland began their first season in the Premier League, but finished third from the bottom and were relegated back to the First Division.[56] In 1997, Sunderland left Roker Park, their home for 99 years. Bearing fond memories of the stadium, former Sunderland player Len Shackleton said, "There will never be another place like Roker".[57] The club moved to the Stadium of Light, a 42,000-seat arena that, at the time, was the largest stadium built in England after the Second World War.[58] Capacity was later increased to 49,000.[58] [edit] Recent highs and lows Sunderland returned to the Premier League as First-Division champions in 1999 with a then-record 105 points.[59] Two consecutive seventh place finishes in the Premier League were followed by two less successful seasons, and they were relegated to the second-tier with a then-record low 19 points in 2003.[60][61] Former Ireland manager Mick McCarthy took over at the club, and, in 2005, he took Sunderland up as champions for the third time in less than ten years.[62] However, the club's stay in the top flight was short-lived; Sunderland finished on another new record-low total of 15 points.[61] McCarthy left the club in mid-season, and he was replaced temporarily by former Sunderland player Kevin Ball.[62] The record-low fifteen-point performance was surpassed in the 2007–08 season by Derby County, who finished on eleven points.[63] Following the club's relegation, it was taken over by the Irish Drumaville Consortium,[64] headed by ex-player Niall Quinn, who appointed former Manchester United captain Roy Keane as the new manager.[65] Under Keane, the club rose steadily up the table with an unbeaten run of 17 games[66] to win promotion to the Premier League,[67] and were named winners of the Championship after beating Luton Town 5–0 at Kenilworth Road on 6 May 2007.[68] The club's form in the 2007–08 season was better than during their last season in the Premier League, as they finished 15th with 39 points.[69] Following an inconsistent start to the 2008–09 season Keane resigned. First team coach Ricky Sbragia took over as caretaker manager, and his position was later made permanent.

Like this.

bamccaig

the spoiler tag doesn't seem to work.

In what way? :-/ It seems to work for me, except for the preview.

Just as a technical question to Mathew, Did you have to change all the previous threads to the new mockup format?

Based on what I have seen, I think the site uses the go-live date to determine which markup engine to use. If you edit a post that was created before it, the original BBCode is still there and you will have to manually update it for the desired output (because the date will be updated along with it).

Slartibartfast

Cool, so that's why it was down for maintenance earlier.
Very nice work.
For aesthetic reasons I ask, will/could there be an option to hide a spoiler after you revealed it?

BAF
bambam said:

You called it XHTML just to avoid using the term XML, didn't you?

No, it's XHTML.

Now, I have to get used to not typing [quote] etc.

Also, you should some kind of automatic quoting feature that automatically fills in the name and the source.

[edit]
<quote> doesn't eat whitespace, so I can't do what I normally do and put the <quote> and </quote> tags on their own lines.

bamccaig
BAF said:

No, it's XHTML.

Some of it is, like b, i, s, and u, but AFAIK quote and terminal are not XHTML, which means they are some other XML dialect.

BAF said:

Also, you should some kind of automatic quoting feature that automatically fills in the name and the source.

It should be trivial to write some custom JS to do this if ML doesn't. I was thinking that it would be convenient if in the absence of a name attribute it would check the src attribute for an Allegro.cc recognized URL format and automatically grab the user id (the first time and then update the post with it), but I can understand how that's asking a lot. :P

BAF said:

<quote> doesn't eat whitespace, so I can't do what I normally do and put the <quote> and </quote> tags on their own lines.

Are you sure?

<quote name="BAF">lol</quote>

Gives...

BAF said:

I'm dumb!

Whereas,...

<quote name="BAF">
lol
</quote>

Gives...

BAF said:

I'm dumb!

Which to me looks the same. That said, the I'm dumb!-parser seemed to somewhat break the escaped </quote> in my above example before I put it in <code> tags:

<quote name="BAF">I'm dumb!</quote>

Thomas Harte

And thus began the era of "no video, no download".

EDIT: also beginning now, the era of my gross mistrust of typing on the iPhone (calm down — I was given one by my work). "And this began"?

Slartibartfast
Quote:

Also, you should some kind of automatic quoting feature that automatically fills in the name and the source.

This has been suggested before and IIRC Matthew said he didn't such a feature to prevent quote abuse.

ReyBrujo
Quote:

the spoiler tag doesn't seem to work.

If you don't see the spoiler tag at Matthew's post, refresh your cache.

Neil Walker

[quote]And this began the era of "no video, no download". [/quote]and the overuse of <reveal>.
[EDIT]damn. I fail.

<quote Thomas>And this began the era of "no video, no download".</quote>
[EDIT]I fail again

Quote:

And this began the era of "no video, no download".

and the overuse of <reveal>
I fear for ML's bandwidth and server space I really don't know how he can afford it.

Mark Oates

All I see on the spoiler is a link above the spoiler... and just the link goes away when you click it.

Schyfis

Using Firefox, I see the spoiler without having to click anything. It seems to work with IE.
It might be a good idea to have a "hide spoiler" link after you reveal it.

I like the changes!

CGamesPlay

Cool. The changes to the image system are my favorite

Kibiz0r

To be honest, I'd rather just have the white-text/black-bg standard spoiler setup.

Oh, and all the other stuff is cool.

Kris Asick

I'm still using IE6, so I dunno if anyone's gonna want to fix this, but for some odd reason, <quote> blocks cause the indenting to go left by a few pixels for the rest of someone's reply on my system, up to and beyond the edges of the table bounds, as shown:

{"name":"598067","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/4\/f46f47ef92af06c215d10062259e535f.png","w":1119,"h":715,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/4\/f46f47ef92af06c215d10062259e535f"}598067

Neil Walker

Spoilers work for me, are you running NoScript or some other plugin stopping such things maybe?

Quote:

I'm still using IE6, so I dunno if anyone's gonna want to fix this

If Matthew didn't have a conscience he'd ban everyone who is using IE

Schyfis

Perhaps it's an odd side-effect of the update, but clicking on Kris' screenshot gives me a 404 error.

After a reboot, spoilers oddly seem to be working for me. Must be something with my browser.

Milan Mimica

TLDR
when will the IMPORTANT! box go away? Hurts my eyes.

SiegeLord

I don't like how writing '<' now requires me to press 'shift + ,', when to get '[' I only needed to press one key. Oh well.

Kibiz0r
SiegeLord said:

I don't like how writing '<' now requires me to press 'shift + ,', when to get '[' I only needed to press one key. Oh well.

I think there are more keypresses in that post than the extra keypresses you're complaining about.

SiegeLord
Quote:

I think there are more keypresses in that post than the extra keypresses you're complaining about.

I just had to press Shift an extra 4 times to quote you, so I don't see your point. It's not the number of keypresses total, it's the extra number of keypresses.

EDIT: Not that it's a big deal, I am mostly joking

BAF

Ah, quoting just seemed messed up in Safari or something. Upon ctrl-f5ing in Firefox, quote tags work as expected.

Mark Oates

I prefer the '<' characters to the '['. It may include an extra Shift+ but the keys are in a more natural location.

Vanneto

What? As far as I see it, [ requires ALT + F, ] = ALT + G. < requires only one key press. > Requires Shift + <. [1]

Oh, BTW [2], I like the new markup code very much. [3]

EDIT:

Oh, BTW [4], I like the new markup code very much. [5]

Produces the text you see above. One newline too many. :-/

References

  1. I have a Slovenian keyboard.
  2. By The Way
  3. Really, I do!
  4. By The Way
  5. Really, I do!
weapon_S

Did quote always have a src attribute? Anyway, I like it. References are cool. Escape character: genious.
I don't know about embedded stuff, though...
Doing h1 in your signature is awesome, especially if you'd make a comment about the next one who posts. [ signature links broken]
[edit]
Removed for not being funny...

Milan Mimica

Vanneto: Most people don't have a Slovenian keyboard.

StevenVI

I think that most of the markup should be disabled in signatures, as weapon_s has so proudly demonstrated.
(Edit: Good.)

Thomas Harte said:

And thus began the era of "no video, no download".

Sure makes me glad that I have gotten in the habit of making videos for my games:

video

Darizel

Thanks for the "what???" vs what fix

Also, this is an awesome idea . Never would have thought of it. I'm sure I'll (ab)use this feature EDIT: though it doesn't work in preview...

Finally, conversion to real html/xhtml tags is nice.

BAF
Quote:

I think that most of the markup should be disabled in signatures, as weapon_s has so proudly demonstrated.
(Edit: Good.)

Most, but not all. Links, for example, are fine. I didn't change my sig, so it still has the old mockup (unless ML did some kind of mass update on old posts/sigs, but I thought they were 'compiled' to an intermediate markup for storage anyhow) and works fine.

Karadoc ~~

We now have a lot more stuff we can use to make our posts look good, which is cool. The syntax is closer to being "standard", which is cool. I think the changes are an improvement; but I've never felt that the old formatting on these forums was lacking. I think I'll miss the simplicity of the old stuff for awhile. Also, I foresee overuse of <reveal> in the future...

bamccaig

Also, I foresee overuse of <reveal> in the future...

<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>
<reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal><reveal>

There is no <reveal>.

BAF

OMGZ A HIDE/SHOW BUTTON

Matthew Leverton
Niunio, et al. said:

Will you release the sources?

Not at the moment. But it only represents about 1,500 lines of new code and ten hours of work, so it shouldn't be that hard to develop yourself.

I'll help you get started:

$doc = new MockupDocument();
$doc->loadText($mockup);

$writer = new MockupWriter();
echo $writer->getHTML($doc);

8-)

Timorg said:

When I shift click on the image, it becomes fullscreen, with no way other than alt-f4 to close the window.

I tried to upload a screenshot as a jpeg, but it stalled at 6% I clicked the attachment button to hide it, and now when I try and click it to bring down the form, it doesn't do anything.

Your browser shouldn't position the image window in a place where you cannot access it...

Attachments should work, but if you have problems with them, you can always edit your post and use the attachments link at the bottom right.

Mark said:

Sophia Bush DAYUM!! :o

That's what she said.

about me

ReyBrujo said:

Interesting. I would have liked if you could have implemented the MediaWiki way of marking italics (two single quotes) and bold (three single quotes), like ''italics'' and '''bold''' too, since you already use the links and lists that are standard.

I never really liked that syntax, as it feels arbitrary. I prefer things that have meaning in plain text. Probably won't implement.

Kibiz0r said:

To be honest, I'd rather just have the white-text/black-bg standard spoiler setup.

Then that would limit spoiler sections to text. But if you want to do that, go ahead and modify your CSS.

Updates

I fixed up a few things:

  • A few CSS updates to correct some spacing issues


  • Enabled JS controls during previews.


  • Fixed some JS broken by the inclusion of prototype. This (partially) fixes PMs. Still more to do there.


  • Updated the spoiler to have a toggle button.


  • Fixed the long standing I'm dumb!<eating bug.


  • Re-enabled 'light' HTML in signatures, and limited the maximum number of lines to four.


  • Changed the reference blocks to be static text (instead of JS built). Old posts won't reflect that change.


  • References are highlighted and visible when the [1] link is clicked.

To activate the changes, you must refresh your browser to update your CSS and JS files.

That includes you idiots who never listen. >:(

Kris Asick

I'm still having spacing issues with the quotes. x_x;

CGamesPlay
Quote:

Re-enabled 'light' HTML in signatures, and limited the maximum number of lines to four.

BRILLIANT!

Could you add 'irc:' to the list of valid link protocols, please?

Matthew Leverton
Quote:

I'm still having spacing issues with the quotes. x_x;

It's how every page should look on IE 6. I'm not going out of my way to work around any of its glitches.

It looks like a classic case of the Creeping Text bug[1] to me, in which case the Zoom Hack[2] will probably fix it.

I won't be doing anything about it, but you could try adding something like this to your custom CSS:

td.content,
div.mockup,
div.quote_container
{
  zoom: 1;
}

ReyBrujo

Signatures of four lines only? What will bamccaig do now? At least give us the -- line for free! I still would like a link back from the reference to the word it was reference.

SiegeLord

What about poor narcissistic nonnus29? Serves him right.

Matthew Leverton
Quote:

At least give us the -- line for free!

The -- line is why you get four...

ReyBrujo

Hehehe, ok, didn't say anything!

From all the changes, I think the references one is the best. There are a couple of things missing (link back to referenced item from reference, reference reuse, and some more information in the reference link, like being able to add the title and the author of the article being cited). However, I won't complain that much

BAF

So as long as I don't edit my sig, I should be fine?

Matthew Leverton
Quote:

From all the changes, I think the references one is the best. There are a couple of things missing (link back to referenced item from reference, reference reuse, and some more information in the reference link, like being able to add the title and the author of the article being cited)

Via the <ref> tag you can add whatever content you like.[1]

I'll look more into how Wikipedia handles them after I'm finished fixing all the things broken in the cross fire.

References

  1. Matthew Leverton, 2009.
ReyBrujo

Aha, yeah, that is one of the ways of using them, and the one that should work here. Do italics and things like that work in them?[1] If so, that is fine enough. Wikipedia uses now a template, {{cite web}}[2], which makes it easier to format (so that every citation from web has the same format).

Maybe if you add something like <ref title="Title" date="date" author="author" url="url">Some free text</ref> you could format the reference in a way (like "[url Title] (author), date. Some free text") which would standardize the way it is shown.

By the way, thought of ever adding direct links to certain sites? Like <wikipedia>NES</wikipedia> automatically linking to http://en.wikipedia.org/wiki/NES, or similar tags like <allegrowiki>, <youtube>, etc?

References

  1. /Italics/ Bold Strikeout _Underlined_
  2. Cite web template
bamccaig

..., and limited the maximum number of lines to four.

Signatures of four lines only? What will bamccaig do now?

So as long as I don't edit my sig, I should be fine?

If I ever get a Web site up worth sharing[1] I'll want to add it to my signature so I guess I'm gonna lose most of my signature eventually... Still, a small price to pay for the improvements, I think.

References

  1. IMO.
BAF

Matthew: does this mean support for multiple languages may be possible in the future (for the code tags)? <code language="php"> or <code language="c#"> or similar?

weapon_S
Quote:

as weapon_s has so proudly demonstrated

I take no pride in my ability to break and inclination to try weird things without thinking. Honestly.
Ooh, new spoiler button!

Niunio
bamccaig said:
BAF said:

Also, you should some kind of automatic quoting feature that automatically fills in the name and the source.

It should be trivial to write some custom JS to do this if ML doesn't.

Is this possible? I had no idea

Where is it explained? I didn't find help at the Control Center.

Neil Walker

Hello,
couple of things on the great new features:

1. Where has the inline reply box gone?

2. There's a minor bug with references, when you click on it goes and highlights the text, which is nice, but it scrolls the text down so you miss the whole of the content. How about not jumping to the anchor or putting the anchor at the top of the text not the top of the references

3.

spoilers are great as buttons, how about being able to change the text in the button and can they be made inline-block or just inline?

Kitty Cat

I'm curious, for us anti-flash player people.. is there any CSS/JS code we can use to embed a proper media player? Something which is "guaranteed" to work and not break on a whim?

bamccaig
Niunio said:

Is this possible? I had no idea

Where is it explained? I didn't find help at the Control Center.

Theme & Behavior: CSS/JS

I think it should be relatively easy to add a "Quote" link to the header of each post, that when clicked appends a...
<quote name="[originator]" src="[post_link]">[content]</quote>
...tag to the post textarea at the bottom. As a bonus, you could automate the markup, which is something copy/paste generally won't do. This would only work when you're able to add a new post though.

Matthew Leverton

Where has the inline reply box gone?

Nothing has changed with that.

Quote:

There's a minor bug with references, when you click on it goes and highlights the text, which is nice, but it scrolls the text down so you miss the whole of the content.

Don't click if you can see the references on a short post.

Quote:

spoilers are great as buttons, how about being able to change the text in the button and can they be made inline-block or just inline?

Spoilers can hold any kind of content, including blocks of code. While I could detect what kind of content is actually inside it and adjust accordingly, I don't particularly wish to enable people to use it inline.

And for the sake of consistency, the buttons are named the same.

Kitty Cat said:

I'm curious, for us anti-flash player people.. is there any CSS/JS code we can use to embed a proper media player?

There will be three levels of options, as mentioned in the first post. The base, text-only option will look something like <span class="embedded-object youtube">http://www.youtube.com/watch?v=oHg5SJYRHA0</span>.

So it will be easy for you to add custom JS to change that to whatever you want, but the site won't offer any official alternatives.

Neil Walker
Quote:

Nothing has changed with that.

Yeah, it came back on my next post. Must have just been one of those things.

Kitty Cat

There seems to be a problem with the links in code tags. In this thread, the code block has lines like this:

Kitty Cat said:
px += speed * cos [www.delorie.com](direction); 
py += speed * sin [www.delorie.com](direction);

Neil Walker

happens here too with any function coming from outside of allegro :)

cos(direction);
sin(direction);
tan(direction);
atan2(x,y);
sqrt(0);
printf("blah");
blit(blah);
blah(blah);

Matthew Leverton

Fixed.

OICW

I really appreciate the change. But there are few issues that arose - note that I refreshed my cache and I even deleted whole browser cache.

  • First of all the inline reply box is a square, which is not very nice - it used to span 3/4 of screen width or so.

  • Second the spoiler tag in the OP still doesn't appear, though I've seen it in another thread.

  • Third shift clicking large images doesn't work. It doesn't work on my Firefox, it doesn't work on Firefox in university lab. It chrashed Konqueror in the university lab and the only browser that was able enlarge the image was Opera. And it was done inside the thread (don't know if it's intended behaviour since shift clicking appeard because of ML's hate of large images destroying layout.

Matthew Leverton

Everything you've written indicates that your Javascript files are outdated and are trigging a run time error.

I'd manually load http://www.allegro.cc/js/general.js and hit refresh on it.

It should be 9474 bytes with MD5 of c4a486831e290f4b7f306a4ad8a1a587.

BAF

Yeah, the reply box being square/messed up is a problem I saw a few times messing with JS, an error in my onload function was stopping the mockup box from loading.

OICW
Quote:

I'd manually load http://www.allegro.cc/js/general.js and hit refresh on it.

Done that and still nothing.

BAF

Temporarily disable your custom JS if you have any...

OICW
Quote:

Temporarily disable your custom JS if you have any...

Thanks, it helped.

BAF

So it was a problem in your custom JS then.

OICW
Quote:

// Ignore Poster app Version 0.1

This JS is to blame. Seems like it doesn't work properly now. So I hope Dustin makes a patch for it.

Matthew Leverton

A few global JS functions were removed, but nothing that scripts were likely to use.

Of more importance, prototype.js is now included and should be used in preference of any duplicated functionality that general.js supplies.

BAF

Oh, prototype is included by a.cc now? I was including it myself manually, I can remove it now.

// tests
blit()

LennyLen

This JS is to blame. Seems like it doesn't work properly now. So I hope Dustin makes a patch for it.

Sweet! A resizable reply again. I hadn't used the ignore user function in a long time anyway.

Darizel

No biggie, Matthew, but the "cheat sheet" you indicated

For the impatient, refer to the Cheat Sheet.

Still shows the old mock-up.
EDIT: never mind - just hadn't refreshed that page yet

MiquelFire

When is everything going to appear in the cheat sheet?

ReyBrujo

It is just me, or the quote tag searches the thread and links to it when found? If so, awesome!

MiquelFire

Missed a thread, did you?

LennyLen

It is just me, or the quote tag searches the thread and links to it when found? If so, awesome!

Get with the times, dude!

edit: Beaten!

append:

I'm getting the same effect I had when that JS was installed, but only in this thread. Also in that thread, when I click the "Add Reply" button, I get taken to a reply page (after a lengthy delay) and then nothing happens.

ReyBrujo

Ugh, missed it, yeah Been busy and I am getting old

Neil Black

Sweet! I get to re-learn all the various tags for quotes and bold text and such!

But seriously, this is awesome. Good work Matthew!

Some stuff seems to be missing from the help page, like how to make spoilers.

OICW

It is just me, or the quote tag searches the thread and links to it when found? If so, awesome!

Don't worry, I've found it myself as well just today. And missed the aforementioned thread. Seems like I should visit a.cc comments section more often.

Edit:
I'll be damned, it automatically adds an author of the quote.

OnlineCop

At the bottom of this[1] thread, there is a reply box, in which it has the following:

OnlineCop said:

IMPORTANT! The mockup code has changed. See this thread for details. You should refresh your browser's cache (e.g., CTRL-F5).

I thought I was already IN that thread. Isn't that just a bad case of recursion?

::);D

OICW
LennyLen said:

I hadn't used the ignore user function in a long time anyway.

Nor do I.

Edit:
Didn't thing that I get annoyed by spoiler tag. But it's really interesting everybody uses it much lately.

Darizel
Quote:

At the bottom of this thread, there is a reply box, in which it has the following:

OnlineCop said:

IMPORTANT! The mockup code has changed. See this thread for details. You should refresh your browser's cache (e.g., CTRL-F5).

I thought I was already IN that thread. Isn't that just a bad case of recursion?

It's in the reply box for every post.

EDIT: squirrels messed up ;)

bamccaig

The new mock-up code shows how many people don't preview their posts before posting nor double-check after posting... :P Cause there are a bunch of regulars posting [i]things like this[/i].

ReyBrujo

After years of using a mockup, it is a pretty big change

CGamesPlay

[quote]After years of using a mockup, it is a pretty big change [/quote]Yeah, it's tough for me to get used to as well

Karadoc ~~

I don't preview my posts... I just trust that it will look as I intended it to. Sometimes I stuff it up, but it's no big deal because I can just edit it to correct any mistakes.

BAF
bamccaig said:

The new mock-up code shows how many people don't preview their posts before posting nor double-check after posting... :P Cause there are a bunch of regulars posting [i]things like this[/i].

I proof read my post before submitting. Unless I want to make sure a particular formatting works right or something, I don't bother previewing. I usually double check after posting though and edit.

My quotes are fine because I use my autoquoter. ;) I still have to finish up DDustin's changes for selection.

Darizel

The previews are broken. Spoilers don't show up at all.

LennyLen

I see them in my preview:

{"name":"598114","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/2\/92ba145651e54f1097668d4eeb79001a.png","w":874,"h":518,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/9\/2\/92ba145651e54f1097668d4eeb79001a"}598114

Mark Oates

I foresee myself abusing the spoiler button much in the future; I have been abusing the semicolon in a similar way.

Neil Walker

Has the code inlining changed? I've noticed a few places where line numbers exist but there is no header to turn off line numbers.

Another bizarre thing I've seen a few times is the message input box says 'spell checker is disabled. try later' or words to that effect and it stops me from typing. I didn't click speck check and I don't use it or aspell either.

LennyLen

Has the code inlining changed? I've noticed a few places where line numbers exist but there is no header to turn off line numbers.

Can you link to a post with an example? I haven't seen that yet, so it may be a browser issue.

Neil Walker

Well, it was in the 4.9.9.1 release notes thread, but they seem ok now. Mind you I did notice an outage earlier, so maybe some tinkering has been going on. However these show no headers in the code inlining:

http://www.allegro.cc/forums/thread/599644/801214#target

But I don't know if these are using a different tag other than code?

LennyLen

But I don't know if these are using a different tag other than code?

That's what you get if you use the <code> tags without any parameters.

Darizel

still don't

LennyLen said:

I see them in my preview:

What browser are you using?

LennyLen
Darizel said:

What browser are you using?

That was with the latest version of Opera. I notice you're using FF2. ML probably only made sure it works with FF3.

Neil Walker
LennyLen said:

That's what you get if you use the <code> tags without any parameters.

No it isn't. Below has no parameters, but has a header

#SelectExpand
1test line 2test line 3test line 4test line 5test line 6test line 7test line 8test line 9test line 10test line 11test line 12test line 13test line 14test line 15test line 16test line 17test line 18test line 19test line 20test line 21test line 22test line 23test line 24test line 25test line

LennyLen
Matthew Leverton said:

Short code snippets with no name and starting line number will be inline without any chrome.

source

Niunio

I knew that. My question is how can I write JS code to interact with the forum... ::)

Matthew Leverton

But I don't know if these are using a different tag other than code?

They were posted before the update to the <code> tag...

Niunio said:

I knew that. My question is how can I write JS code to interact with the forum...

That's kind of like asking "how can I write C code to make a game." You take your language skills and apply it to the problem at hand.

Niunio

That's kind of like asking "how can I write C code to make a game." You take your language skills and apply it to the problem at hand.

So, there's something about JavaScript I should know but I actually don't? ??? D@mn't. I thought I knew how to do AJAX stuff. I hope my boss doesn't read this thread...

ReyBrujo

There was a howto in the Allegro Wiki about how to write JS extensions.

Darizel
LennyLen said:

ML probably only made sure it works with FF3

I should probably upgrade then.
Also would get rid of the annoying box that keps popping up:
Upgrade Now!!! Or else it's the end of the WORLD!!!!!!!!!!

EDIT:

I updated...
Still doesn't work
Also, the new look is a little weird for me...
kind of pointless...

Schyfis

It doesn't work for me either. It just shows a blank line. (Firefox 3)

CGamesPlay

I'm already tired of the spoilers.

Thomas Fjellstrom

Only because a few people decided it was a good idea to abuse the hell out of them

Darizel
Darizel said:

I'm sure I'll (ab)use this feature

I warned you...

Karadoc ~~

Also, I foresee overuse of <reveal> in the future...

I also warned you (before I even knew how to use them myself, evidently).

Niunio
ReyBrujo said:

There was a howto in the Allegro Wiki about how to write JS extensions.

Gracias Brujo.

Neil Walker

What would be really useful (unless I'm dumb again), is if you click on the name of an attachment after uploading it puts it's fully qualified name into the typing area.

StevenVI

How do you propose that we verify the attachment uploaded successfully?

CGamesPlay
  • The new AJAXy page selector: if I open a thread on page 1, there is no quick reply box on any page.

  • Please add <strong>, <em>, and <acronym> to the list of allowed tags.

  • Please add irc: to the list of valid link protocols.

Thanks!

Matthew Leverton

The quick load feature isn't supposed to be enabled as it was never finished and hasn't been touched in a long time. I've just disabled it for the few people who had it set up from years ago.

I don't find the other suggested features particularly useful within the context of this site.

CGamesPlay

Well, <strong> and <em> are the W3 proper tags to use to denote emphasis. The <b> and <i> tags are deprecated. When I write HTML, I use <strong> and <em> as a habit. Allegro.cc's HTML-esque syntax is jarring because it doesn't support those two. Besides, I'm sure it's only 2 lines of code ;)

Acronym is useful for introducing new terms into posts. As a specific example,

Steve++ said:

The one thing MI has going for it in this scenario is that you can easily integrate the objects within each game object.

Steve++ could have introduced "MI" as an acronym for "multiple inheritance". I would imagine that an acronym tag would be one of the more relevant tags that one could use on a technical forum.

As far as irc: goes, it would be useful for linking to the #allegro support channel. This one is surely another single-line enhancement. mailto: links should also be supported.

Darizel

Steve++ could have introduced "MI" as an acronym for "multiple inheritance".

If he's going to do all that work, he might as well just write out "multiple inheritance" instead of MI ::)

CGamesPlay
Darizel said:

If he's going to do all that work, he might as well just write out "multiple inheritance" instead of MI ::)

No, because once he's introduced the acronym once, he can use it thenceforth.

Kibiz0r
Darizel

No, because once he's introduced the acronym once, he can use it thenceforth.

Only in that one post, though. I'd do:
... multiple inheritance (MI) ...
and then use MI the rest of the time. less shift+,-ing.

Thomas Fjellstrom

Matthew, it seems the wiki isn't counted as an "internal" link anymore, is this intentional? (that is any link to it will show the domain after)

HardTranceFan

The help documentation is incorrect in that <strike> strike through </strike> doesn't work.

LennyLen

The help documentation is incorrect in that <strike> strike through </strike> doesn't work.

http://www.allegro.cc/forums/thread/599647

Trezker

I think I prefer using wiki style strikethrough, that's just -.

HardTranceFan

@LennyLen: I didn't see that thread. ML won't have to reply to my post, 'cos he responded to yours.

SiegeLord

Doesn't explain in any way whatsoever why the help page is wrong though.

LennyLen
SiegeLord said:

Doesn't explain in any way whatsoever why the help page is wrong though.

Probably because it's so obvious that it doesn't need explaining. When Matthew was rewriting the help page, he missed a bit.

SiegeLord

That thread was made over two weeks ago. Still doesn't explain anything.

CGamesPlay

I think it has a lot to do with the fact that Matthew only cares about four users on Allegro.cc (and three of them have the same last name).

GullRaDriel

The fourth is Matthew Himself ^^

;D

Neil Walker

(and three of them have the same last name).

So that accounts for Guest and Robot, though there's usually more than three of those online ;)

Thread #599608. Printed from Allegro.cc