[ljcom] r4735: Support for redirecting the homepage to ...

Apr 11, 2007 01:08


Committer: janineSupport for redirecting the homepage to another URL based on a config value. Beginnings of A/B testing.

U branches/homepage/cgi-bin/LJ/Hooks/Homepage.pm
U branches/homepage/htdocs/index.bml

Modified: branches/homepage/cgi-bin/LJ/Hooks/Homepage.pm
===================================================================
--- branches/homepage/cgi-bin/LJ/Hooks/Homepage.pm 2007-04-11 00:46:46 UTC (rev 4734)
+++ branches/homepage/cgi-bin/LJ/Hooks/Homepage.pm 2007-04-11 01:08:50 UTC (rev 4735)
@@ -129,4 +129,8 @@
return $content;
});

+LJ::register_hook("alt_frontpage", sub {
+ return LJ::conf_test($LJ::ALT_FRONTPAGE);
+});
+
1;

Modified: branches/homepage/htdocs/index.bml
===================================================================
--- branches/homepage/htdocs/index.bml 2007-04-11 00:46:46 UTC (rev 4734)
+++ branches/homepage/htdocs/index.bml 2007-04-11 01:08:50 UTC (rev 4735)
@@ -2,9 +2,12 @@
head<=
[0];
+ return BML::redirect($uri) if $uri;
+ }

LJ::need_res('stc/lj_base.css', 'stc/home.css', 'js/widgets/frank.js');
}

Previous post Next post
Up