Commit 7c4fa34c7cfb2bfa9fecee50cc8b4455f2127635
1 parent
4976fdc6
Exists in
master
#community dashboard - fix twitter profile image
Showing
4 changed files
with
5 additions
and
4 deletions
Show diff stats
controllers/public/community_hub_plugin_public_controller.rb
... | ... | @@ -192,6 +192,7 @@ class CommunityHubPluginPublicController < PublicController |
192 | 192 | if ( message.title == 'hub-message-twitter' ) |
193 | 193 | mediation.source = 'twitter' |
194 | 194 | mediation.author_name = message.name |
195 | + mediation.external_link = message.profile_picture | |
195 | 196 | elsif ( message.title == 'hub-message-facebook' ) |
196 | 197 | mediation.source = 'facebook' |
197 | 198 | mediation.author_name = message.name | ... | ... |
twitter/stream.rb
... | ... | @@ -43,7 +43,7 @@ def listen_twitter_stream(hub, author_id) |
43 | 43 | comment.title = 'hub-message-twitter' |
44 | 44 | comment.source = hub |
45 | 45 | comment.body = UTF8Filter(object.text) |
46 | - comment.profile_picture = UTF8Filter(object.user.profile_image_url) | |
46 | + comment.profile_picture = object.user.profile_image_url.to_s | |
47 | 47 | comment.author_id = author_id |
48 | 48 | comment.name = UTF8Filter(object.user.screen_name) |
49 | 49 | comment.email = 'admin@localhost.local' |
... | ... | @@ -62,4 +62,4 @@ def listen_twitter_stream(hub, author_id) |
62 | 62 | break |
63 | 63 | end |
64 | 64 | end |
65 | -end | |
66 | 65 | \ No newline at end of file |
66 | +end | ... | ... |
views/community_hub_plugin_public/_mediation.rhtml
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | |
8 | 8 | <li class="avatar"> |
9 | 9 | <% if mediation.source == 'twitter' %> |
10 | - <%= image_tag('/plugins/community_hub/icons/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %> | |
10 | + <%= image_tag(mediation.external_link, :alt => "Twitter") %> | |
11 | 11 | <% elsif mediation.source == 'facebook' %> |
12 | 12 | <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> |
13 | 13 | <% else %> | ... | ... |
views/community_hub_plugin_public/_post.rhtml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <li class="time"><%= post_time(post.created_at) %></li> |
6 | 6 | <li class="avatar"> |
7 | 7 | <% if post.title == 'hub-message-twitter' %> |
8 | - <%= image_tag('/plugins/community_hub/icons/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %> | |
8 | + <%= image_tag(post.profile_picture, :alt => "Twitter") %> | |
9 | 9 | <% elsif post.title == 'hub-message-facebook' %> |
10 | 10 | <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> |
11 | 11 | <% else %> | ... | ... |