Lorelei (loreleif) wrote in stylehelp,
Lorelei
loreleif
stylehelp

Adding Links to Date Format

volantwish asks: "I'd like to add a link to the day view from the date of entries...I'd like to be able to create this effect so that I could maybe eventually make this a public style. I'd also like to do the same thing on my friend page."

There isn't really an elegant way to do this, but you can do it. Sort of. Actually, it's easier to do it on your friends' page than on your own (at least, and make it a public style). In the FRIENDS_EVENT section where you want your date, use the code
[Error: Irreparable invalid markup ('<blockquote [...] font-size:10px">') in entry. Owner must fix manually. Raw contents below.]

<lj user="aurorawizard"> asks: "I'd like to add a link to the day view from the date of entries...I'd like to be able to create this effect so that I could maybe eventually make this a public style. I'd also like to do the same thing on my friend page."

There isn't really an elegant way to do this, but you <b>can</b> do it. Sort of. Actually, it's easier to do it on your friends' page than on your own (at least, and make it a public style). In the FRIENDS_EVENT section where you want your date, use the code<blockquote style="font-family:Courier New, Courier, system"; font-size:10px">&lt;a href="%%cons:siteroot%%/users/%%user%%/day/%%datetime%%"&gt;%%datetime%%&lt;/a&gt;</blockquote>Voila! The drawback is that your FRIENDS_DATE_FORMAT will have to be %%yyyy%%/%%mm%%/%%dd%% (e.g., 2003/03/14 for today), so all your dates will show up that way. I see that in your current LASTN style, you've worked around the date-format problem by putting the link in your DATE_FORMAT section; the problem with that is, as you've discovered, the username variables aren't valid there.

On your LASTN page, unfortunately, there are currently no sections where both %%username%% and %%datetime%% can be used. You're pretty much stuck with the way you're already doing it, and if you choose to make the style public, individuals would just have to type in their own usernames as applicable. (As a workaround, you could redirect your LASTN page to a filtered friends page containing only your entries, or you could make your journal a community and post from another account, then use the ALTPOSTER variable, but neither of these is really conducive to making an easy public style!)
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

  • 1 comment