$LJ::OLD_RES_PRIORITY }, "stc/customize.css" ); LJ::need_res( "js/customize.js", "stc/select-list.css" ); my $remote = LJ::get_remote(); return "" unless $remote; my $authas = $GET{authas} || $remote->user; my $u = LJ::get_authas_user($authas); return LJ::bad_input($ML{'error.invalidauth'}) unless $u; $title = $u->is_community ? $ML{'.title.comm'} : $ML{'.title2'}; # extra arguments for get requests my $getextra = $authas ne $remote->user ? "?authas=$authas" : ""; # if using s1, switch them to s2 unless ($u->prop('stylesys') == 2) { $u->set_prop( stylesys => 2 ); } # make sure there's a style set and load it my $style = LJ::Customize->verify_and_load_style($u); # lazy migration of style name LJ::Customize->migrate_current_style($u); my $cat = defined $GET{cat} ? $GET{cat} : ""; my $layoutid = defined $GET{layoutid} ? $GET{layoutid} : 0; my $designer = defined $GET{designer} ? $GET{designer} : ""; my $search = defined $GET{search} ? $GET{search} : ""; my $page = defined $GET{page} ? $GET{page} : 1; my $show = defined $GET{show} ? $GET{show} : 12; my $ret; if (LJ::did_post()) { if ($POST{nextpage}) { return "" unless LJ::check_form_auth(); return BML::redirect("$LJ::SITEROOT/customize/options$getextra"); } my @errors = LJ::Widget->handle_post(\%POST, qw(JournalTitles ThemeChooser ThemeNav LayoutChooser)); $ret .= LJ::bad_input(@errors) if @errors; } $ret .= "
"; if ($GET{authas}) { $ret .= LJ::html_hidden( { name => "authas", value => $GET{authas}, id => "_widget_authas" } ); } # if they're working as a community, reproduce the community management linkbar: if ( $u && $u->is_community ) { my $linkbar; $linkbar = $u->maintainer_linkbar( "customize" ); $ret .= "" . $linkbar . "
"; } # would you like to set the site skin instead? $ret .= ""; if ( $u && $u->is_community ) { $ret .= LJ::Lang::ml( '.setstyle.comm' ) . " "; } else { $ret .= LJ::Lang::ml( '.setstyle.user' ) . " "; } $ret .= LJ::Lang::ml( '.setsiteskin', { aopts => "href='$LJ::SITEROOT/manage/settings/?cat=display#skin'" } ); $ret .= "
"; my $current_theme = LJ::Widget::CurrentTheme->new; $headextra .= $current_theme->wrapped_js( page_js_obj => "Customize" ); $ret .= "