Hi All :) I am looking for a tutorial / how-to for creating my own top-level layer (not a layout-specific or style layer).
I'm new to the idea of customizing my liveJournal and I want all in. I have the HTML and CSS for the layout I want. I've browsed the S2 Manual and I've learned the most from looking at the public layers but I am still somewhat
(
Read more... )
Comments 8
But if you want some function in an existing class from Core (not one you define yourself, apparently), you should prefix the name with "lay_"; a lot of styles also use prefix "lay_print_". I have a function named:
function Page::lay_spammertop() {}
And it works okay. It counts how many times someone's name appears on my friends page and prints the top 5.
I'm not sure what you are talking about concerning "function calls", so I'll leave that to programmers ;)
Reply
Reply
if you create a top-level layout layer, you'll be able to define your own global functions and use the lay_ prefix to create your own class-specific functions, just as camomiletea stated.
function Page::lay_print_header() exists in flexible squares but not the core. function Page::printHeader() does not exist in any layer. nor does function printHeader(). however, if you created your own layout layer, you would be able to define function printHeader(). however, you would be unable to define function Page::printHeader(). instead it would have to be function Page::lay_printHeader().
after all that... it would be much much easier to see if you could hack an existing layout into something that resembles your layout in mind.
i say this because there are many more things to a layout layer than just the structure of the layout. you also have to define the properties that you're going to use. and that ( ... )
Reply
here are flexi and the core.
Reply
I half heardedly followed your link to the core only to discover that I've never scrolled down far enough to find the information I really wanted *palm meet forehead* My tags aren't labled as tags anymore :)
What I started off doing was copy and pasting flexible squares code onto a top-level layout layer and then hacking away at it but once I had the basic understanding of what was going on I began my own layer so I could define my own properties. Once I stopped trying to use flexable squares code I ran into the naming confusion. Anyway I'll remember the lay prefix :)
The work in progress is up as my current layout. It displays best in FireFox right now (my browser of choice, but I want it to look right in all eventually). Most of the major stuff is there but a few pages are missing footers and the view entries by subject page hasn't been formated yet.
Reply
well. if it's going to look mostly like flexi, why not start with flexi and override the functions in a theme layer that you need to change?
I began my own layer so I could define my own properties
what kinds of things did you need that weren't available?
if you're working in a user/theme layer and want to create your own functions, you can, but it's tricky.
you seem to have view_entry_disabled set to true so that it uses bml pages for entry/reply view. if you set it to false, you should be able to see the s2-styled pages.
in flexi, EntryPage::print_body() calls print_entry() but ReplyPage::print_body() doesn't have the same function call because you can't send a Comment object to the print_entry() function with the way that it's written.
so yeah. you might be able to get away with just hacking up flexi to suit your needs.
Reply
Leave a comment