genous 2006-1-17 16:04
Mambo/Joomla与SMF1.1.rc2论坛整合专题带圖安裝教程.及常見問題整理
Mambo/Joomla 与 SMF论坛 整合教程.......
这个桥接程序的闪亮之点:
1、在于它非常实用——包括SMF论坛如果原来有注册用户,你完全不用管它,等桥接完成之后,只要用户一登陆,系统会自动把该用户的注册信息添加到曼波里——而且可以是中文!!(曼波本身用不能以中文名来注册的)
2、曼波文章非常容易引入到SMF中进行讨论,同时也非常容易返回曼波
--------------------------------------------------------
楼2-3:安装教程带图.
--------------------------------------------------------
楼3:升级相关代码.
--------------------------------------------------------
楼5:桥接常见问题整理.
--------------------------------------------------------
基本实现MAMBO/Joomla 与 SMF 整合.主要还是靠Bridge Mambo, Joomla SMF 1.1.2.zip组建桥接.
OK~
先SAY SAY 這個可是...比DZ簡單多暸....
基本上 隻要 能正常運行MAMBO 跟SMF的就 ok暸..................
具體環境參數數據我就懶得寫暸.....
因為[color=Green]實踐是檢驗真理的唯一標準[/color]..所以妳們隻要能夠成功安裝mambo跟smf的就是符閤的暸...
==========================================================
所需文件如下:
==========================================================
MAMBO下載
[url]http://www.mambochina.net/option,com_remository/Itemid,31/func,select/id_2.html[/url]
SMF下載主意版本號為 SMF 1.1.rc2 install
[url]http://www.simplemachines.org/download/[/url]
JOOMLA下載
[url]http://www.joomla.org[/url]
[attach]1493[/attach]
[attach]1494[/attach]
==========================================================
==========================================================
因為是作為com_smf /////道理上所有版本的 MAMBO / JOOMLA 通殺...
[[i] 本帖最后由 genous 于 2006-2-15 20:18 编辑 [/i]]
genous 2006-1-17 16:05
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
在桥接开始之前
请确定你已经正常安装运行 MAMBO 和 SMF。注意: SMF 不是一个组件(component) , 它是一个单独的论坛。 桥接将会整合你的 SMF 和 MAMBO。请不要删除 SMF-论坛 的任何版权。
另外注意在桥接前备份好你的数据库和文件,最好先在本地安装测试成功后再上传!
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
主題步驟:
01. 同一個數據庫成功安裝運行mambo/joomla 和 smf.
02. mambo/joomla后臺安裝com_smf.
03. 配置好com_smf
04. 脩改糢闆文件添加必要參數.
05. 取消髮佈默認登陸糢塊.
06. 完成安裝
懶得說暸看圖吧...
...
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
Installing the SMF-Forum Component in Mambo
Install com_smf.zip as a Mambo component, and change the values in the configuration via the Mambo backend. Please use the absolute path. There is a lot of confusion surrounding relative paths. You are best to use the absolute path. If somehow your absolute path is not detected correctly, enter your SMF admin panel, click Edit Server Settings and copy the path you'll find under SMF Directory.
There are two formats to display your Mambo/Forum integration:
» Wrapped
You are using SMF through the Mambo bridge. The Forum appears "wrapped" in the Mambo tables. You might have to make some necessery changes in your forum files in order to show a fitting lay-out.
» Unwrapped
You are still using SMF through Mambo, but it doesn't have the look of a wrapped forum. It looks stand-alone, but it is actually loading through Mambo. This is set in the Mambo config for the component.
There are two options for the user registration form: Bridge and SMF. The bridge registration form looks very much like the default Mambo registration, but functions quite differently. If you choose to use this option, make sure to configure the registration component as well. Both registration types will register new users into both Mambo and SMF.
Also make sure to configure your login module. Set the params to your liking, and make sure to click Save at the top of the page.
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
[attach]1487[/attach]
[attach]1488[/attach]
[attach]1489[/attach]
[attach]1490[/attach]
[[i] 本帖最后由 genous 于 2006-2-15 20:18 编辑 [/i]]
genous 2006-1-17 16:05
占位置
脩改MAMBO/JOOMLA糢闆文件.
01.打開目前所使用的糢闆文件.在<head> 和 </head>之間插入一下代碼
[code]<?php
global $sc, $context, $settings;
if (!defined('SMF')){
require ("administrator/components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
}
$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
mysql_select_db($mosConfig_db);
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?beta4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_session_id = "', $context['session_id'], '";
// ]]></script>';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
?>[/code]
以下為原文...
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
Mambo/Joomla template changes
The changes to the Mambo/Joomla template are still required for this version of the bridge. Copy the code below, and paste it into the header area (between the <head> and </head> tags) of your Mambo/Joomla template.
[code]<?php
global $sc, $context, $settings;
if (!defined('SMF')){
require ("administrator/components/com_smf/config.smf.php");
require ($smf_path."/SSI.php");
}
$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];
mysql_select_db($mosConfig_db);
echo '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?beta4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_session_id = "', $context['session_id'], '";
// ]]></script>';
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="', $scripturl, '?action=help" target="_blank" />
<link rel="search" href="' . $scripturl . '?action=search" />
<link rel="contents" href="', $scripturl, '" />';
?>[/code]
You will also need to make sure to add the next line just below the </body> (the closing body tag at the bottom) tag of the template.
[code]<?php mysql_select_db($GLOBALS['db_name']); ?> [/code]
--------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------
[[i] 本帖最后由 genous 于 2006-2-10 20:35 编辑 [/i]]
genous 2006-1-17 16:05
占位置
安裝並測試成功....
:handshake
[[i] 本帖最后由 genous 于 2006-2-10 20:51 编辑 [/i]]
genous 2006-1-17 16:06
占位置
[[i] 本帖最后由 genous 于 2006-2-10 20:55 编辑 [/i]]
genous 2006-1-18 22:46
Profile.template.php
[code] echo '
</table>
</td>
<td width="100%" valign="top">';
}
// If no areas exist just open up a containing table.[/code]
[code]
echo '
</table>
</td><td> </td>
<td width="100%" valign="top">';
}
// If no areas exist just open up a containing table.[/code]
签名。。。。美化。。。。
Display.template.php
find~code~
[code]', $message['member']['signature'], '[/code]
編輯這個位置就ok暸
~
[[i] 本帖最后由 genous 于 2006-1-20 09:37 编辑 [/i]]
genous 2006-1-19 11:07
QQ~
qq10_smf11[1][1].tar.gz 已不適用....
so必須手動添加.
-------
01. 登陸數據庫 ............打開 members 錶 在location后麵 添加 `QQ` 字列 參數為: TINYTEXT / NOT NULL
02.參攷以下代碼脩改.....註意取捨
[code]<id>
QQ Instant Messenger
</id>
<version>
1.1
</version>
<mod info>
Adds QQ to poster info, pm sender info, profile, and member list.
</mod info>
<author>
Ho Yiu Yeung, Sheepy
</author>
<homepage>
www.anetcity.com
</homepage>
<edit file>
$sourcedir/Load.php
</edit file>
<search for>
mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
</search for>
<add before>
mem.QQ,
</add before>
<search for>
'icq' => $profile['ICQ'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
</search for>
<add before>
'qq' => $profile['QQ'] != '' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => &$profile['QQ'],
'href' => 'http://wpa.qq.com/msgrd?V=1&Site=im.qq.com&Menu=yes&Uin=' . $profile['QQ'],
'link' => '<a href="http://wpa.qq.com/msgrd?V=1&Site=im.qq.com&Menu=yes&Uin=' . $profile['QQ'] . '" target="_blank"><img src="http://wpa.qq.com/pa?p=1:' . $profile['QQ'] . ':4" alt="' . $profile['QQ'] . '" border="0" /></a>',
'link_text' => '<a href="http://wpa.qq.com/msgrd?V=1&Site=im.qq.com&Menu=yes&Uin=' . $profile['QQ'] . '" target="_blank">' . $profile['QQ'] . '</a>',
) : array('name' => '', 'add' => '', 'href' => '', 'link' => '', 'link_text' => ''),
</add before>
<edit file>
$sourcedir/ManageMembers.php
</edit file>
<search for>
'db_fields' => array('ICQ', 'AIM', 'YIM', 'MSN'),
</search for>
<replace>
'db_fields' => array('QQ', 'ICQ', 'AIM', 'YIM', 'MSN'),
</replace>
<edit file>
$sourcedir/Memberlist.php
</edit file>
<search for>
'ICQ' => array(
'label' => $txt[513],
</search for>
<add before>
'QQ' => array(
'label' => $txt['qq'],
'width' => '25'
),
</add before>
<search for>
'ICQ' => array(
'down' => 'LENGTH(mem.ICQ) > 0 DESC, ISNULL(mem.ICQ) OR mem.ICQ = 0 ASC, mem.ICQ ASC',
</search for>
<add before>
'QQ' => array(
'down' => 'LENGTH(mem.QQ) > 0 DESC, ISNULL(mem.QQ) OR mem.QQ = 0 ASC, mem.QQ ASC',
'up' => 'LENGTH(mem.QQ) > 0 ASC, ISNULL(mem.QQ) OR mem.QQ = 0 DESC, mem.QQ DESC'
),
</add before>
<search for>
mem.ID_GROUP, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.emailAddress,
</search for>
<add after>
mem.QQ,
</add after>
<search for>
$fields += array(3 => 'MSN', 'AIM', 'ICQ', 'YIM');
</search for>
<replace>
$fields += array(3 => 'MSN', 'AIM', 'QQ', 'ICQ', 'YIM');
</replace>
<search for>
memberName, realName, websiteTitle, websiteUrl, posts, mem.ID_GROUP, ICQ, AIM, YIM, MSN, emailAddress,
</search for>
<add after>
QQ,
</add after>
<search for>
$row['ICQ'] = '';
</search for>
<add before>
$row['QQ'] = '';
</add before>
<search for>
'icq' => array(
'name' => $row['ICQ'],
</search for>
<add before>
'qq' => array(
'name' => $row['QQ'],
'href' => !empty($row['QQ']) ? 'http://wpa.qq.com/msgrd?V=1&Site=im.qq.com&Menu=yes&Uin=' . $row['QQ'] : '',
'link' => !empty($row['QQ']) ? '<a href="http://wpa.qq.com/msgrd?V=1&Site=im.qq.com&Menu=yes&Uin=' . $row['QQ'] . '" target="_blank"><img src="http://wpa.qq.com/pa?p=1:' . $row['QQ'] . ':4" alt="' . $row['QQ'] . '" border="0" /></a>' : '',
),
</add before>
<edit file>
$sourcedir/News.php
</edit file>
<search for>
if (!empty($profile['icq']['name']))
</search for>
<add before>
if (!empty($profile['qq']['name']))
$data['qq'] = $profile['qq']['name'];
</add before>
<edit file>
$sourcedir/Profile.php
</edit file>
<search for>
$profile_ints = array(
</search for>
<add after>
'QQ',
</add after>
<search for>
if (isset($profile_vars['ICQ']) && $profile_vars['ICQ'] == '0')
</search for>
<add before>
if (isset($profile_vars['QQ']) && $profile_vars['QQ'] == '0')
$profile_vars['QQ'] = '\'\'';
</add before>
<search for>
'icq' => array('name' => !isset($user_profile[$memID]['ICQ']) ? '' : $user_profile[$memID]['ICQ']),
</search for>
<add before>
'qq' => array('name' => !isset($user_profile[$memID]['QQ']) ? '' : $user_profile[$memID]['QQ']),
</add before>
<search for>
'icq' => array(
'name' => !isset($_POST['icq']) ? '' : stripslashes($_POST['ICQ'])
</search for>
<add before>
'qq' => array(
'name' => !isset($_POST['qq']) ? '' : stripslashes($_POST['QQ'])
),
</add before>
<edit file>
$sourcedir/Register.php
</edit file>
<search for>
'ICQ', 'AIM', 'YIM', 'MSN',
</search for>
<add before>
'QQ',
</add before>
<edit file>
$themedir/Display.template.php
</edit file>
<search for>
', $message['member']['icq']['link'], '
</search for>
<add before>
', $message['member']['qq']['link'], '
</add before>
<edit file>
$themedir/InstantMessage.template.php
</edit file>
<search for>
', $message['member']['icq']['link'], '
</search for>
<add before>
', $message['member']['qq']['link'], '
</add before>
<edit file>
$themedir/Memberlist.template.php
</edit file>
<search for>
<td colspan="12">
</search for>
<replace>
<td colspan="13">
</replace>
<search for>
<td colspan="12" class="catbg">';
</search for>
<replace>
<td colspan="13" class="catbg">';
</replace>
<search for>
<td class="windowbg2">', $member['icq']['link'], '</td>
</search for>
<add before>
<td class="windowbg2">', $member['qq']['link'], '</td>
</add before>
<search for>
<td colspan="12" class="windowbg">', $txt[170], '</td>
</search for>
<replace>
<td colspan="13" class="windowbg">', $txt[170], '</td>
</replace>
<search for>
<td class="catbg" colspan="12">', $txt[139], ': ', $context['page_index'], '</td>
</search for>
<replace>
<td class="catbg" colspan="13">', $txt[139], ': ', $context['page_index'], '</td>
</replace>
<edit file>
$themedir/Profile.template.php
</edit file>
<search for>
</tr><tr>
<td><b>', $txt[513], ':</b></td>
</search for>
<add before>
</tr><tr>
<td><b>', $txt['qq'], ':</b></td>
<td>', $context['member']['qq']['link_text'], '</td>
</add before>
<search for>
<tr>
<td width="40%"><b>', $txt[513], ': </b><div class="smalltext">', $txt[600], '</div></td>
</search for>
<add before>
<tr>
<td width="40%"><b>', $txt['qq'], ': </b><div class="smalltext"> </div></td>
<td><input type="text" name="QQ" size="24" value="', $context['member']['qq']['name'], '" /></td>
</tr>
</add before>
<edit file>
$themedir/Who.template.php
</edit file>
<search for>
', $member['icq']['link'], ' ', $member['msn']['link'], ' ', $member['yim']['link'], ' ', $member['aim']['link'], '
</search for>
<add before>
', $member['qq']['link'],
</add before>
<edit file>
$themedir/languages/index.chinese-simplified-utf8.php
</edit file>
<search for>
?>
</search for>
<add before>
$txt['qq'] = 'QQ';
</add before>
<edit file>
$themedir/languages/index.chinese-simplified.php
</edit file>
<search for>
?>
</search for>
<add before>
$txt['qq'] = 'QQ';
</add before>
<edit file>
$themedir/languages/index.chinese-traditional-utf8.php
</edit file>
<search for>
?>
</search for>
<add before>
$txt['qq'] = 'QQ';
</add before>
<edit file>
$themedir/languages/index.english.php
</edit file>
<search for>
?>
</search for>
<add before>
$txt['qq'] = 'QQ';
</add before>
<edit file>
$themedir/languages/Profile.english.php
</edit file>
<search for>
?>
</search for>
<add before>
$txt['qq_input'] = 'This is your QQ number.';
</add before>
[/code]
會員列錶間隔...在糢闆文件中的會員列錶頁麵脩改.
[[i] 本帖最后由 genous 于 2006-1-20 09:35 编辑 [/i]]
genous 2006-1-19 16:38
:hug:
[[i] 本帖最后由 genous 于 2006-1-20 09:45 编辑 [/i]]
genous 2006-2-10 21:22
哈哈.............補充完成暸.................大傢來評分呀..............
genous 2006-3-25 10:54
[url]http://www.simplemachines.org/community/index.php?board=77.0[/url]
blueilove 2006-4-11 16:27
好贴!
blueilove 2006-4-11 22:17
为何我装了他的显示最新帖模块后怎么点击进入一个空白页面,而不是直接转入论坛阿?
hassion 2006-6-1 00:15
我安装mambo-smf桥成功了,不过发现没法发贴:发贴内容都是“0”,预览时也一样。如果不通过mambo,直接进入论坛是可以正常发贴的。请问有没有人遇上过这样的问题,该如何解决呢。谢谢了!
qq241115940 2006-8-27 07:12
厉害哦
jack4518 2006-11-2 20:48
我的是Mambo4.5.3,可是安装了还是不行,一点商城就有问题:本来是“已经登陆的”,但一到商城就显示登陆框,没有登陆,还有,在SMF中登陆,在Mambo里无法显示用户菜单!!请高手帮忙解决!小弟在些感激不尽!
wision23 2007-4-23 18:20
我按照教程来做,出现错误提示:
请不要直接读写 SSI.php; 您可以用路径 ('SSI.php') 或加入 ?ssi_function=something.
怎么解决呢?谢谢