一、发帖同步到微博时格式:
发帖时的默认文字所在的代码分析
找到文件source/plugin/qqconnect/connect_feed.php 第77行
$_t_content = lang('plugin/qqconnect', 'connect_feed_iam');
$_t_content .= '#' . cutstr($_G['setting']['bbname'], 20,'') . '#';
$_t_content .= lang('plugin/qqconnect', 'connect_feed_published_thread', array('subject' => cutstr($thread['subject'], 120)));
$_t_content .= cutstr(strip_tags($html_content), 80);
$_t_content .= ' ' . $url;
详解如下$_t_content = lang('plugin/qqconnect', 'connect_feed_iam');
// 'connect_feed_iam' ='我在';修改要到\source\plugin\qqconnect\discuz_plugin_qqconnect.xml134行修改;
$_t_content .= '#' . cutstr($_G['setting']['bbname'], 20,'') . '#';
//#网站名字#;修改要到 后台——》全局——》站点名称修改;
$_t_content .= lang('plugin/qqconnect', 'connect_feed_published_thread', array('subject' => cutstr($thread['subject'], 120)));
// 'connect_feed_published_thread' =发表了, 修改要到\source\plugin\qqconnect\discuz_plugin_qqconnect.xml135行修改; 后面的120是截取的标题的字数,可以根据自己需要设置;
$_t_content .= cutstr(strip_tags($html_content), 80);
//截取的简介内容,可以根据自己需要修改截取的内容简介数;
$_t_content .= ' ' . $url; //$url是网址,后面可以添加自己需要的文字,修改方法是:$_t_content .= ' ' . $url.'你加的文字';
二、回帖同步微博的格式:
回帖同步微博时的默认文字所在的代码分析
找到文件source/plugin/qqconnect/connect_feed.php 第226行
$_t_content = lang('plugin/qqconnect', 'connect_feed_iam'); $_t_content .= '#' . cutstr($_G['setting']['bbname'], 20,'') . '#'; $_t_content .= lang('plugin/qqconnect', 'connect_feed_published_post', array('subject' => cutstr($thread['subject'], 120))); $_t_content .= cutstr(strip_tags($html_content), 80); $_t_content .= ' ' . $url;
详解如下
$_t_content = lang('plugin/qqconnect', 'connect_feed_iam');
// 'connect_feed_iam' ='我在';修改要到\source\plugin\qqconnect\discuz_plugin_qqconnect.xml134行修改;
$_t_content .= '#' . cutstr($_G['setting']['bbname'], 20,'') . '#';
//#网站名字#;修改要到 后台——》全局——》站点名称修改;
$_t_content .= lang('plugin/qqconnect', 'connect_feed_published_post', array('subject' => cutstr($thread['subject'], 120)));
// 'connect_feed_published_thread' =参与了xx的讨论 修改要到\source\plugin\qqconnect\discuz_plugin_qqconnect.xml135行修改; 后面的120是截取的标题的字数,可以根据自己需要设置;
$_t_content .= cutstr(strip_tags($html_content), 80);
//截取的简介内容,可以根据自己需要修改截取的内容简介数;
$_t_content .= ' ' . $url; //$url是网址,后面可以添加自己需要的文字,修改方法是:$_t_content .= ' ' . $url.'你加的文字';
三、分享到腾讯微博的格式:
分享到腾讯微博默认文字对应的代码分析:
找到文件source/plugin/qqconnect/spacecp.inc.php 的75行:$share_message = lang('plugin/qqconnect', 'connect_spacecp_share_a_post', array('bbname' => cutstr($_G['setting']['bbname'], 20,''), 'subject' => cutstr($thread['subject'], 120), 'message' => cutstr(strip_tags(str_replace(' ', ' ', $html_content)), 80)));
$share_message = str_replace(array('\'', "\r\n", "\r", "\n"), array('"', '', '', ''), $share_message);
代码详细分析: |