Change text on /manage/circle/invite.bml to include number of unused 
codes.

        Patch by denise. 

diffs (29 lines):

diff -r bac7c6c365f0 -r 4fd8af6665b0 htdocs/manage/circle/invite.bml
--- a/htdocs/manage/circle/invite.bml   Fri Jul 31 01:28:04 2009 -0500
+++ b/htdocs/manage/circle/invite.bml   Fri Jul 31 11:28:09 2009 -0500
@@ -189,7 +189,8 @@
     if ($findfriends_intro) {
         $body .= $findfriends_intro;
     } elsif ( $LJ::USE_ACCT_CODES ) {
-        $body .= "<?p " . BML::ml('.intro.code', { aopts => 
"href='$LJ::SITEROOT/manage/invitecodes.bml'" } ) . " p?>";
+        my $unusedinvites = DW::InviteCodes->unused_count( userid => $u->id );
+        $body .= "<?p " . BML::ml('.intro.code2', { aopts => 
"href='$LJ::SITEROOT/manage/invitecodes.bml'" , num => $unusedinvites } ) . " 
p?>";
     } else {
         $body .= "<?p " . BML::ml('.intro', { aopts => "href='$create_link'", 
createlink => $create_link} ) . " p?>";
     }
diff -r bac7c6c365f0 -r 4fd8af6665b0 htdocs/manage/circle/invite.bml.text
--- a/htdocs/manage/circle/invite.bml.text      Fri Jul 31 01:28:04 2009 -0500
+++ b/htdocs/manage/circle/invite.bml.text      Fri Jul 31 11:28:09 2009 -0500
@@ -49,7 +49,11 @@ The [[sitenameshort]] Team
 
 .intro=Use this form as often as you like, or just cut and paste this link and 
send from your own email account: <strong><a 
[[aopts]]>[[createlink]]</a></strong>
 
-.intro.code=Use this form as often as you like, or grab a set of links at once 
from <a [[aopts]]>your complete list of invite codes</a>. Note that invite 
codes which have been sent but not yet redeemed are still counted as unused.
+.intro.code2<<
+You can use this form as often as you'd like. Invite codes that you've sent, 
but haven't been used to create accounts yet, are counted as unused.<br /><br />
+
+You currently have <strong>[[num]]</strong> unused invite codes available. The 
first five are displayed here. For the full list, or to get multiple codes at 
once, see <a [[aopts]]>your complete list of invite codes</a>. 
+.
 
 .msg<<
 [[display_username]] has invited you to join [[sitenameshort]].
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to