December 6th, 2003

How to customise the look of your entries

Here is code that I've been working on for a while to show how to customise the look of an entry. It will affect the Recent, Day, Entry (the one with comments showing), and Friends pages. When you've viewing the code, please read the block comments in green to understand what you have to do. The following code puts a Link and {edit entry, add to memories, tell a friend} buttons at the bottom of the entry. It also shows you how you can remove the borders around user icons, and it shows you how you can move the Mood/Music information to above the entry text.

If you've used THIS tutorial on making different kinds of entries for announcements etc., then the following code should still work as it is overriding the Component::print_entry function, which the previously mentioned tutorial uses.

I'm assuming that you are familiar with creating your own layers and understand what overriding functions accomplish. If you don't, a good place to start is HERE.

[ Update 4/7/05 : Edited the tutorial to add entry Tags above Mood/Music metadata. ]
[ Update 18/2/04 : I rewrote some of the code to use system_box_top() and to embed the content within a table. This should make it easier for people to edit the content without having to worry about the layout specific code. ]
[ Update 22/2/04 : I added a small segment of code right at the top of the function to put in an html anchor that will be used from within the new Page Summary component that was introduced yesterday. You will need this for your Page summary links to work. ]
[ Update 13/3/04 : I altered the code for making your own toolbar so that I wasn't constructing the links, but instead was using the proper links that are attached to the entry. I also changed the way mood icon and text gets placed to the default of icon then text. I added instructions on how to reverse them if need be. ]

Collapse )

If anyone has any suggestions for improving this, just let me know and I'll try to update it.

saw sky and remembered, little soul big world, cow, eat sleep and eat
  • diziara


I like my buttons on websites, and especially my journal, to match the layout colors... however, I've noticed that the buttons match Window's colors, not the layout colors. Do anyone know if there's a veriable/class I should set in the stylesheet to get them to match the layout colors?

...and I thought they matched before. Am I losing my mind, or did we lose that ability? And yes I have the form elements option in the customization turned on, so I know I didn't accidently turn it off or something.
Santa Dragling

Help with Tag Boards

I am playing with a tagboard. I put all the tagboard code on my server and it appears to work just fine there, but when I try to add it to a component in my journal, nothing happens. I don't know if it's LJ or my code that always causes there to be an error when I compile.

The compiling will start then I will get an error page that the site doesn't exist. I don't know if it's just a me thing or what?

The tag board is current at:

Does anyone know how/if I can add this to my journal?

Collapse )

This may also be a sign that I should be finishing my final papers ;)
  • Current Mood
    confused confused

More useless begging :)

Hello, I'm wondering if anyone knows how to in the scripts, check if the user is:

  • Not logged in
  • Logged in as the owner
  • Logged in as a registered friend of the owner
  • Logged in as a random lj user who is neither of the above

Basically i need to know what the statements should look like for each, ideally the variable i'm checking, and what it's supposed to 'return' for each case. for instance (1 for yes he's logged in) (0 for no this is not the user). Yes i'll probably be nesting these if-than statements for logical cases of usability.

I'm trying to put big if-than statements around some lesser components, like the login one, the post one, etc.
  • Current Mood

print_entry functions

i think xevinx should be able to go thru all the versions of print_entry() and del the ones that dont work for his tastes... and... umm... i just realized something... its like, closed source... umm... we're advertising the code here... maybe we should figure out a way to make these entries only visible to registered users (there isnt a way to do this, as far as i know). so... yeah... thats my heads-up for today.
run the fuck away

Here's one...

I've seen alot of people posting revised versions of the print_entry function, and a few other otherwise undocumented functions, both here and in s2component. Before I go line-by-line in removing those revisions, does anyone have the original, uneditted code lying around? It'd be handy. Save me some time.

If anyone has print_page reverse engineered, that'd be real handy... I've got an idea for a really odd way of presenting component data that I might want to work on.