@@ -8,9 +8,10 @@ |
|
__Files: ''That need to be created and/or edited.''__
|
*./common.php
|
+*./bit_setup_inc.php ''#Needs to be created!'' |
+*./viewtopic.php |
*./db/mysql.php
|
*./install/install.php
|
-*./bit_setup_inc.php ''#Needs to be created!''
|
*./admin/index.php
|
*./admin/schema_inc.php ''#Needs to be created!''
|
*./includes/page_tail.php
|
|
|
@@ -26,15 +27,18 @@ |
__In ./common.php:__
|
|
''Find:''
|
-{CODE in='php'}$board_config = array();
|
+{code source='php'} |
+$board_config = array(); |
$userdata = array();
|
$theme = array();
|
$images = array();
|
$lang = array();
|
-$gen_simple_header = FALSE;{CODE}
|
+$gen_simple_header = FALSE; |
+{/code} |
|
''Add After:''
|
-{CODE in='php'}// {{{ BIT_MOD
|
+{code source='php'} |
+// {{{ BIT_MOD |
if( file_exists( $phpbb_root_path . 'config.'.$phpEx ) ) {
|
include($phpbb_root_path . 'config.'.$phpEx);
|
}
|
|
|
@@ -47,7 +51,8 @@ |
require_once( $phpbb_root_path.'/../bit_setup_inc.php' );
|
//phpBB is not as clean as bitweaver. errors only
|
error_reporting ( E_ALL & ~E_NOTICE );
|
-// }}} BIT_MOD{CODE}
|
+// }}} BIT_MOD |
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -56,57 +61,64 @@ |
__In ./db/mysql.php:__
|
|
''Find:''
|
-{CODE in='php'}function sql_query($query = "", $transaction = FALSE)
|
+{code source='php'} |
+function sql_query($query = "", $transaction = FALSE) |
{
|
-{CODE}
|
+{/code} |
|
"Add After:
|
|
-{CODE in='php'} // {{{ BIT_MOD
|
+{code source='php'} |
+ // {{{ BIT_MOD |
// This is necessary for the module queries to run if bitweaver and phpBB are running in different DB's
|
$dbselect = mysql_select_db($this->dbname);
|
// }}} BIT_MOD
|
-{CODE}
|
+{/code} |
|
"Find:"
|
-{CODE in='php'} $this->query_result = @mysql_query($query, $this->db_connect_id);
|
-{CODE}
|
+{code source='php'} |
+ $this->query_result = @mysql_query($query, $this->db_connect_id); |
+{/code} |
|
|
"Add After:
|
|
-{CODE in='php'} // {{{ BIT_MOD
|
+{code source='php'} |
+ // {{{ BIT_MOD |
if( $this->dbname != $gBitDbName ) {
|
// This is necessary for the module queries to run if bitweaver and phpBB are running in different DB's
|
$dbselect = mysql_select_db($this->dbname);
|
}
|
// }}} BIT_MOD
|
-{CODE}
|
+{/code} |
|
---
|
|
__In ./install/install.php:__
|
|
''Find:''
|
-{CODE in='php'}// ---------
|
+{code source='php'} |
+// --------- |
// FUNCTIONS
|
-{CODE}
|
+{/code} |
|
''Add Before:''
|
-{CODE in='php'}// {{{ BIT_MOD
|
+{code source='php'} |
+// {{{ BIT_MOD |
// Make sure only bitweaver admins can run the installer
|
require_once( '../../bit_setup_inc.php' );
|
global $gBitSystem;
|
$gBitSystem->verifyPermission( 'bit_p_admin' );
|
// }}} BIT_MOD
|
-{CODE}
|
+{/code} |
|
---
|
|
__Create a new file called ''bit_setup_inc.php'' in your phpBB root folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}<?php
|
+{code source='php'} |
+<?php |
global $gBitSystem;
|
|
$gBitSystem->registerPackage( 'phpBB', dirname( __FILE__ ).'/' );
|
|
|
@@ -116,7 +128,8 @@ |
require_once( PHPBB_PKG_PATH.'config.php' );
|
}
|
}
|
-?>{CODE}
|
+?> |
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -125,17 +138,21 @@ |
__In ./admin/index.php:__
|
|
''Find:''
|
-{CODE in='php'} $db->sql_close();
|
+{code source='php'} |
+ $db->sql_close(); |
exit;
|
|
}
|
|
-?>{CODE}
|
+?> |
+{/code} |
|
''Add __ABOVE__:''
|
-{CODE in='php'}// {{{ BIT_MOD
|
+{code source='php'} |
+// {{{ BIT_MOD |
$template->flush_buffer();
|
-// }}} BIT_MOD{CODE}
|
+// }}} BIT_MOD |
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -144,7 +161,8 @@ |
__Create a new file called ''schema_inc.php'' in your ./admin/ folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}<?php
|
+{code source='php'} |
+<?php |
global $gBitInstaller;
|
$gBitInstaller->registerPackageInfo( PHPBB_PKG_DIR, array(
|
'description' => "phpBB is a high powered, fully scalable, and highly customizable Open Source bulletin board package. phpBB has a user-friendly interface, simple and straightforward administration panel, and helpful FAQ.",
|
|
|
@@ -157,7 +175,8 @@ |
'file' => 'install/install.php'
|
)
|
) );
|
-?>{CODE}
|
+?> |
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -165,17 +184,19 @@ |
|
__In ./includes/page_tail.php:__
|
"Find:" (~lines 45-48 )
|
-{CODE in='php'}//
|
+{code source='php'} |
+// |
//
|
// Close our DB connection.
|
//
|
$db->sql_close();
|
-{CODE}
|
+{/code} |
|
and delete
|
|
''Find:'' (~lines 52-70 )
|
-{CODE in='php'}//
|
+{code source='php'} |
+// |
// Compress buffered output if required and send to browser
|
//
|
if ( $do_gzip_compress )
|
|
|
@@ -197,10 +218,11 @@ |
echo pack('V', $gzip_crc);
|
echo pack('V', $gzip_size);
|
}
|
-{CODE}
|
+{/code} |
|
''Add After:''
|
-{CODE in='php'}// {{{ BIT_MOD
|
+{code source='php'} |
+// {{{ BIT_MOD |
global $gBitPhpBBSubFrame, $gBitSmarty, $gBitSystem, $gBitDbName;
|
// hack around php database driver issues when tiki is a different db from bitweaver
|
// This will only work on some databases anyway !!!!
|
|
|
@@ -217,14 +239,15 @@ |
$db->sql_close();
|
|
// }}} BIT_MOD
|
-{CODE}
|
+{/code} |
|
---
|
|
__In ./includes/sessions.php:__
|
|
''Find:''
|
-{CODE in='php'} if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
|
+{code source='php'} |
+ if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ) |
{
|
$session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : '';
|
$sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array();
|
|
|
@@ -236,48 +259,59 @@ |
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
|
$sessionmethod = SESSION_METHOD_GET;
|
}
|
-{CODE}
|
+{/code} |
|
''Add After:''
|
-{CODE in='php'}// {{{ BIT_MOD
|
+{code source='php'} |
+// {{{ BIT_MOD |
// we always force auto login
|
$sessiondata['autologinid'] = TRUE;
|
-// }}} BIT_MOD{CODE}
|
+// }}} BIT_MOD |
+{/code} |
|
|
''Find:''
|
-{CODE in='php'} //
|
+{code source='php'} |
+ // |
// Did the session exist in the DB?
|
//
|
if ( isset($userdata['user_id']) )
|
- {{CODE}
|
+ { |
+{/code} |
|
''Add After:''
|
-{CODE in='php'} // {{{ BEGIN BIT_MOD
|
+{code source='php'} |
+ // {{{ BEGIN BIT_MOD |
$sessiondata['session_page'] = $thispage_id;
|
check_bit_user( $userdata );
|
- // }}} END BIT_MOD{CODE}
|
+ // }}} END BIT_MOD |
+{/code} |
|
''Find:''
|
-{CODE in='php'} setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
|
+{code source='php'} |
+ setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); |
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
|
}
|
|
return $userdata;
|
}
|
}
|
- }{CODE}
|
+ } |
+{/code} |
|
''Add After:''
|
-{CODE in='php'} // {{{ BEGIN BIT_MOD
|
+{code source='php'} |
+ // {{{ BEGIN BIT_MOD |
// make sure we keep copy a few variables over if we automatically start a new bit_session
|
$sessiondata['session_page'] = $thispage_id;
|
$sessiondata['session_ip'] = $user_ip;
|
check_bit_user( $sessiondata );
|
- // {{{ END BIT_MOD{CODE}
|
+ // {{{ END BIT_MOD |
+{/code} |
|
''Find:''
|
-{CODE in='php'} //
|
+{code source='php'} |
+ // |
// If we reach here then no (valid) session exists. So we'll create a new one,
|
// using the cookie user_id if available to pull basic user prefs.
|
//
|
|
|
@@ -292,10 +326,11 @@ |
|
|
}
|
-{CODE}
|
+{/code} |
|
-''Add After:''
|
-{CODE in='php'}// {{{ BEGIN TIKI MOD
|
+''Add After:'' (i'm afraid we can't use php syntax highlighting as it causes the code plugin to crash) |
+{code source='Html4Strict'} |
+// {{{ BEGIN TIKI MOD |
function check_bit_user( &$p_user_data ) {
|
// We have a valid tiki user, however we do not have a phpBB user
|
global $db, $gBitSystem, $gBitUser, $userlib, $HTTP_GET_VARS;
|
|
|
@@ -375,7 +410,7 @@ |
}
|
}
|
}
|
-{CODE}
|
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -386,14 +421,16 @@ |
Bug fix for phpBB in postgres schemas.
|
|
''Find:''
|
-{code in="php"}
|
+{code source="php"} |
+ |
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([a-z0-9\_\-]+)/is", $this->last_query_text[$query_id], $tablename) )
|
-{code}
|
+{/code} |
|
replace with
|
-{code in="php"}
|
+{code source="php"} |
+ |
if( preg_match("/^INSERT[\t\n ]+INTO[\t\n ]+([-a-z0-9\_\.]+)/is", $this->last_query_text[$query_id], $tablename) )
|
-{code}
|
+{/code} |
|
---
|
|
|
|
@@ -402,14 +439,16 @@ |
Bug fix for mystery function "phpbb_rtrim" which doesn't appear to be defined anywhere.
|
|
''Find:''
|
-{code in="php"}
|
+{code source="php"} |
+ |
$highlight_match = phpbb_rtrim($highlight_match, "\\");
|
-{code}
|
+{/code} |
|
replace with
|
-{code in="php"}
|
+{code source="php"} |
+ |
$highlight_match = rtrim($highlight_match, "\\");
|
-{code}
|
+{/code} |
|
|
---
|
|
|
@@ -417,13 +456,14 @@ |
__Create a new file called ''menu_phpbb.tpl'' in your ./templates/ folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}">{tr}Browse Forums{/tr}</a>
|
+{code source='php'} |
+<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}">{tr}Browse Forums{/tr}</a> |
{if $user}
|
<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}search.php?search_id=newposts">{tr}Posts since last visit{/tr}</a>
|
<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}search.php?search_id=egosearch">{tr}Your posts{/tr}</a>
|
<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}search.php?search_id=unanswered">{tr}Unanswered posts{/tr}</a>
|
{/if}
|
-{CODE}
|
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -432,8 +472,9 @@ |
__Create a new file called ''menu_phpbb_admin.tpl'' in your ./templates/ folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}admin/index.php">{tr}Administer phpBB{/tr}</a>
|
-{CODE}
|
+{code source='php'} |
+<a class="menuoption" href="{$smarty.const.PHPBB_PKG_URL}admin/index.php">{tr}Administer phpBB{/tr}</a> |
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -442,19 +483,22 @@ |
__Create a new file called ''phpbb_mini_search.tpl'' in your ./templates/ folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}<form action="{$smarty.const.PHPBB_PKG_URL}search.php" method="POST">
|
+{code source='php'} |
+<form action="{$smarty.const.PHPBB_PKG_URL}search.php" method="POST"> |
<input type="hidden" name="search_fields" value="all" />
|
|
<input type="text" style="width: 75px" class="post" name="search_keywords" size="30" /> <input class="liteoption" type="submit" value="{tr}Search{/tr}" />
|
|
-<br />
|
+ |
+ |
Match: <input type="radio" name="search_terms" value="any" checked="checked" /> {tr}Any{/tr}
|
<input type="radio" name="search_terms" value="all" />{tr}All{/tr}</span>
|
-<br/>
|
+ |
+ |
|
</form>
|
<a href="{$smarty.const.PHPBB_PKG_URL}search.php" style="font-size:smaller">{tr}More options{/tr}</a>
|
-{CODE}
|
+{/code} |
|
''Save and upload the file.''
|
|
|
|
@@ -463,7 +507,8 @@ |
__Create a new file called ''bit_phpbb.tpl'' in your ./templates/ folder.__
|
|
''Add this into the file:''
|
-{CODE in='php'}{* BIT_MOD - this is a new file*}
|
+{code source='php'} |
+{* BIT_MOD - this is a new file*} |
<div class="phpbb">
|
{php}
|
global $template;
|
|
|
@@ -471,7 +516,7 @@ |
{/php}
|
</div>
|
{* BIT_MOD *}
|
-{CODE}
|
+{/code} |
|
''Save and upload the file.''
|
|
|
|
|