January 4th, 2004

tesla

Request...

I've been touching up the code from previous tutorials that I've incorporated. And I noticed that I was certainly inputting my username alot, which struck me as pretty silly; shouldn't S2 be smart enough to figure that out?

So, I checked the docs, and replaced all those places where I had to put my username with $p.journal.username. And in the profile component, I noticed that I could use a smiliar technique to get my website URL and name from my profile, avoiding hardcoding. ($p.journal.website_name and $p.journal.website_url). I was wondering if we could start using that in our tutorials to make "no-rewrite" components and patches? Maybe edit a few of the existing tutorials as well?

Also, The doc on the user-class and on the page class can help find other places to change that.
  • Current Music
    Black Flag - I Love You
tesla

Basic Query Handling (Or the "Would You Like a Cookie? Component")

This is another one of those things I discovered while skimming the docs. I'm not sure how to use this practically, but I can think of a few possibilities, like letting a user select certain layout or color options on a form, and having your journal change in response to them, or just simple toys and games like those ever popular quiz-sites. Think of that people, making your quiz right inside of your LJ, you'll be the talk of the LiveJournal Community. Think about how many people will friend you after that!

Okay, enough promo- time to work.

We're going to make a component that decides wether or not the user would like a cookie.
Collapse )
  • Current Music
    my bloody valentine - Lose My Breath

(no subject)

With Daimones help, I've replaced my comments links with pictures, but I'm trying to use alt="" to show the original text. i.e. alt="$text_read_comments" but now my alt tag reads "1 comment // # comments" even if there is only one or multiple comments, it still gives the full line. any suggestions?
tesla

Full Update Page (More Query Handling)

During my fit of insomnia last night, I decided that I wanted to cull my collection of components, but I wanted to keep the functionality- specifically the update component. Which is huge and takes up a fantastic amount of space, and is kinda hard to use being a sidebar component. So I decided to create a full-update page in my journal style.

Collapse )