All LJ-specific tags


This is a not-very-brief reference guide to every LiveJournal specific tag and markup that you can use in an entry. Many of them can be used simply by pressing a button in the Rich Text Editor, but some of them have to be added in via the HTML editor. This guide explains how to use them all with the HTML editor.

Please feel free to spread this around using the repost button you’ll find in the repost section.

Table of contents:

  • LJ-Cut
  • LJ-Spoiler
  • LJ User
  • LJ-Embed
  • LJ-Map
  • LJ-Poll
  • LJ-Like & LJ-Give
  • LJ-Repost
  • LJ-Raw
  • LJ-Lang
  • Writer’s Block (LJ-Template)
  • LJ-Replace
  • LJ-Phonepost
  • The Cut


    Let’s start with the most used, the most popular, the most misunderstood and misused lj-tag: the cut. An LJ-cut is a way to hide part of your entry when readers view it on your recent entries or day view pages, or when your friends view it on their friends page.

    If you’re reading this on the entry page please click here to see the entry with the cut intact. That’s probably the first thing you need to remember about cuts: when you write your entry and click preview or you click post to {journal/community} and View the entry, you won’t see the cut. They don’t appear on the entry page or the page with comments.
    To make this cut I used the following code in the HTML editor:


    <lj-cut text="This is the cut. Click it to see more information." >
    PLACE HIDDEN TEXT HERE
    </lj-cut>

    The italicized bit (text=”something…”) is optional, and can be used by you to change the default “Read more” wording to something more descriptive.

    There is an official FAQ about the cut.

    Spoilers!


    Spoiler tags are the new baby cousin to the cut tag. Like a cut tag, they hide bits of your entry behind them. Unlike a cut tag, they expand in place without having to re-load the entry page. You use it like so:


    <lj-spoiler text="Warning text">
    Spoilers!
    </lj-spoiler>

    and you’ll get Spoilers! in your text. You’ll see the warning text surrounded by [ brackets ] instead of the ( parentheses ) you see around cuts on the journal page. As of late April there is no way to collapse a spoiler back into its unexpanded state.
    Something you’ll see a lot in film and television communities is the dual use of both a cut and a spoiler tag. This gives the reader two chances to decide whether or not they really want to read the spoiler contained inside.

    There is an official FAQ about spoilers.

    The User tag


    The user tag is used to add a link to another journal, community, or syndicated feed on LiveJournal alongside the account’s userhead. For example, the following code:


    <lj user="exampleusername"> - <lj comm="communityname"> - <lj user="samplefeed">

    produces:
    exampleusernamesamplefeed. Did you notice how the second example replaced “user” with “comm”? You can use “user” to a link to a community, but “comm” is just as valid.

    You can also change the displayed name of the user by utilizing a bit of code like this:


    <lj user="exampleusername" title="FunnyName">

    which gives us:
    .

    And lastly, what do you do if you want to link one of the new identity accounts that are popping up all over LJ? You know, the people that log in from Twitter or Google or Facebook. Well, it’s a little involved because you can’t just type in user=”blah” (you’ll get an error), but it’s not too complicated. What you need to do is first visit their profile page (the little or or or next to their name is a userhead, just like yours, that links directly to the profile page). When you get there, click on “Track user” and look at the URL that shows up in your address bar. At the end of the URL you’ll see a bit that looks like “ext_####”. That’s LiveJournals’ internal username for the account, and that’s what you have to use in the user tag. So


    <lj user="ext_1">

    gives us:
    ext_1

    There is an official FAQ about user tags.

    Embedding


    Right, now we start getting into the weird ones. Embedding is used to add a video, widget, game, or other interactive content into your entry (and comment, in some cases). Now, because of security concerns LJ doesn’t allow embedding from all and every website out there – they maintain a white list of sites that they allow embedded code from. And only the biggest sites get to use iframe embedding, which is what YouTube uses now. So if you try to embed a video you just found on some obscure website, and it doesn’t work, now you know why. Moving on…

    To embed a YouTube video into your entry you first need to get the embed code from the video. Let’s use this one. Find the embed code and copy it.
    Now back here on LJ use the following code:


    <lj-embed>
    <iframe width="280" height="157" src="http://www.youtube.com/embed/2ArIj236UHs" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
    </lj-embed>

    which results in:

    The ll-embed tag tells LJ that the code contained in them is an embed from another site. Without those tags LJ (usually*) won’t recognize the embed code and either a bunch of gibberish will get displayed, or nothing at all.
    Incidentally, if you go back and edit your entry later you’ll notice that an id=# attribute has been added to the lj-embed tag. This is LJ’s way of identifying the embedded code on your journal. It’s also an easy way for you to count how many times you’ve posted a widget or video to your journal.

    * I say usually because YouTube embed code can be pasted directly into an entry or comment and LJ will add the lj-embed tags for you.

    There is an official FAQ about embedding.

    Maps


    You can embed maps from Google using the lj-map tag. You need the URL from the map once you’ve got it set the way you want it to be seen (and the short URL you can get by clicking on “link” doesn’t work for LJ), which you then use like <lj-map url="[map link]">. So the following bits of code:


    <lj-map url="https://maps.google.com/maps?hl=en&gbv=2&gs_upl=19128l20370l0l20650l4l4l0l0l0l2l871l1233l3-1.6-1l3l0&bav=on.2,or.r_gc.r_pw.,cf.osb&biw=1024&bih=613&q=580+Market+St.+Suite+500+San+Francisco,+CA+94104&um=1&ie=UTF-8&hq=&hnear=0x808580882aea1427:0x46d415f532766674,580+Market+St+%23500,+San+Francisco,+CA+94104&gl=us&ei=0scJT7e_BcPW0QH49rmBAg&sa=X&oi=geocode_result&ct=title&resnum=1&ved=0CCAQ8gEwAA">

    gives us:


    This works with maps with one or many locations, maps with routes, maps with driving directions, and even maps with nothing in them at all, just looking at an area. It’s a great way to include driving directions for a friend, or to show where the restaurant is.

    Maps are briefly referenced in the official FAQ about embedding.

    Polls


    Polls are a great way to interact with your friends or your readers (however, if you have a Basic level account you can’t create one. Sorry). While it is possible to create polls manually, I strongly recommend you use the Poll Creator. But if you want to do it manually I’ve got a brief explanation, though a far more detailed one is already available.

    Alright, say you want to make a quick poll asking your friends if they’ve ever seen SpongeBob SquarePants: The Movie. A bit of code like this:


    <lj-poll name='' whovote='all' whoview='all'>
    <lj-pq type="radio">
    Have you ever seen the SpongeBob movie?
    <lj-pi>Yeah, at the theater</lj-pi>
    <lj-pi>I own it on DVD</lj-pi>
    <lj-pi>Maybe I saw it once on cable</lj-pi>
    <lj-pi>No</lj-pi>
    </lj-pq>
    </lj-poll>

    gives us:

    The lj-poll tag opens up the poll, the lj-pq tag starts a new question, and the lj-pi tag notes a new answer to the question. Every tag needs to be closed or else the poll will be broken. Again, please use the Poll Creator, it’s simple and far less likely to break something.
    If you go back and edit your poll later you’ll notice that that huge mess of code gets replaced with a single simple tag. The above poll gave me:


    <lj-poll-1817886>

    If you screw around with the number at the end of that tag you’ll get a poll other than the one you created.

    There is an official FAQ about polls.

    LJ-Like and LJ-Give


    The LJ-Like feature lets you add like buttons from Facebook, Twitter, and Google to your entries. You can also include a “give” button that lets any readers give you, the entry’s author, ten LJ tokens with a simple click. You also have the option, when including the like buttons, of putting them in any order you like.
    If you just want all the buttons you can add


    <lj-like>

    to your entry and you’ll get everything, including VKontakte, a Russian social-network. However, you can specify which buttons to use and the order they appear in. Say you wanted to have the LJ-Give button appear first, then Twitter, Google, and Facebook in that order. You’d add this bit of code:


    <lj-like buttons="livejournal,twitter,google,facebook">

    and get this set of buttons as a result:

    There are official FAQs for both LJ-Give and LJ-Like

    Repost


    The repost button is a simple way to let your readers post a copy of your entry (or just a portion of it) directly to their journals. It’s pretty straightforward, just use this code:


    <lj-repost button="Post this to your journal!" />

    With this button as the result:

    The italicized bit there (button=”Post this to your journal!”) is entirely optional and can be customized to your taste. You can leave it off entirely, in which case the button merely says “repost”, or you can change it to whatever you feel like.
    If you only want to make part of your entry re-postable you’d do something like this:


    <lj-repost button="Use this example!">REPOST THIS PART ONLY</lj-repost>

    There is an official FAQ about the repost button.

    Okay, that takes care of the basic ones. I’m now going to touch on a few of the more esoteric LJ-tags.

    LJ-Raw


    If you’ve read this far I think it’s fair to assume that you use the HTML editor for your entries, so you’re probably aware of the “Disable Auto-Formatting” checkbox. If not…
    Auto-formatting is what adds line-breaks to your entry without having to type <br>: and what turn URLS starting with http: or https: into links automatically. If you don’t want that, for whatever reason, you can check the box at the top of the editor. For instance, with auto-formatting the following code in the editor:


    This is the first line.
    And this is the second line.
    And this is a URL: http://www.livejournal.com/
    But this is a different URL: http://www.tumblr.com

    Gives us the following result:
    This is the first line.
    And this is the second line.
    And this is a URL: http://www.livejournal.com/
    But this is a different URL: http://www.tumblr.com

    However, if we check the box we get this instead:
    This is the first line.And this is the second line.And this is a URL: http://www.livejournal.com/But this is a different URL: http://www.tumblr.com
    Now, there are plenty of uses to this, but sometimes you don’t want to disable auto-formatting on the entire post. Or sometimes, when you’re posting via e-mail, you don’t have the checkbox to work with. So instead we have <lj-raw>. lj-raw disable auto-formatting for only the part of the entry inside the tags. So if we do this:


    This is the first line.
    <lj-raw>And this is the second line.
    And this is a URL: http://www.livejournal.com/</lj-raw>
    But this is a different URL: http://www.tumblr.com

    we’ll get this:
    This is the first line.
    And this is the second line. And this is a URL: http://www.livejournal.com/
    But this is a different URL: http://www.tumblr.com
    Like I said, it’s a bit more esoteric, but you might want to use it someday. In fact, if you re-post this entry to your journal you’ll see that I did the entire thing inside of lj-raw tags.

    There is an official FAQ about lj-raw and disabling auto-formatting.

    LJ-Lang


    LJ-lang is an experimental feature that lets you add blocks of text to your entry that can only be seen by readers who have their language set to a language that you’ve specified. It’s so experimental, in fact, that there is no FAQ for it and the only instructions I have came second-hand from a Russian-language journal I stumbled across last year.
    The way it works is like this: You create a language container using lj-lang-container, and then you include blocks of text while specifying the languages that can see that text. Try the following code:


    <lj-lang-container>
    <lj-lang include="en">My hovercraft is full of eels</lj-lang>
    <lj-lang include="ru">Моё судно на воздушной подушке полно угрей</lj-lang>
    <lj-lang include="de">Mein Luftkissenfahrzeug ist voller Aale</lj-lang>
    <lj-lang include="fr">Mon aéroglisseur est plein d'anguilles</lj-lang>
    <lj-lang include="ch">我隻氣墊船裝滿晒鱔</lj-lang>
    <lj-lang otherwise>What hovercraft? What eels?</lj-lang>
    </lj-lang-container>

    And you’ll get the following result:

    My hovercraft is full of eels
    Моё судно на воздушной подушке полно угрей
    Mein Luftkissenfahrzeug ist voller Aale
    Mon aéroglisseur est plein d’anguilles
    我隻氣墊船裝滿晒鱔
    What hovercraft? What eels?


    You can switch your language on the Account settings page if you want to see it in action.
    Note that without the lj-lang otherwise tag users with a language other than the one you’ve specified will get nothing.
    Now, the page I found these instructions on didn’t specify what codes to use for languages but I’m pretty sure it’s the language codes LJ uses for your language display:

    • en_LJ – English
    • en_GB – English (UK)
    • de – Deutsch
    • da – Dansk
    • es – español
    • fr – Français
    • it – Italiano
    • ru – Русский
    • uk – Українська
    • be – Беларуская
    • ja – 日本語
    • pt – Português
    • eo – Esperanto
    • he – עברית
    • nl – Nederlands
    • hu – Magyar
    • ga – Gaeilge
    • is – íslenska
    • fi – suomi
    • gr – Ελληνικά
    • nb – Norsk bokmål
    • sv – Svenska
    • pl – polski
    • zh – 简体中文
    • lv – Latviešu
    • tr – Türkçe
    • ms – Bahasa Melayu
    • hi – हिन्दी
    • pt_BR – Português Brasileiro
    • zh_TR – 繁體中文
    • lt – Lietuvių
    • nn – Norsk nynorsk

    Writer’s Block


    Writer’s block, the daily writing prompt you used to see on the front page of LJ (and is still available at ), is added to your journal with a special tag, lj-template.


    <lj-template name="qotd" id="2394" lang="en_LJ" />

    gives us:

    Now presumably there might be other valid values for name= other than qotd, but I don’t know what those might be. If you change the id number you’ll get a different question, and if you change the lang you’ll change the language the question is displayed in.

    LJ-Replace


    Lj-replace is the tag that gets used to generate the welcome post for a new journal. If you want to create a new welcome post use the following code:


    <lj-replace name="first_post">

    Now presumably there are other values for name that will result in different things being included in your entry, but I have no idea what those are.

    LJ-Phonepost


    Lj-phonepost is the tag used to add the links and audio of a voicepost into your post. Each voicepost is tied to a specific entry. If you delete the entry that was created with the voicepost then the voicepost becomes inaccessible, even if you copy the code into a new entry. The following code was auto-generated:


    <lj-phonepost journalid="914305" dpid="11463" />

    and results in this voice post being included in the entry.


    Seriously though, don’t mess around with the phonepost tag, it’s far too easy for you to lose access to your voiceposts.

    There is an official FAQ about voice posts.