if a user has a linked twitter account, give them attribution
This commit is contained in:
父節點
04c94e6f19
當前提交
3f6646d87b
|
@ -163,6 +163,10 @@ class StoriesController < ApplicationController
|
|||
"apple-touch-icon-144.png",
|
||||
}
|
||||
|
||||
if @story.user.twitter_username.present?
|
||||
@meta_tags["twitter:creator"] = "@" + @story.user.twitter_username
|
||||
end
|
||||
|
||||
load_user_votes
|
||||
|
||||
render :action => "show"
|
||||
|
|
|
@ -25,12 +25,18 @@ Time.now - 1.days).order(:id).each_with_index do |s,x|
|
|||
tags += ' #' + tagging.tag.tag
|
||||
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" : "") +
|
||||
("X" * Twitter::TCO_LEN) +
|
||||
tags
|
||||
|
||||
status = "\n" +
|
||||
status = via + "\n" +
|
||||
(s.url.present?? s.url + "\n" : "") +
|
||||
s.short_id_url +
|
||||
tags
|
||||
|
|
載入中…
新增問題並參考