RebREBreb ([info]aucune_gloire) wrote,
@ 2004-09-15 16:16:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Style Variable Tutorial
Right, after being disheartened by [info]desenchantee11's discouragement towards paid account styles. I decided to write a series of tutorials on how to go about this. I haven't seen any good paid account tutorials. One but it was terrible confusing. This first is really a definition of the variables and whatnot. And some short, easy examples. Nothing fancy. Just needed a break from studyin Organic Chemistry. I didn't include the LASTN_PAGE variable. Because that would take forever to write. I'll finish it later. Just wanted to get this up to comments and suggestion. Next tutorial will pick apart one of my layouts. So hopefully this will clear up a lot of things via code-wise and organizing a style of your own.



LJ STYLE : TUTORIAL 1 : MOST RECENT EVENTS
Variables and Overrides- definitions and their functions

Variables are listed in the order they're presented on the "LJ Style edit page - easy mode". Whatever is not listed is what I consider unimportant or what I've never used. Text boxes that are not included are usually left blank. Examples are in italics and red. All varibles must be surrounded by %%

  • Transforms, changes certain properties and/or formatting of your text. For example instead constantly having to type something in caps you can use one of these function around the text and then neatly close it. These variables must be used in junction with the other variable they're affection. Like: %%transform variable: other variable%%
    • lc, lower case letters. %%lc:monlong%%
    • uc, upper case letters. %%uc:monlong%%</uc>
    • ljuser, links to the person's username as in <ljuser="aucune_gloire">%%ljuser:aucune_gloire%%
    • ljcomm, links to a community as in <lj comm="in_words"> %%ljcomm:in_words%%
    • userurl, links to username's journal. Note that the little head image does not come with this. %%userurl:aucune_gloire%%


  • LASTN_OPT_ITEMS, this text box specifies the number of entries in your journal. Enter a number between 1 and 50. 10 is usually a good one.


    • LASTN_DATE_FORMAT, customizes the way your date and time look in each entry. Each variable is presented one after the other. In order to get Monday, January 5th at 12:55 you must do like so: %%daylong%%, %%monlong%% %%dth%% at %%12h%%:%%min%%.
      • dayshort, abbreviation of the days of the week. Mon, Tues, Wed, etc
      • daylong, written out form of the days of the week. Monday, Tuesday, Wednesday, etc.
      • monlong / monshort, same functions as %%daylong%% / %%dayshort except with months of the year. April, May, June
      • yy, short version of years. Two digits: 2004 becomes 04
      • yyyy, long version for years. Four digits: 2004
      • m, short numerical month digits. 1-12
      • mm, long numberical month digits. 01-12
      • d, short day numbers. 1-31
      • dd, long day numbers. 01-31
      • ap, lowercase first digits for am/pm as in am/pm
      • AP, uppercase first digits for am/pm as in Am/Pm
      • ampm, lowercase am/pm
      • AMPM, uppercase am/pm
      • min, minutes
      • 12h, hours short scale. 1-12
      • 12hh, long form of 12 hour 01-12
      • 24h, hours 24 scale. 1-24
      • 24hh, long form of 24 hour. 01-24


    • LASTN_TALK_READLINK, this textbox edit the read link for your comments. You must include a %%urlread%% variable in this box.
      • urlread, the actual link part in your <a href code. This links you to the page where you read your comments. <a href="%%urlread%%">READ</a>
      • messagecount, displays the number of comments you recieved. <a href="%%urlread%%">%%messagecount%%</a> In that example the number of comments recieved links you to the page where you read your comments.
      • mc-plural-s, if you have more than 1 comment. This automatically adds an "s" to the noun its attached to. %%messagecount%% ORANGE%%mc-plural-s%% If there are 2 comments it'll show 2 ORANGES.
      • mc-plural-es, same as %mc-plural-s%% except it adds an "es" instead of an "s".
      • mc-plural-ies, same as %%mc-plural-s%% except it adds an "ies" instead of an "s".


    • LASTN_TALK_LINKS, this textbox is where you combine your read links with your post links. LASTN_TALK_READLINK is a sort of subbox of this one. You must include a %%readlink%% and post links otherwise your comments won't appear. A full comment and read would look like this: <a hef="%%urlpost%%">COMMENT</a> - %%readlink%%
      • readlink, your previous values for LASTN_TALK_READLINK
      • urlpost, the actual link part in your <a href code. This links you to the page where you post your comments. <a href="%%urlread%%">COMMENT</a>
      • itemid, that entry number.
      • itemargs, post identification. You would use this instead of %%itemid%% if for example you wanted to include an add to memories post which looks like: <a href="http://www.livejournal.com/tools/memadd.bml?journal=aucune_gloire&itemid=%%itemargs%%">ADD TO MEM</a>


    • LASTN_SUBJECT, textbox for where you edit your subject. It's best you include all html that concerns the subject here. Make sure to close the tags afterwards. You must include %%subject%% otherwise it WILL NOT show up. Example: <font color="#FF0000" family="times new roman">%%subject%%</a>
      • subject, actual value for your subject header.


    • LASTN_EVENT_PRIVATE, textbox concerning entries under a private security. Usually this box remains the same as LASTN_EVENT and LASTN_EVENT_PROTECTED. If you leave this blank then it will take on the characteristics of LASTN_EVENT

    • LASTN_EVENT_PROTECTED, same as above.

    • LASTN_CURRENT, your mood and music section.
      • what, signifies what the label is, such as mood or music. If you'd like to have your own special %%what%% then do not include this variable then you may do something along the lines of I FEEL %%value%%
        LISTENING TO

      • value, what you actually input for mood or music.


    • LASTN_CURRENTS, all your variables in LASTN_CURRENT combined into one. You MUST include %%currents%% for your mood/music to appear.

    • LASTN_EVENT, your actually entry look. This is where you combine all your entry elements (subject, currents, comment links, date, etc). You must include %%event%% for your entry text to appear. A sample LASTN_EVENT would look like this.
      <center>%%subject%%</center><br>
      %%datetime%% | Entry number: %%itemid%%<br>
      %%currents%%<br><br></center>
      %%event%%<br><br>
      <center>%%talklinks%%</center>

      • datetime, the date and time of the event. Refer to LASTN_DATE_FORMAT.
      • event, entry text.
      • talklinks, your comment links. Refer to LASTN_TALK_LINKS.
      • subject, your subject. Refer to LASTN_SUBJECT.
      • currents, your mood/music. Refer to LASTN_CURRENT.


    • LASTN_RANGE_MOSTRECENT, this indicates the number of items on display. %%numitems%% being displayed. It's up to you whether to use this or not. Personally who cares how many are shown. If you really did give a hoot. Count them out yourself.

    • LASTN_RANGE_HISTORY, how many items were skipped. %%skip%% were skipped.Again, who cares.
      • numitems, number of items on display.
      • skip, number of items that were skipped.


    • LASTN_SKIP_BACKWARD, part of the LASTN_SKIP_LINKS. This variable edits those going backwards (or in the past). As so: <a href="%%url%%">< BACK</a>
      • url, the <a href="..." part.


    • LASTN_SKIP_FORWARD, part of the LASTN_SKIP_LINKS. This variable edits those going forwards (or in the future). As so: <a href="%%url%%">FORWARD ></a>

    • LASTN_SKIP_SPACER, what appears between the two skiplinks. + # +

    • LASTN_SKIP_LINKS, your actual skiplinks all combined from the previous variables. %%skipbackward%%%%skipspacer%%%%skipfoward%%
      • skipbackward, past entries. Refer to LASTN_SKIP_BACKWARD.
      • skipforward, future entries. Refer to LASTN_SKIP_FORWARD.
      • skipspacer, middle thing. Refer to LASTN_SKIP_SPACER.



      Mmkay, anything I should add. I don't want to make this too indepth. Short as possible and concise. Took me about 2 hours to write this. .__O; I really just learned styles by studying someone else's that happily provided for me. >>; I have lj style notes. Scribbles on a print-out of her style page. Fun... Anyways, hope this is good!



    • (Post a new comment)

      (Deleted post)

      [info]aucune_gloire
      2004-09-15 06:41 pm UTC (link)
      Mm I made a new screen name o__o; I really don't remember what your contacts were. Anyways it's life at 35mph

      (Reply to this)(Parent)


      [info]__hibiscus
      2004-09-15 08:56 pm UTC (link)
      I shudder at the thought of isomers and substitution reactions. Yes, continue with your tutorial. Screw Organic Chem. Besides, I always like to see how other people are doing it so that I can make sure I'm doing it right like them.

      (Reply to this)(Thread)


      [info]aucune_gloire
      2004-09-16 07:46 am UTC (link)
      .__. omg, I hate those. There's a thing on the review sheet Im doing and it'slike find 3 isomers for dimethylcyclobutane. It forces me to remember cis and trans. *shakes fist*

      (Reply to this)(Parent)


      [info]babbled
      2004-09-15 09:10 pm UTC (link)
      Interesting! :D Or maybe that's just the geek in me. Am adding to mem in case I ever get around to buying a paid account.

      (Reply to this)(Thread)


      [info]aucune_gloire
      2004-09-16 09:18 am UTC (link)
      :O It's inevitable. You'll get extremely tired of free account crappy overrides and plunge into the wonderful world of paid accounts.

      (Reply to this)(Parent)(Thread)


      [info]babbled
      2004-09-16 12:06 pm UTC (link)
      But then I'll have to pay for an account! :( :O

      (Reply to this)(Parent)


      [info]semaj_miasma
      2005-04-19 02:53 pm UTC (link)
      I like the free account overrides. They're fun!

      (Reply to this)(Parent)


      [info]desenchantee11
      2004-09-15 09:48 pm UTC (link)
      Thanks so much and please continue with the tutorial!

      (Reply to this)


      [info]fa2u
      2004-09-26 05:38 pm UTC (link)
      I am so bad with this paid account layout stuff. I was just wondering...if I wanted the date a certain way, (and I have the code) where on Earth do I actually put it?

      (Reply to this)(Thread)


      [info]aucune_gloire
      2004-09-27 05:01 am UTC (link)
      .__o; the date place.

      (Reply to this)(Parent)(Thread)


      [info]fa2u
      2004-09-27 02:30 pm UTC (link)
      LOL.

      Where exactly is that???

      (Reply to this)(Parent)(Thread)


      [info]aucune_gloire
      2004-09-27 05:27 pm UTC (link)
      I listed all the override boxes in the order inwhich they appear.

      (Reply to this)(Parent)(Thread)


      [info]fa2u
      2004-09-27 08:03 pm UTC (link)
      Is this for when you create a style or something?

      Okay. Never mind. I am too dumb to understand this.

      [Sorry to be such a moron and post comments on an old entry.]

      :\

      (Reply to this)(Parent)(Thread)


      [info]aucune_gloire
      2004-09-28 08:06 am UTC (link)
      XD yeah, when you create a style. Most recent entries. It should be the first box.

      (Reply to this)(Parent)


      [info]jennilisanne
      2005-01-17 05:51 pm UTC (link)
      Hey,

      I'm trying to do a new layout, but whenever I put it onto S1, it doesn't show my posts, I've really tried to figure it out, but these %%lala%% things really confuse me, do I change what's in the %%lala%% thing?!! I don't understand :(!!!!

      thanks!!

      (Reply to this)(Thread)


      [info]aucune_gloire
      2005-01-17 07:06 pm UTC (link)
      No. You don't change those. They are variables. Think of it like math. X Y and Z are the values that change so %%datetime%% acts like your X Y or Z and changes depending on what day and time it is when you posted an entry.

      (Reply to this)(Parent)(Thread)


      [info]jennilisanne
      2005-01-18 09:06 am UTC (link)
      huh, right, well, I haven't changed them, but my posts are still not there!!

      (Reply to this)(Parent)(Thread)


      [info]aucune_gloire
      2005-01-18 05:19 pm UTC (link)
      Well do you have %%events%% in your LASTN_EVENT box?

      (Reply to this)(Parent)(Thread)


      [info]hangingbywire
      2005-05-09 11:31 pm UTC (link)
      you watch NOIR!!!!!!

      (Reply to this)(Parent)


      [info]matriculated_
      2005-02-13 04:22 am UTC (link)
      I got the comment text overides to work, is it possible for me to get them to work for the subject? I don't have a paid account...

      (Reply to this)


      [info]ruinedcross
      2005-05-02 02:00 am UTC (link)
      Uhhh....I couldn't quite understand the codes for mood and music...

      (Reply to this)


      [info]caithyra
      2005-10-05 10:27 am UTC (link)
      How do you add an avatar to new events? I've tried and tried but it just wont come out right.

      (Reply to this)(Thread)


      [info]aucune_gloire
      2005-10-05 09:52 pm UTC (link)
      You can not. Only S2 has that feature enabled.

      (Reply to this)(Parent)(Thread)


      [info]caithyra
      2005-10-05 11:22 pm UTC (link)
      Well, that sucks...

      (Reply to this)(Parent)


      Create an Account
      Forgot your login?
      Login w/ OpenID
      English • Español • Deutsch • Русский…