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