Whisper sweet nothings to the goldmembers.

This commit is contained in:
Max Goodman
2012-12-07 14:54:53 -08:00
parent 4024dd5e8a
commit 099b6afa6f
3 changed files with 6 additions and 1 deletions

View File

@@ -560,3 +560,4 @@ comment_tree_version_weights = 1:1, 2:0
# markdown message blurbs for the front page sidebar gold ad.
# use **strong** markup for a larger font, and " \n" (<br>) to separate lines.
goldvertisement_blurbs = "Make reddit better. Try %(reddit_gold)." "This year, give the gift of %(reddit_gold)s.|(and you should probably also give some other, better gifts)"
goldvertisement_has_gold_blurbs = "**&ldquo;Exquisite!&rdquo;** \nGrab a drink and join us in [the lounge](/r/lounge)."

View File

@@ -223,6 +223,7 @@ class Globals(object):
],
ConfigValue.messages: [
'goldvertisement_blurbs',
'goldvertisement_has_gold_blurbs',
],
}

View File

@@ -3712,6 +3712,9 @@ class GoldInfoPage(BoringPage):
class Goldvertisement(Templated):
def __init__(self):
Templated.__init__(self)
blurbs = g.live_config["goldvertisement_blurbs"]
if not c.user.gold:
blurbs = g.live_config["goldvertisement_blurbs"]
else:
blurbs = g.live_config["goldvertisement_has_gold_blurbs"]
self.blurb = random.choice(blurbs)