?

Log in

No account? Create an account
 

Is this S2 or not?

About  

Previous Entry Is this S2 or not? Jan. 6th, 2005 @ 03:24 pm Next Entry
I'm just getting into customizing my galleries and I have a quick question.

FotoBilder Core doesn't have string[] views_order defined in the class Page like LJ S2 Core does. Is there anyway I can cross-reference this or do you know where I can find the declaration of views_order so that I can create a custom class in my FB layout?

I can see that FB Core is built upon LJ's S2, but why not carry all of it over and then just add the extra classes and methods needed for FB's purposees?
Leave a comment
[User Picture Icon]
From:kunzite1
Date:January 7th, 2005 12:14 am (UTC)

(Link)
*shrug*
var Page     p                      = get_page(); # get page handle
var string   LJSITEROOT             = "http://www.livejournal.com"; # set root for lj
var string   journal_type           = "P"; # p = person/user, c = comm, y = syn # set journal type
var string   journal_dir            = $journal_type == "C" ? "community" : "user"; # set journal directory
var string   base_url               = "$LJSITEROOT/$journal_dir/$p.user"; # build base url to journal
var string   text_view_recent       = "recent";
var string   text_view_friends      = "friends";
var string   text_view_friends_comm = "members";
var string   text_view_archive      = "calendar";
var string   text_view_userinfo     = "user info";
var string[] views_order            = ["recent", "friends", "archive", "userinfo"]; # set view order
var string{} view_url               = { # set view urls
                                       "recent"   => "$base_url/",
                                       "friends"  => "$base_url/friends/",
                                       "archive"  => "$base_url/calendar/",
                                       "userinfo" => "$base_url/info/"
                                      };
var string{} view_text              = { # set view text
                                       "recent"   => $text_view_recent,
                                       "friends"  => $journal_type == "C" ? $text_view_friends_comm : $text_view_friends,
                                       "archive"  => $text_view_calendar,
                                       "userinfo" => $text_view_userinfo
                                      };
foreach var string v ($views_order) {
  """<a href="$view_url{$v}">$view_text{$v}</a><br />""";
}
[User Picture Icon]
From:brandon_scott
Date:January 7th, 2005 12:53 am (UTC)
(Link)
Perfect! And you even anticipated my need for view_url, thank you very much!
[User Picture Icon]
From:kunzite1
Date:January 7th, 2005 01:11 am (UTC)

(Link)
'welcome.

let me know if there are any errors. there might be.

i also tried to make it look like ljs2 so moving variables over shouldnt be too hard. itll take some changing of the code structure but the variable names should match up pretty well to the lj core.
[User Picture Icon]
From:brandon_scott
Date:January 7th, 2005 01:15 am (UTC)
(Link)
When I use my layout I get the "The page cannot be displayed" (I use IE6)error. But if I use some other layout it works fine. There must be a logic error somewhere in my code because its compiling fine.
[User Picture Icon]
From:kunzite1
Date:January 7th, 2005 01:20 am (UTC)

(Link)
interesting.
[User Picture Icon]
From:kunzite1
Date:January 7th, 2005 01:32 am (UTC)

(Link)
you pics.lj seems to be wonky for some reason.

and:
"$LJSITEROOT/$journal_dir/$p.user";
should be:
"$LJSITEROOT/$journal_dir/$p.user.user";
and:
"archive"  => $text_view_calendar,
should be:
"archive"  => $text_view_archive,
[User Picture Icon]
From:kunzite1
Date:January 7th, 2005 01:34 am (UTC)

(Link)
gah.
$journal_type == "C" ? "community" : "user";
to
$journal_type == "C" ? "community" : "users";
ill get it right and post it to a new comm that ill make. :D
[User Picture Icon]
From:brandon_scott
Date:January 7th, 2005 01:40 am (UTC)
(Link)
its cool, you're human, mistakes are aloud. Thanks for the errata.
[User Picture Icon]
From:jproulx
Date:January 7th, 2005 06:47 pm (UTC)
(Link)
FotoBilder Core doesn't have string[] views_order defined in the class Page like LJ S2 Core does. Is there anyway I can cross-reference this or do you know where I can find the declaration of views_order so that I can create a custom class in my FB layout?

I'll look into checking in some of what kunzite1 listed here.

I can see that FB Core is built upon LJ's S2

Actually it's the other way around -- FotoBilder's S2 support was the precursor to LiveJournal's S2 support. FotoBilder's S2 core layer could use an update, but I've been too busy with documentation to take care of it.
(Leave a comment)
Top of Page Powered by LiveJournal.com