Change wording on front page for when invites are turned off.

        Patch by sophie. 

diffs (90 lines):

diff -r 358d5df1bcc6 -r 51748d7a39ff htdocs/index.bml
--- a/htdocs/index.bml  Tue Feb 15 11:39:45 2011 +0800
+++ b/htdocs/index.bml  Wed Feb 16 20:14:39 2011 +0800
@@ -106,22 +106,35 @@ HTML
         <div id="intro-create-content">
 HTML
         $ret .= "<h1>" . BML::ml( ".create.join_dreamwidth", { sitename => 
$LJ::SITENAMESHORT } ) . "</h1>\n";
-        $ret .= "<p>" . BML::ml( LJ::is_enabled( 'payments' ) ?
-                                     ".create.join_dreamwidth.content" :
-                                     
".create.join_dreamwidth.content.nopayments",
-                                 { aopts => 
"href=\"$LJ::SITEROOT/support/faqbrowse?faqid=105\"" }
-                               ) . "</p>\n";
+
+        my $string = ".create.join_dreamwidth.content";
+        if ( ! $LJ::USE_ACCT_CODES )          { $string .= ".noinvites";  }
+        if ( ! LJ::is_enabled( 'payments' ) ) { $string .= ".nopayments"; }
+        # possible strings are:
+        # .create.join_dreamwidth.content                      - normal
+        # .create.join_dreamwidth.content.noinvites            - will be in 
use occasionally
+        # .create.join_dreamwidth.content.nopayments           - was in use 
before payments were set up
+        # .create.join_dreamwidth.content.noinvites.nopayments - highly 
unlikely to ever be in use on DW.org, but possible on Dreamhacks
+        $ret .= "<p>" . BML::ml( $string, { aopts => ( $LJ::USE_ACCT_CODES ?
+                                                       
"href=\"$LJ::SITEROOT/support/faqbrowse?faqid=105\"" :
+                                                       
"href=\"$LJ::SITEROOT/support/faqbrowse?faqid=4\"" ) } ) . "</p>\n";
+
+        my $createlink = ( $LJ::USE_ACCT_CODES ?
+                           "<a href=\"$LJ::SITEROOT/create\" onClick=\"return 
nocreatejs || 
displayCreateDiv(&quot;invite&quot;);\">$ML{'.create.invitelink'}</a>" :
+                           "<a 
href=\"$LJ::SITEROOT/create\">$ML{'.create.createaccount'}</a>" );
         $ret .= <<HTML;
             <ul id="create-links">
-                <li><a href="$LJ::SITEROOT/create" onClick="return nocreatejs 
|| displayCreateDiv(&quot;invite&quot;);">$ML{'.create.invitelink'}</a></li>
 HTML
         $ret .= <<HTML if LJ::is_enabled( 'payments' );
-                <li class="lastli"><a 
href="$LJ::SITEROOT/shop/account?for=new">$ML{'.create.paymentlink'}</a></li>
+                <li><a 
href="$LJ::SITEROOT/shop/account?for=new">$ML{'.create.paymentlink2'}</a></li>
 HTML
         $ret .= <<HTML;
+                <li class="lastli">$createlink</li>
             </ul>
 HTML
-        $ret .= "<p style=\"margin-top: 1em;\">" . BML::ml( 
".create.join_dreamwidth.codeshare" ) . "</p>\n";
+        if ( $LJ::USE_ACCT_CODES ) {
+          $ret .= "<p style=\"margin-top: 1em;\">" . BML::ml( 
".create.join_dreamwidth.codeshare" ) . "</p>\n";
+        }
         $ret .= <<HTML;
         </div>
     </div>
@@ -147,7 +160,6 @@ HTML
                     [ '/latest', 'latest_things', 'footnote' ],
                     [ '/random', 'random_journal', 'footnote' ],
                     [ '/community/random', 'random_community', 'footnote' ],
-                    [ 'http://dw-codesharing.dreamwidth.org/', 'codeshare' ],
                 ],
                 footnote => 'no_screening',
             },
@@ -159,6 +171,9 @@ HTML
                 ],
             },
         );
+
+        push @{$columns[1]->{items}}, [ 
'http://dw-codesharing.dreamwidth.org/', 'codeshare' ]
+            if $LJ::USE_ACCT_CODES;
 
         foreach my $column ( @columns ) {
             my $name = $column->{name};
diff -r 358d5df1bcc6 -r 51748d7a39ff htdocs/index.bml.text.local
--- a/htdocs/index.bml.text.local       Tue Feb 15 11:39:45 2011 +0800
+++ b/htdocs/index.bml.text.local       Wed Feb 16 20:14:39 2011 +0800
@@ -1,4 +1,6 @@
 .create.cancel=Cancel
+
+.create.createaccount=Create Free Account
 
 .create.enter_code=Enter your invite code:
 
@@ -10,9 +12,13 @@
 
 .create.join_dreamwidth.content=Creating an account requires either a small 
payment or an invite code. (<a [[aopts]]>Why?</a>)
 
+.create.join_dreamwidth.content.noinvites=This week only, you can create a 
Dreamwidth account without an invite code. If you want, you can still support 
Dreamwidth by making a small payment in return for <a [[aopts]]>extra 
features</a>.
+
+.create.join_dreamwidth.content.noinvites.nopayments=You can create an account 
using the link below.
+
 .create.join_dreamwidth.content.nopayments=Creating an account requires an 
invite code. (<a [[aopts]]>Why?</a>)
 
-.create.paymentlink=Make Payment
+.create.paymentlink2=Create Paid Account
 
 .create.use_code=Use Code
 
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to