if a user has a linked twitter account, give them attribution
This commit is contained in:
parent
04c94e6f19
commit
3f6646d87b
|
@ -163,6 +163,10 @@ class StoriesController < ApplicationController
|
||||||
"apple-touch-icon-144.png",
|
"apple-touch-icon-144.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if @story.user.twitter_username.present?
|
||||||
|
@meta_tags["twitter:creator"] = "@" + @story.user.twitter_username
|
||||||
|
end
|
||||||
|
|
||||||
load_user_votes
|
load_user_votes
|
||||||
|
|
||||||
render :action => "show"
|
render :action => "show"
|
||||||
|
|
|
@ -25,12 +25,18 @@ Time.now - 1.days).order(:id).each_with_index do |s,x|
|
||||||
tags += ' #' + tagging.tag.tag
|
tags += ' #' + tagging.tag.tag
|
||||||
end
|
end
|
||||||
|
|
||||||
tco_status = "\n" +
|
via = ""
|
||||||
|
if s.user.twitter_username.present?
|
||||||
|
via = "\n" + (s.user_is_author? ? "by" : "via") +
|
||||||
|
" @#{s.user.twitter_username}"
|
||||||
|
end
|
||||||
|
|
||||||
|
tco_status = via + "\n" +
|
||||||
(s.url.present?? ("X" * Twitter::TCO_LEN) + "\n" : "") +
|
(s.url.present?? ("X" * Twitter::TCO_LEN) + "\n" : "") +
|
||||||
("X" * Twitter::TCO_LEN) +
|
("X" * Twitter::TCO_LEN) +
|
||||||
tags
|
tags
|
||||||
|
|
||||||
status = "\n" +
|
status = via + "\n" +
|
||||||
(s.url.present?? s.url + "\n" : "") +
|
(s.url.present?? s.url + "\n" : "") +
|
||||||
s.short_id_url +
|
s.short_id_url +
|
||||||
tags
|
tags
|
||||||
|
|
Loading…
Reference in a new issue