HOWTO: Mood icon to the left of metadata

Dec 15, 2006 16:04

UPDATED (3/03/08): This function has been updated to add the custom friends groups to the metadata. Code is based on kunzite1's similar modifications for every other style. (Comments to this entry before the update probably won't make sense anymore.)

Since you need to override the print_metadata() function, this modification will require a custom theme ( Read more... )

s2:theme layer, entries:metadata, !tutorial, advanced, $acct level:paid or perm

Leave a comment

Comments 18

paradise_city December 15 2006, 21:42:31 UTC
That's fantastic! Thanks so much. :)

Unfortunately, there seems to be a line break before the tag header prints. Is that fixable? Or is that just me?

Reply


kunzite1 December 15 2006, 21:49:47 UTC
looks good, however, this entry might have happier code.

the "loc_after_mood" hack is really ugly and the new version of the code simply allows for changing the order of the meta.

Reply

av8rmike December 15 2006, 22:00:54 UTC
Huh, for some reason I thought that entry was only applicable if you wanted images instead of the linkbar. I'll admit I kind of glazed over after a while. I'll take another look and revise this code when I get some time.

BTW, why isn't this community listed on the profile pages for s2styles or s2layers?

Reply

kunzite1 December 15 2006, 22:03:45 UTC
i pretty much overhauled the logic and improved it in several areas including the custom order idea. :D

...because it's not there yet? haven't had time to update the info pages. XD ... i'm usually good about having them friended by s2_comms though.

Reply


(The comment has been removed)

av8rmike December 25 2006, 17:45:18 UTC
Yeah, I see that now. What's weird is, I thought I had corrected that by the time I posted the full thing, since most of my own entries have only tags. I may just post a re-working according to kunzite1's new version, which is much less unwieldy.

Reply

av8rmike December 25 2006, 19:32:58 UTC
Alternatively, you could replace this line:
if ( (size $.metadata > 0) ) {with this one:
if ( (size $.metadata > 0) or (size $.tags > 0 and $*tags_aware) ) {

Reply


jadedthang January 9 2007, 11:12:29 UTC
Ok. *flails* I have no experience with S2 layers, what so ever. Basically all I'm looking to do is put my location after my mood and delinkify it. That's it.

I created the custom theme layer for expressive, inserted this code, and set the values for loc_after_mood and vanilla_loc to true. Unfortunately I got no results. Is there something else I need to change or set values for? Or something I have to do in order to make the theme layer active?

P.S. I also tried kunzite1's code, but there are just so many things in there that I'm at a loss for, and I don't want the images instead of the linkbar.

Reply

av8rmike January 9 2007, 13:56:16 UTC
The entry kunzite1 linked to above was written for Bloggish, so I don't know what will happen if you just cut 'n pasted it into Expressive. It might work, but the styling would be wrong because the class names are different. Anyway... To use your theme layer, go to Your Styles, edit the style in use (should be called "wizard-voxhtml" or something), and ensure it's using your theme layer in the drop-down box instead of one of the existing themes.

Reply

jadedthang January 9 2007, 19:03:57 UTC
Thank you so much for your help!

Ok, I've got my layer being used (yay) and it all seems to be working fine. The only problem is that I didn't actually want the mood icon to the left of the metadata. *facepalms*

I wish I could figure all this stuff out on my own, because I know that you've got better things to do. Is there something I can change in the code to put the mood icon back to the right of the metadata where it was originally, and still have the location come after mood?

Reply

av8rmike January 9 2007, 22:24:31 UTC
Unfortunately, putting the mood icon left of the metadata is what that function does. Changing the order of the metadata is just a side benefit. =P I was actually going to adapt kunzite1's later version for Expressive within the next few days, since it's been kind of slow here. I think that new function will be a little more configurable.

BTW, is it totally weird of me that any time I first glance at your icon, I see the rainbow coming out of the guy's nose?

Reply


(The comment has been removed)

av8rmike August 2 2007, 22:49:14 UTC
It's the same way in all styles, whether using custom functions or not, and fixed with CSS:
.asset-tags-header {font-weight: bold;}

Reply


Leave a comment

Up