6 my $remote = LJ::get_remote();
8 unless ($remote) { $body = "<?needlogin?>"; return; }
12 my ($bname, $loc, $pos) = split(/-/, $t);
15 my $portopts = LJ::Portal::load_portopts($remote);
19 LJ::Portal::delete_box($portopts, $loc, $pos, $bname);
20 LJ::Portal::save_portopts($remote, $portopts);
22 return BML::redirect("$LJ::SITEROOT/portal/moz.bml");
24 return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI");
28 if ($op eq "u" || $op eq "d")
30 LJ::Portal::move_box($portopts, $loc, $pos, $bname, $op);
31 LJ::Portal::save_portopts($remote, $portopts);
33 return BML::redirect("$LJ::SITEROOT/portal/moz.bml");
35 return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI");
41 $title = "Customize Homepage";
43 $body .= "<?h1 Welcome! h1?>";
44 $body .= "<?p By clicking the little plus sign on the main page you can do several things. You can change the settings for the box you clicked, you can add a new box, or you can reset your settings back to the default. p?>";
46 $body .= "<?h1 Change Box Settings h1?>";
47 $body .= "<?p Change the settings for the box you just clicked:<ul>\n";
49 my $modform = LJ::Portal::make_box_modify_form($portopts, $loc, $pos);
53 $body .= "<i>No options for this box.</i>";
58 $body .= "<?h1 Add New Box h1?><?p You can create a new box to show on the main page:<ul>";
59 foreach my $loc (@LJ::PORTAL_COLS)
61 $body .= "<form method='post' action='alter.bml'>";
62 $body .= LJ::html_hidden("op", "addnew",
64 $body .= "<p><b>$LJ::Portal::colname{$loc}</b><br>";
65 $body .= LJ::html_select({ 'name' => "bname",
68 "", "(Pick Box Type)",
69 LJ::Portal::get_box_types($loc));
70 $body .= " <input type=submit value=\"Proceed -->\"></form>";
78 my $bname = $FORM{'bname'};
79 my $loc = $FORM{'loc'};
81 my $pos = LJ::Portal::create_new_box($portopts, $bname, $loc);
82 LJ::Portal::save_portopts($remote, $portopts);
84 my $modform = LJ::Portal::make_box_modify_form($portopts, $loc, $pos);
87 $title = "Configure Box";
96 return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI");
103 my $newargs = LJ::Portal::modify_box($remote, $portopts, $FORM{'loc'}, $FORM{'pos'}, \%FORM);
104 if ($FORM{'loc'} eq "moz") {
107 return BML::redirect("$LJ::SITEROOT$LJ::PORTAL_URI");
111 ## add sidebar to mozilla
114 $title = "Add Mozilla Sidebar";
115 $body = "If you're running Mozilla or Netscape >= 6.0 you can click the link below to add this LJ portal box to your Mozilla sidebar. If you're using Internet Explorer, sorry.<p>";
118 $body .= "<a href=\"javascript:sidebar.addPanel('$LJ::SITENAME','$LJ::SITEROOT/portal/moz.bml','')\"><b><--- Add $LJ::SITENAME Mozilla Sidebar</b></a>";
120 $body .= "If you just added a new box to the sidebar or changed a setting and the $LJ::SITENAME sidebar is already open, hit the reload link in the sidebar.";
127 title=><?_code return $title; _code?>
128 body=><?_code return $body; _code?>
130 link: htdocs/portal/moz.bml, htdocs/portal/index.bml
131 post: htdocs/portal/alter.bml