Button 如何在Tumblr主题上设置社交媒体按钮?
尽管我对html并没有太多的了解,但由于在线教程等,我还是设法以我想要的方式为博客安排了一个Tumblr主题 唯一缺少的是我希望我的帖子有几个社交分享按钮 但是我在网上找到的教程不起作用,我相信这是因为这个主题不同,并且已经设置了一些按钮(Tumblr reblog/like/etc) 我有这段代码,是我根据教程创建的,并从deviantart中获取了一些自定义图标Button 如何在Tumblr主题上设置社交媒体按钮?,button,themes,tumblr,Button,Themes,Tumblr,尽管我对html并没有太多的了解,但由于在线教程等,我还是设法以我想要的方式为博客安排了一个Tumblr主题 唯一缺少的是我希望我的帖子有几个社交分享按钮 但是我在网上找到的教程不起作用,我相信这是因为这个主题不同,并且已经设置了一些按钮(Tumblr reblog/like/etc) 我有这段代码,是我根据教程创建的,并从deviantart中获取了一些自定义图标 {block:PermalinkPage}{block:PermalinkPagination} <a target="_n
{block:PermalinkPage}{block:PermalinkPagination}
<a target="_new" href="https://twitter.com/intent/tweet?text={URLEncodedTweetSummary}"><img style="border: 0pt none;" src="http://orig00.deviantart.net/8cf5/f/2016/316/5/8/twitter_icon_by_aquasparkles-dao40yu.png" width="20" height="20" /></a>
<a target="_new" href="https://www.facebook.com/sharer.php?u={Permalink}{block:Title}&t={Title}{/block:Title}"><img style="border: 0pt none;" src="http://orig10.deviantart.net/5fb3/f/2017/103/f/f/facebook_icon_by_aquasparkles-db5mtq8.png" width="20" height="20" /></a>
<a target="_new" href="http://pinterest.com/pin/create/button/?url={Permalink}&media={PhotoURL-500}"><img style="border: 0pt none;" src="http://orig03.deviantart.net/49e0/f/2016/181/3/4/pinterest_icon_by_aquasparkles-da86kds.png"> width="20" height="20" /></a>
{/block:PermalinkPagination}{/block:PermalinkPage}
{block:PermalinkPage}{block:PermalinkPagination}
{/block:PermalinkPagination}{/block:PermalinkPage}
但是像网站建议的那样把它放在{block:Posts}的前面或末尾似乎不起作用
所以我不知道该怎么办。理想情况下,如果它们可以出现在每个帖子主题中其他按钮的后面或后面,那就太好了,但我不知道它们在代码中的位置。如果这太复杂了,即使只是出现在每个帖子下面也足够了
我正在使用的主题。Tumblr页面。Tumblr-从索引页面创建信息共享。
当从索引页发出共享请求时,Tumblr缺少相关的模板标记
目前有变量{PostTitle}
和{PostSummary}
,但这些变量仅在Permalink页面上呈现
目标
目标是复制Tumblr为Facebook OGmeta
标签创建的信息(在permalink页面上呈现)。虽然可以在索引页面上生成正确的OG标记,但这只提供对Facebook的支持,因此其他网络仍然需要填充
崩溃
对于每种帖子类型,如果可能,我们应该生成并包括以下{post}
信息:
{Plaintext}
和{URLEncoded}
创建字符串
Afaik这涵盖了所有的帖子类型。尽管如此,这并不是一个完整的解决方案。由于嵌入式的性质,有些东西可能会丢失(我在这里看的是视频/音频!)
如果您发现任何问题,我将尽力提供帮助
文后细目:
{block:Title}{PlaintextTitle}{/block:Title}
{URLEncodedPermalink}
{PlaintextBody}
http://assets.tumblr.com/images/og/text_200.png
照片发布分类:
{plaintextitle}
{URLEncodedPermalink}
{block:Caption}{PlaintextCaption}{/block:Caption}
{URLEncodedPhotoURL-250}
Photoset Post细分:
{plaintextitle}
{URLEncodedPermalink}
{block:Caption}{PlaintextCaption}{/block:Caption}
{block:Photos}{urlencodedphotour-250}{/block:Photos}
(*将使用集合中的最后一幅图像)报价后细目:
{PlaintextQuote}
{URLEncodedPermalink}
http://assets.tumblr.com/images/og/quote_200.png
链接栏细目:
{PlaintextName}
{URLEncodedPermalink}
{block:Description}{plaintextsdescription}{/block:Description}
http://assets.tumblr.com/images/og/link_200.png
聊天帖子分类:
{block:Title}{PlaintextTitle}{/block:Title}
{URLEncodedPermalink}
{block:Lines}{block:Label}{plaintextlab}{/block:Label}{PlaintextLine}%0A{/block:Lines}
http://assets.tumblr.com/images/og/link_200.png
音频后期细分:
{block:TrackName}{PlaintextTrackname}{/block:TrackName}{block:Artist}%20-%20{PlaintextArtist}{/block:Artist}
{URLEncodedPermalink}
{block:Caption}{PlaintextCaption}{/block:Caption}
{block:AlbumArt}{URLEncodedAlbumArtURL}{/block:AlbumArt}
视频帖子分类:
{PlaintextName}
{URLEncodedPermalink}
{block:Caption}{PlaintextCaption}{/block:Caption}
{block:VideoThumbnail}{VideoThumbnailURL}{/block:VideoThumbnail}
答覆职位分项数字:
{lang:Asker asked}%3A%0A{PlaintextQuestion}
{URLEncodedPermalink}
{PlaintextAnswer}
http://assets.tumblr.com/images/og/chat_200.png
在这种情况下,“不起作用”是什么意思?你检查过网页的HTML输出了吗?我稍微编辑了一下你的文章,因为它似乎是一个为我做的请求。我们这里有很多初学者,普通读者普遍认为,虽然这里非常欢迎初学者,但志愿者只会提供帮助。它们不是免费劳动力的来源。同样值得一读:答案大体上是否定的,我们希望这里的问题是独立的。对于上下文,只有在有永久链接分页的情况下,才会在永久链接页面上呈现:
{block:PermalinkPage}{block:PermalinkPagination}
谢谢!我已经设法将这些按钮取消
{block:Text}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={block:Title}{PlaintextTitle}{/block:Title}&p[url]={URLEncodedPermalink}&p[images][0]=http://assets.tumblr.com/images/og/text_200.png&p[summary]={PlaintextBody}{/block:Text}
{block:Text}https://twitter.com/intent/tweet?text={block:Title}{PlaintextTitle}%20-%20{/block:Title}&url={URLEncodedPermalink}{/block:Text}
{block:Text}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Text}
{block:Text}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:Title}{PlaintextTitle}{/block:Title}&media=http://assets.tumblr.com/images/og/text_200.png{/block:Text}
{block:Text}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Title}{PlaintextTitle}{/block:Title}{/block:Text}
{block:Photo}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={PlaintextTitle}&p[url]={URLEncodedPermalink}&p[images][0]={URLEncodedPhotoURL-250}&p[summary]={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Photo}
{block:Photo}https://twitter.com/intent/tweet?text={block:Caption}{PlaintextCaption}{/block:Caption}%20-%20&url={URLEncodedPermalink}{/block:Photo}
{block:Photo}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Photo}
{block:Photo}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:Caption}{PlaintextCaption}{/block:Caption}&media={URLEncodedPhotoURL-250}{/block:Photo}
{block:Photo}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Photo}
{block:Photoset}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={PlaintextTitle}&p[url]={URLEncodedPermalink}{block:Photos}&p[images][0]={URLEncodedPhotoURL-250}{/block:Photos}&p[summary]={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Photoset}
{block:Photoset}https://twitter.com/intent/tweet?text={block:Caption}{PlaintextCaption}{/block:Caption}%20-%20&url={URLEncodedPermalink}{/block:Photoset}
{block:Photoset}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Photoset}
{block:Photoset}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:Caption}{PlaintextCaption}{/block:Caption}{block:Photos}&media={URLEncodedPhotoURL-250}{/block:Photos}{/block:Photoset}
{block:Photoset}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Photoset}
{block:Quote}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={PlaintextQuote}&p[url]={URLEncodedPermalink}&p[images][0]=http://assets.tumblr.com/images/og/quote_200.png{/block:Quote}
{block:Quote}https://twitter.com/intent/tweet?text={PlaintextQuote}%20-%20&url={URLEncodedPermalink}{/block:Quote}
{block:Quote}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Quote}
{block:Quote}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={PlaintextQuote}&media=http://assets.tumblr.com/images/og/quote_200.png{/block:Quote}
{block:Quote}http://reddit.com/submit?url={URLEncodedPermalink}&title={PlaintextQuote}{/block:Quote}
{block:Link}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={PlaintextName}&p[url]={URLEncodedPermalink}&p[images][0]=http://assets.tumblr.com/images/og/link_200.png&p[summary]={block:Description}{PlaintextDescription}{/block:Description}{/block:Link}
{block:Link}https://twitter.com/intent/tweet?text={PlaintextName}%20-%20&url={URLEncodedPermalink}{/block:Link}
{block:Link}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Link}
{block:Link}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={PlaintextName}&media=http://assets.tumblr.com/images/og/link_200.png{/block:Link}
{block:Link}http://reddit.com/submit?url={URLEncodedPermalink}&title={PlaintextName}{/block:Link}
{block:Chat}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={block:Title}{PlaintextTitle}{/block:Title}&p[url]={URLEncodedPermalink}&p[images][0]=http://assets.tumblr.com/images/og/chat_200.png&p[summary]={block:Lines}{block:Label}{PlaintextLabel}{/block:Label}{PlaintextLine}%0A{/block:Lines}{/block:Chat}
{block:Chat}https://twitter.com/intent/tweet?text={block:Title}{PlaintextTitle}{/block:Title}%20-%20&url={URLEncodedPermalink}{/block:Chat}
{block:Chat}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Chat}
{block:Chat}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:Title}{PlaintextTitle}{/block:Title}&media=http://assets.tumblr.com/images/og/chat_200.png{/block:Chat}
{block:Chat}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Title}{PlaintextTitle}{/block:Title}{/block:Chat}
{block:Audio}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={block:TrackName}{PlaintextTrackname}{/block:TrackName}{block:Artist}%20-%20{PlaintextArtist}{/block:Artist}&p[url]={URLEncodedPermalink}&p[images][0]={block:AlbumArt}{URLEncodedAlbumArtURL}{/block:AlbumArt}&p[summary]={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Audio}
{block:Audio}https://twitter.com/intent/tweet?text={block:TrackName}{PlaintextTrackname}{/block:TrackName}{block:Artist}%20-%20{PlaintextArtist}{/block:Artist}%20%3A%20&url={URLEncodedPermalink}{/block:Audio}
{block:Audio}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Audio}
{block:Audio}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:TrackName}{PlaintextTrackname}{/block:TrackName}{block:Artist}%20-%20{PlaintextArtist}{/block:Artist}&media={block:AlbumArt}{URLEncodedAlbumArtURL}{/block:AlbumArt}{/block:Audio}
{block:Audio}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:TrackName}{PlaintextTrackname}{/block:TrackName}{block:Artist}%20-%20{PlaintextArtist}{/block:Artist}{/block:Audio}
{block:Video}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={PlaintextName}&p[url]={URLEncodedPermalink}&p[images][0]={block:VideoThumbnail}{VideoThumbnailURL}{/block:VideoThumbnail}&p[summary]={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Video}
{block:Video}https://twitter.com/intent/tweet?text={block:Caption}{PlaintextCaption}{/block:Caption}%20-%20&url={URLEncodedPermalink}{/block:Video}
{block:Video}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Video}
{block:Video}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={block:Caption}{PlaintextCaption}{/block:Caption}&media={block:VideoThumbnail}{VideoThumbnailURL}{/block:VideoThumbnail}{/block:Video}
{block:Video}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Video}
{block:Answer}http://www.facebook.com/sharer/sharer.php?s=100&p[title]={lang:Asker asked}:{PlaintextQuestion}&p[url]={URLEncodedPermalink}&p[images][0]=http://assets.tumblr.com/images/og/chat_200.png&p[summary]={PlaintextAnswer}{/block:Answer}
{block:Answer}https://twitter.com/intent/tweet?text={lang:Asker asked}%3A%0A{PlaintextQuestion}%20-%20&url={URLEncodedPermalink}{/block:Answer}
{block:Answer}https://plus.google.com/share?url={URLEncodedPermalink}{/block:Answer}
{block:Answer}http://pinterest.com/pin/create/button/?url={URLEncodedPermalink}&description={lang:Asker asked}%3A%0A{PlaintextQuestion}&media=http://assets.tumblr.com/images/og/chat_200.png{/block:Answer}
{block:Answer}http://reddit.com/submit?url={URLEncodedPermalink}&title={block:Caption}{PlaintextCaption}{/block:Caption}{/block:Answer}