getUsername(); $pagename = $username.' Home'; $page = new Page($pagename, array(25, 50, 25)); $page->requireLogin(); //Welcome module $welcomeMod = new WelcomeModule($isFirstTime); ob_start(); print $welcomeMod->getHTML(); $content = ob_get_clean(); $page->addMessage($content); $page->addScript("home.js"); // LEFT COLUMN $page->addModule(new UserLinksModule(), 0); $page->addModule(new MiniStatsModule(), 0); // hits, prestige, etc. // CENTER COLUMN $page->addModule(home_alerts(), 1); // Alerts: # messages, Happy Birthday (on your b-day), outstanding friend requests, etc. //$page->addModule(home_recommendations(), 1); // Recommendations / Random pedlrs/patrons/content if($user->isAdmin()){ $page->addModule(home_addMemberForm(), 1); } //$page->addModule(home_randomFriends(), 1); // include_once "mod/friendsModule.php"; //$page->addModule(new Friends_RandomModule($user, nextNum()), 1); // $page->addModule(new NewPeepsModule(),1); //$page->addModule(home_whatsNew(), 1); // TODO: Make a module that tells people what's new. This should be not only the content, but also the site... like new features, bugfixes, speed-improvements, etc. so that they know we're constantly working on it. // RIGHT COLUMN $page->addModule(home_randomTips(), 2); return $page; } // end home_getHomePage() //// // //// function home_alerts(){ $title = "Recent Changes"; // STRINGTABLES ob_start(); print "\n"; $content = ob_get_clean(); $retVal = new TextModule($content, 'text', $title); $retVal->setImage("recentChanges_22.png"); return $retVal; } // end home_alerts() //// // //// function home_recommendations(){ $title = "Recommendations"; // STRINGTABLES ob_start(); // STRINGTABLES $content = ob_get_clean(); $retVal = new TextModule($content, 'text', $title); return $retVal; } // end home_recommendations() //// // //// function home_randomFriends(){ $title = "Friends"; // STRINGTABLES ob_start(); // STRINGTABLES $content = ob_get_clean(); $retVal = new TextModule($content, 'text', $title); return $retVal; } // end home_randomFriends() //// // //// function home_randomTips(){ $title = "Quick Tip"; // STRINGTABLES ob_start(); // STRINGTABLES //print "You can visit the style editor to easily change all of the colors on your profile page as well as the background image."; print "
"; print "dice"; print "
Click the dice (err.. die?) above to jump to a random page and surf around. It's fun!"; $content = ob_get_clean(); $retVal = new TextModule($content, 'text', $title); $retVal->setImage("tip.png"); return $retVal; } // end home_randomTips() //// // A module that allows control over users. Will only display for admins. // // TODO: Update this form to make it work with the new "users" table. //// function home_addMemberForm(){ $title = "Create A User"; // STRINGTABLES ob_start(); if(getUser()->isAdmin()){ include_once 'staffTools.php'; memberField($username); } else { print "Sorry, this module is for admins only.\n"; } $content = ob_get_clean(); $retVal = new TextModule($content, 'text', $title); $retVal->setImage("register.png"); return $retVal; } // end home_randomTips() ?>