wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r10029: LJSUP-7908: Link to mobile

Committer: wisest-owl
LJSUP-7908: Link to mobile

U   trunk/cgi-bin/bml/scheme/lanzelot.look
Modified: trunk/cgi-bin/bml/scheme/lanzelot.look
===================================================================
--- trunk/cgi-bin/bml/scheme/lanzelot.look	2011-02-11 10:38:11 UTC (rev 10028)
+++ trunk/cgi-bin/bml/scheme/lanzelot.look	2011-02-11 10:47:28 UTC (rev 10029)
@@ -121,8 +121,22 @@
 
 <?_code {
     my $class = LJ::get_body_class_for_service_pages();
-    return "<body class='$class' %%bodyopts%%>";
+    my $is_mobile = Apache::WURFL->is_mobile() ? 1 : 0;
+    return "<body class='$class ".($is_mobile ? "mobile-msg" : '')."' %%bodyopts%%>";
 } _code?>
+<?_code
+if (Apache::WURFL->is_mobile()) {
+    my $uri = LJ::Request->uri;
+    my $hostname = LJ::Request->hostname;
+    my $args = LJ::Request->args;
+    my $args_wq = $args ? "?$args" : "";
+    my $is_ssl = $LJ::IS_SSL = LJ::run_hook("ssl_check");
+    my $proto = $is_ssl ? "https://" : "http://";
+    my $url = LJ::eurl ($proto.$hostname.$uri.$args_wq);
+    $ret .= "<div class='b-message-mobile b-message-mobile-theme'><div class='b-message-mobile-wrapper'>";
+    $ret .= LJ::Lang::ml('link.mobile', { url => $url });
+    $ret .="</div></div>";
+} _code?>
         <div id="header">
                 <h1 class="logo"><a href="<?siteroot?>">LiveJournal.com</a></h1>
                 <?_code use vars '$reskining_html'; return $reskining_html; _code?>

Tags: ljcom, look, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments