diff --git a/swizzler.py b/swizzler.py index d82be05..4629c75 100644 --- a/swizzler.py +++ b/swizzler.py @@ -84,7 +84,7 @@ class SwizzlerApp(object): @cherrypy.expose def user(self,username='nobody'): if username=='nobody': - raise cherrypy.HTTPRedirect('/') # sponsored posts are nobody's profile + raise cherrypy.HTTPRedirect('/') # promoted posts are nobody's profile conf = cherrypy.request.app.config['swizzler'] twister = Twister(conf['rpc_url'],format_twist) user = twister.get_user_info(username) @@ -117,7 +117,7 @@ class SwizzlerApp(object): tag = tag.strip().split(' ')[0] if tag.startswith('#'): tag = tag[1:] if not tag: - raise cherrypy.HTTPRedirect('/') # go home to sponsored posts + raise cherrypy.HTTPRedirect('/') # go home to promoted posts conf = cherrypy.request.app.config['swizzler'] twister = Twister(conf['rpc_url'],format_twist) messages = twister.get_tag_posts(tag) @@ -135,7 +135,7 @@ class SwizzlerApp(object): @cherrypy.expose def home(self,localusername='nobody',mode='feed'): if localusername=='nobody': - raise cherrypy.HTTPRedirect('/') # sponsored posts are nobody's home + raise cherrypy.HTTPRedirect('/') # promoted posts are nobody's home conf = cherrypy.request.app.config['swizzler'] twister = Twister(conf['rpc_url'],format_twist) menu = twister.local_user_menu(localusername) @@ -181,21 +181,21 @@ class SwizzlerApp(object): def index(self): conf = cherrypy.request.app.config['swizzler'] twister = Twister(conf['rpc_url'],format_twist) - messages = twister.get_sponsored_posts(conf['num_messages']) + messages = twister.get_promoted_posts(conf['num_messages']) result = { 'is_user':True, # i.e. we want to display "bio" and not mentions/DMs/profile buttons - 'is_sponsored':True, # message template needs to know not to show "permalink" + 'is_promoted':True, # message template needs to know not to show "permalink" 'title':"Welcome to Swizzler", 'local_users':twister.local_user_menu('')['users'], # '' means: "Nobody" is active 'info':twister.get_info(), - 'subject':{ # pseudo-user describing sponsored posts - 'fullname':'Sponsored posts', + 'subject':{ # pseudo-user describing promoted posts + 'fullname':'Promoted posts', 'bio':format_twist(""" Mining the twister blockchain protects the #twister-verse from attacks like http://twister.net.co/?p=236 but unlike doge, we don't have shiny coins to offer "our protectors". -Instead, they enjoy occasional minutes of fame in the form of the sponsored posts you see here. +Instead, they enjoy occasional minutes of fame in the form of the promoted posts you see here. We #Respect their hard earned crypto-graffiti by appreciating them on coffee/spliff/soy-milk/etc. breaks, because that's how we roll yo. -Start mining today, and all this (AND moral satisfaction) can be yours.""") +Start mining today, and this (𝐚𝐧𝐝 moral satisfaction) can be yours.""") }, 'messages':messages, 'any_messages':not not messages, diff --git a/templates/message.html b/templates/message.html index 43abed4..2bf57f7 100644 --- a/templates/message.html +++ b/templates/message.html @@ -8,8 +8,8 @@
{{^is_messages}} - {{^is_sponsored}}{{/is_sponsored}}{{time}}{{^is_sponsored}}{{/is_sponsored}} - {{#is_sponsored}}{{time}}{{/is_sponsored}} + {{^is_promoted}}{{/is_promoted}}{{time}}{{^is_promoted}}{{/is_promoted}} + {{#is_promoted}}{{time}}{{/is_promoted}} {{/is_messages}} {{#is_messages}}{{time}}{{/is_messages}} diff --git a/templates/sidebar.html b/templates/sidebar.html index 95c34f1..9ffcf00 100644 --- a/templates/sidebar.html +++ b/templates/sidebar.html @@ -25,7 +25,7 @@ {{/username}} {{^username}} - (view sponsored posts) + (view promoted posts) {{/username}} @@ -40,7 +40,7 @@ +[An empty field will show promoted posts]"> Tag @@ -59,7 +59,7 @@ Main area will show twists mentioning it. title='Search for "users starting with ..." 𝘄𝗶𝘁𝗵𝗼𝘂𝘁 leaving the current page. Results will appear below. -[Empty field to show trending tags again]'> +[Empty field to switch back to trending tags]'> Userna... diff --git a/templates/standard.html b/templates/standard.html index e13a048..969d203 100644 --- a/templates/standard.html +++ b/templates/standard.html @@ -60,16 +60,16 @@ {{#is_user}}

{{#location}}{{.}}{{/location}} - {{#is_sponsored}} + {{#is_promoted}} - {{/is_sponsored}} - {{^is_sponsored}}{{/is_sponsored}} + {{/is_promoted}} + {{^is_promoted}}{{/is_promoted}} {{fullname}} {{#url}}{{.}}{{/url}}

{{{bio}}} diff --git a/twister.py b/twister.py index ef7784a..d363d37 100644 --- a/twister.py +++ b/twister.py @@ -102,7 +102,7 @@ class Twister: def get_following(self,localusername): return [{"username":u} for u in self.twister.getfollowing(localusername)] @functioncache(60*5,ignore_instance=True) - def get_sponsored_posts(self,num=8): + def get_promoted_posts(self,num=8): return reversed([self._format_post_info(p) for p in self.twister.getspamposts(num)]) # Don't ask me why reversed :) @functioncache(60,ignore_instance=True) def get_tag_posts(self,tag):