| RebREBreb ( @ 2004-09-15 16:16:00 |
Style Variable Tutorial
Right, after being disheartened by
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%%
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%%.
LASTN_TALK_READLINK, this textbox edit the read link for your comments. You must include a %%urlread%% variable in this box.
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%%
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>
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.
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>
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.
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>
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%%%%skipfowa rd%%
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!
Right, after being disheartened by
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 %%
- 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%%
- 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
- 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".
- 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/m
emadd.bml?journal=aucune_gloire&itemid=%%itemargs%%">ADD TO MEM</a>
- subject, actual value for your subject header.
- 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.
<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.
- numitems, number of items on display.
- skip, number of items that were skipped.
- url, the <a href="..." part.
- 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!