?

Log in

No account? Create an account

Previous Entry | Next Entry

This is a bit of S2 code to switch the order of the main page elements, so that #beta and/or #gamma come first in the html code, allowing layouts in which #alpha is not floated and does not need its width defined. This will really only be useful for people who are making their own style sheets. You could put this code into an existing theme, but none the associated style sheets will work right once the order of #alpha and #beta/gamma are switched.

For people who, like me until a few days ago, have never set eyes on anything S2, here are some directions to get to the layers and how to make a new one. It's easy.

Open the customize-your-journal page and click on the farthest right-hand tab, Advanced. Next page, click on the fourth link down the page, Your Layers.

If you've never messed around with S2, the table you see on the next page will probably be all the little color and text customizations you did with the customization wizard. If you've never switched around colors or text in your layouts, there may not be any table at all. In any case, look down at the very bottom of the page.

You want to "Create a Layout-specific Layer". Choose "theme" and "Expressive" from the dropdown menus and click on the "create" button. The page should reload and, either at the very top or very bottom of the table, your new theme layer will appear. It will be a child of Expressive, and have no name yet. Click the "edit" button.

This will open up a set of three windows on a gray page. For now, ignore the left-hand and bottom panes, it's the large one on the top right that you want. Paste the following code into that window and hit the "save and compile" button up at the top.




layerinfo "type" = "theme";
layerinfo "name" = "Flex-width";

function render_layout (Page p, string lay) {
if ($lay == "3CL") {
container_open("beta");
$p->lay_sidebar_secondary();
container_close();
container_open("gamma");
$p->lay_sidebar_primary();
container_close();
container_open("alpha");
$p->print_body();
container_close();
return;
}

if ($lay == "2CL") {
container_open("beta");
$p->lay_sidebar_primary();
$p->lay_sidebar_secondary();
container_close();
container_open("alpha");
$p->print_body();
container_close();
return;
}

if ($lay == "2CR") {
container_open("beta");
$p->lay_sidebar_primary();
$p->lay_sidebar_secondary();
container_close();
container_open("alpha");
$p->print_body();
container_close();
return;
}

if ($lay == "3CM") {
container_open("beta");
$p->lay_sidebar_secondary();
container_close();
container_open("gamma");
$p->lay_sidebar_primary();
container_close();
container_open("alpha");
$p->print_body();
container_close();
return;
}


}


And that's it. Hit the back-button until you get the customize-your-journal page back, go to the Look And Feel tab and select Flex-width as your theme, and you're done.


I also revised some functions to strip out the automatic styling of user-pics, so you can define those completely through your style-sheet, but lj doesn't seem to like to display that code, no matter what tag I put it in. So I put it up here instead. Scroll down a bit for these two. This code you could paste into an existing theme without causing trouble, I imagine.

Hope this is helpful!


P.S. Could the maintainers give us a list of tags, and what they want them used for on this comm? Without at least a moderately controlled vocabulary, I'm reluctant to start tagging entries here.

Comments

( 19 comments — Leave a comment )
chasethestars
Sep. 5th, 2006 06:36 pm (UTC)
Could the maintainers give us a list of tags, and what they want them used for on this comm?
Is that why no one has been tagging their entries? I'm going to draft up rules/guidelines, and part of that was to ask users to add tags. I had assumed that tags weren't being used because users didn't like them?

I like how s2flexisquares is organized: !tutorials & !announcements so those two always shows up at top.
Everything else can be tagged as what makes sense I guess? (header, css, s2, sidebar (sidebars?), images, paid account (for stuff where creating a layer/advanced is needed. or should the tag be "advanced" instead?), links, etc.)
chasethestars
Sep. 5th, 2006 06:38 pm (UTC)
oh, and the theme name(s) too if it's theme specific
branchandroot
Sep. 5th, 2006 06:52 pm (UTC)
I know it's why I was a little iffy about throwing in tags. *smiles* I didn't want to contribute to any kind of one-tag-for-every-entry mess. I wouldn't be surprised if other people were holding off for the same reason. I think it helps to at least have a basic list. *thinks* Actually, I think the flexible squares comm has an entry for that. I like how they're orgnized, too; things are easy to find there.

*chews nail* Perhaps people should put both "advanced" and "paid account" on the entries involving making layers? Then people can find those entries both ways, and the list of tags will give some indication of what all is needed/involved.

Maybe also tags for "how to" and "question"?
chasethestars
Sep. 6th, 2006 12:42 am (UTC)
yup, Flexible Squares has a pre-defined list. I think that'd be a really good starting point for this comm. I want to be as organized as them, if not even more so! :)

Do you want to help mod/maintain?
branchandroot
Sep. 6th, 2006 04:33 am (UTC)
If you need more people helping out, sure! I have a kind of sporadic schedule, so there might be months when I'm not around much, but if you'd like me to help out with some of the organizational tasks, I'd be glad to.

I have to say, the setting they mentioned that allows anyone to use tags but only mods to create them seems like the best of all worlds.
chasethestars
Sep. 6th, 2006 11:29 pm (UTC)
One of the flexisquares maintainers pointed me towards the FAQ that explains tag control.

Next step: create list of tags and rules/guidelines, and recruit anyone else who wants to help maintain the community. My schedule is kinda sporadic too, in that I'm either super busy or have nothing to do at all. Why is that that when there's work, it all comes at once? There are so many things I want to do for this community, and the members have already beat me to some of them :)
branchandroot
Sep. 6th, 2006 11:45 pm (UTC)
Very useful! I can work on the tag list, if you like. Between what you listed above, and the ideas flexisquares have, I think we've got most of them already.

Do you think nimoloth might like to maintain, too? She knows a lot more about S2 than I do, that's for sure.
chasethestars
Sep. 7th, 2006 12:06 am (UTC)
asking
nimoloth
Sep. 8th, 2006 07:32 pm (UTC)
I'm happy to help - don't know if you got my reply elsewhere.
branchandroot
Sep. 7th, 2006 03:02 am (UTC)
Tentative tag list
All right, what I have so far is:

By type

  • Question

  • How to

  • Contribution - Any contribution that is not a How To guide, such as documentation or style sheets.

  • Advanced - Any post that requires extensive knowledge of CSS or the manipulation of layers to understand or implement should have this tag.



By topic

  • Css

  • S2

  • Header

  • Entries

  • Comments

  • Sidebar

  • Links

  • Images

  • User icons

  • Misc - Anything that does not fall into one of the above categories.



By account type

  • Paid Account - If something requires a paid account to implement, add this tag to the entry.

  • Plus Account - If something is available to Plus accounts, add this tag to the entry.


If/when Expressive becomes available to free accounts, that tag will be added.

By theme
(These will need to be listed out, I think, but that would overflow a comment ^_^; )


Tags that start with a ! are for official use only, please do not apply them yourself.

Moderator use only

  • !moderator announcement

  • !beginners guide - Quick guides for beginners.

  • !tutorial - Specific and/or in-depth instruction.

  • !old - Tutorials or information that have become obsolete with new code releases.




What do you think?
chasethestars
Sep. 7th, 2006 04:32 pm (UTC)
Re: Tentative tag list
What do you think?
I think I'm a slacker :(
I promise I'll work on this when I get home tonight.


additions to by topic:
- metadata
- date/time
- tags?
- links need to be more specific I think. There's links in your sidebar links list, links in the entry footer (footer links?), the navigation links at the top.
- entry title/entry header (since Header should just be specific to the header at the top of the layout)


by theme/lots of tags:
we're working on fixing the tags thing so it wraps to the next line.


I think Paid/Plus account tags should be used only when its available or specific to it, otherwise every post would have at least 3 tags: one from account type, one from type, one or more from category. Question could probably be taken out; we can assume every post will be a question unless specified otherwise as a how-to, guide, or tutorial.


s2expressed for drafts and discussion, though we seem to have a nice thread going here :)
branchandroot
Sep. 8th, 2006 01:29 am (UTC)
Re: Tentative tag list
*makes revisions* Don't worry about it too much. Heaven knows you're busy shifting code right now. I can do the typing for this, no problem.

How about topics for "entry footer links" and "page navigation links"? I'm thinking that most questions about the sidebar links can probably take a topic of Sidebar, since just about the whole thing is linked. And people can use tag combinations like Sidebar and Links, too.

There are so many parts in Expressive, it's hard to find a balance between usefully specific and overwhelming users with tags. ^_^;
chasethestars
Sep. 8th, 2006 07:14 pm (UTC)
Re: Tentative tag list
What about code pushes/new releases/changes/bugs/fixes? Or is that just too much, because they can also easily go under !announcement and whatever layout part is being affected.
branchandroot
Sep. 8th, 2006 07:19 pm (UTC)
Re: Tentative tag list
I was just thinking this morning that a topic for Bugs would be good to have. New releases in general can probably go under !announcement, though.

Let me add that, and I'll post up the new draft on Expressed.
nimoloth
Sep. 6th, 2006 03:55 am (UTC)
It would be good to have tags listed down the side, so we can choose as required, too. I was just making up what I thought would be appropriate!
foogod
Sep. 8th, 2006 06:32 am (UTC)
FYI, it's actually not necessary to reorder the #beta and #gamma chunks in the HTML.. I've got a flexible-width setup for my own journal using only CSS modifications to the original HTML (I'm currently making the CSS more general so it works with a wider range of the available themes, and then was planning on posting a Howto once that's done).

Removing the userpic styling in the HTML would be really nice, though.. I'll have to look into that patch.
branchandroot
Sep. 8th, 2006 04:31 pm (UTC)
Very snazzy layout. I considered absolute positioning, but I avoid that when at all possible. *wry* It gives me code-twitches. A How To would be wonderful, though, especially since it looks like your layout options can be applied as a patch to any of the current standard layouts. Does it work in IE, too?
foogod
Sep. 8th, 2006 05:20 pm (UTC)
Thank you :)

And yes, I was actually rather surprised to discover that it took almost no fiddling to get it to work just fine in IE too. The biggest issue right now is that it only really works for about half of the Expressive themes (Zen, Bunnylicious, Cityscape, Playful, Scribble, and Urban look pretty good, but the others still have some issues). I'm reasonably confident that when I have a few minutes this weekend to spend on it I can get most of the rest of them working too, though..
alexandramuses
Jul. 12th, 2007 02:47 pm (UTC)
Thank you so, so much for this modified function. I've been despairing for the last two hours about how to get a flexible-width layout with the alpha column in the middle, and you've solved it for me. Thanks!!
( 19 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars