管理員
積分信息:
威望:6005
金錢:9076056
貢獻:6116
儲蓄:2146643647
|
發表於 2015-12-18 07:56:42
|
顯示全部樓層
手機模版裏這個footer.htm
新模版要修改
footer.htm及hearder.common.htm<<如果新的模組中有修改到這二項必定要改如何改請看
打開template\新的模組\common\footer.htm
找
上面加上
- <div id="fb-root"></div>
- <script type="text/javascript">
- window.fbAsyncInit = function() {
- FB.init({appId:'$_G[cache][plugin][facebook_connect][appid]',channelURL:'{$_G[siteurl]}channel.html',status:true,cookie:true,oauth:true,xfbml:true});
- <!--{if $_G[tid]}-->
- <!--{if $_G['like'] == 'no'}-->
- FB.Event.subscribe('edge.create', function() {
- location.replace('forum.php?mod=viewthread&tid={$_G[tid]}&page={$_G}&todo=like');
- });
- <!--{if $_G['fbc'] && $_G['cache']['plugin']['facebook_ltv']['fctv']}-->
- FB.Event.subscribe('comment.create', function() {
- location.replace('forum.php?mod=viewthread&tid={$_G[tid]}&page={$_G}&todo=fcomm');
- });
- <!--{/if}-->
- <!--{/if}-->
- FB.Event.subscribe('edge.remove', function() {
- fbshare();
- });
- <!--{if $_G['like'] && $_G['fbc'] && $_G['cache']['plugin']['facebook_ltv']['fctv']}-->
- FB.Event.subscribe('comment.remove', function() {
- location.replace('forum.php?mod=viewthread&tid={$_G[tid]}&page={$_G}&todo=unfcomm');
- });
- <!--{/if}-->
- <!--{/if}-->
- };
- (function() {
- var e = document.createElement('script');
- e.src = document.location.protocol + '//connect.facebook.net/zh_TW/all.js';
- e.async = true;
- document.getElementById('fb-root').appendChild(e);
- }());
- <!--{if $_G[tid]}-->
- function fbshare() {
- FB.ui({
- method: 'feed',
- app_id: '$_G['cache']['plugin']['facebook_connect']['appid']',
- name: '$_G[forum_thread][subject]',
- <!--{if in_array('forum_viewthread', $_G['setting']['rewritestatus'])}-->
- link: '$_G[siteurl]thread-{$_G[tid]}-1-1.html',
- <!--{else}-->
- link: '$_G[siteurl]forum.php?mod=viewthread&tid=$_G[tid]',
- <!--{/if}-->
- <!--{if $iattrs}-->
- picture: '$iattrs',
- <!--{/if}-->
- caption: '$_G['setting']['bbname']',
- description: '{if !empty($metadescription)}{echo htmlspecialchars($metadescription)}{/if}',
- message: ''
- }, function(response) {
- <!--{if $_G['like']}-->
- if (response && response.post_id) {
- location.replace('forum.php?mod=viewthread&tid={$_G[tid]}&page={$_G}&todo=unlike');
- } else {
- location.replace('forum.php?mod=viewthread&tid={$_G[tid]}&page={$_G}&todo=unlike');
- }
- <!--{/if}-->
- });
- }
- function fbsend() {
- FB.ui({
- method: 'send',
- app_id: '$_G['cache']['plugin']['facebook_connect']['appid']',
- name: '$_G[forum_thread][subject]',
- <!--{if in_array('forum_viewthread', $_G['setting']['rewritestatus'])}-->
- link: '$_G[siteurl]thread-{$_G[tid]}-1-1.html',
- <!--{else}-->
- link: '$_G[siteurl]forum.php?mod=viewthread&tid=$_G[tid]',
- <!--{/if}-->
- <!--{if $iattrs}-->
- picture: '$iattrs',
- <!--{/if}-->
- description: '{if !empty($metadescription)}{echo htmlspecialchars($metadescription)}{/if}'
- });
- }
- function fbinvite() {
- FB.ui({
- method: 'apprequests',
- app_id: '$_G['cache']['plugin']['facebook_connect']['appid']',
- message: '我在 [ {$_G[setting][bbname]} ] 加入會員了!誠摯邀請您一同加入',
- filters: "['app_non_users']",
- title: '邀請朋友加入'
- });
- }
- <!--{/if}-->
- function fblogin() {
- FB.login(function(response) {
- if (response.authResponse) {
- location.replace('fblogin.php?act=logging&rf='+urlencode(location.href));
- } else {
- location.replace('index.php');
- }
- }, <span style="line-height: 1.5;">{scope:' email,user_likes,publish_actions '});</span>
- }
- function urlencode(str) {
- var output = '', x = 0, regex = /(^[a-zA-Z0-9_.]*)/;
- str = str.toString();
- while (x < str.length) {
- var match = regex.exec(str.substr(x));
- if (match != null && match.length > 1 && match[1] != '') {
- output += match[1];
- x += match[1].length;
- } else {
- if (str[x] == ' ') {
- output += '+';
- } else {
- var charCode = str.charCodeAt(x), hexVal = charCode.toString(16);
- output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
- }
- x++;
- }
- }
- return output;
- }
- </script>
複製代碼
3.同一路逕header_common.htm
找
- <html xmlns="http://www.w3.org/1999/xhtml">
複製代碼
替換成
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml" xmlns:discuz="http://www.discuz.net/ns#">
複製代碼
找
- <meta http-equiv="MSThemeCompatible" content="Yes" />
複製代碼
下面加上
- <!--{if $_G[tid]}-->
- <meta property="og:type" content="discuz:thread"/>
- <meta property="og:site_name" content="$_G['setting']['bbname']"/>
- <!--{if in_array('forum_viewthread', $_G['setting']['rewritestatus'])}-->
- <meta property="og:url" content="$_G[siteurl]thread-{$_G[tid]}-1-1.html"/>
- <!--{else}-->
- <meta property="og:url" content="$_G[siteurl]forum.php?mod=viewthread&tid=$_G[tid]"/>
- <!--{/if}-->
- <meta property="og:title" content="$_G[forum_thread][subject] - $_G['setting']['bbname']"/>
- <meta property="og:description" content="{if !empty($metadescription)}{echo htmlspecialchars($metadescription)}{/if}"/>
- <!--{if $iattrs}-->
- <meta property="og:image" content="$iattrs"/>
- <!--{/if}-->
- <meta property="fb:app_id" content="$_G['cache']['plugin']['facebook_connect']['appid']"/>
- <!--{/if}-->
複製代碼
更新緩存即可
4.如果新的模組沒有修改header_common.htm此項用原本默認即可(大部份都不會修改此項)
5.還有一個新模版有相同login_simple.htm
適當位置放上
- <td class="fastlg_l" rowspan="2"><a href="javascript:;"><img src="static/image/facebook_iconb.png"></a></td>
複製代碼
複製代碼
|
|