哈克:XOOPS社会媒体快速教程
作者: aberdeenman于2012/3/3 11:07:13 阅读量:10314首先,非常欢迎您使用这些内容,我大部分的工作是从自己的错误调试过程拼凑而成的。我在我的新闻网站 http://kbkw.com 上使用了这里的所有内容。我想我已经包括了所有内容,但如果您有疑问,请随时联系我。这可以看作是这篇文章的延续 https://xoops.org.cn/modules/news/article.php?storyid=6044 SEO 我在我的模板中添加了以下内容到我的元标签(在元标签中)
<meta property="og:type" content="article"/>
<meta property="og:locale" content="en_US" />
<meta property="og:image" content="<{$xoops_url}>/YOUR LOGO.png" />
<meta property="og:site_name" content="<{$xoops_sitename}>"/>
<meta property="fb:admins" content="FB ADMINS FOR THE SITE"/>
<{if $story.hits !=' '}>
<meta name="description" content="<{$story.news_title|strip_tags:false}> : <{$story.text|strip_tags:false|truncate:120:"..."}>" />
<meta property="og:description" content="<{$story.text|strip_tags:false|truncate:120:"..."}>" />
<meta property="og:title" content="<{$story.news_title|strip_tags:false|truncate:120:"..."}>"/>
<meta property="og:url" content="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" />
<{elseif $addinfo != ''}>
<meta name="description" content="<{$addinfo|strip_tags:true|truncate:220:"..."}>" />
<meta property="og:description" content="<{$addinfo|strip_tags:true|truncate:220:"..."}>" />
<meta property="og:title" content="<{$title}>"/>
<meta property="og:url" content="<{$xoops_url}>/modules/debaser/singlefile.php?id=<{$id}>" />
<{if $articlePicture != ''}>
<meta property="og:image" content="<{$articlePicture}>" />
<{/if}>
<{else}>
<meta name="description" content="<{$xoops_pagetitle}>, <{$xoops_meta_description}>" />
<meta property="og:title" content="<{$xoops_pagetitle}>"/>
<{/if}>
<meta name="keywords" content="<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" />
<{if $story.topic_title|strip_tags:false == "Local News"}>
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>">a>
<a class="addthis_button_tweet" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>">a>
<a class="addthis_button_google_plusone" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>" g:plusone:size="medium">a>
<{if $articlePicture != ''}>
<a href="http://pinterest.com/pin/create/button/?url=<{$xoops_url}>/modules/news/article.php?storyid%3D<{$story.id}>&media=<{$articlePicture}>&description=<{$story.news_title|strip_tags:false}> - <{$story.text|strip_tags:false|truncate:320:"..."}>" class="pin-it-button" count-layout="horizontal">Pin Ita>
<{else}>
<a href="http://pinterest.com/pin/create/button/?url=<{$xoops_url}>/modules/news/article.php?storyid%3D<{$story.id}>&media=<{$xoops_url}>/logo.png&description=<{$story.news_title|strip_tags:false}> - <{$story.text|strip_tags:true|truncate:320:"..."}>" class="pin-it-button" count-layout="horizontal">Pin Ita>
<{/if}>
<a class="addthis_counter addthis_pill_style" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>">a>
div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=YOUR PUB ID" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>">script>
<fb:comments ? numposts="15" <div class="fb-comments" data-href="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>">fb:comments>