MKPortal SingleBoard 1.4.2 Invision Power Board 1.3
| Mod Description |
MKPortal for Invisionboard (Please read the instructions below) |
| Mod Compatibility |
Invision Power Board 1.3 |
| Mod Category |
Major Mod |
| Mod Author |
Coder: Meo, Peter Designer: Kim Tester and Translator: Our team at mkportal.it |
| Mod Author's Email |
luponero@mclink.it, Peter@ibforen.de |
| Info File |
sources/mods/mkportal/mod_mkportal_howto.htm |
| Mod Version |
1.4.2 |
| Comment |
Distribution is not allowed. Download from ibforen.de or invisionize.com
All changes could be recognized by mod_token
This html-howto was created with The ModInstaller 1.3.2 by
Peter@ibforen.de, released on 8th January, 2007
Creation time 2007-09-11
It is not for public use.
Attention
- This modification is no freeware.
- Redistribution of this howto or of one of the mod files is prohibited. Redistribution of the mod or its files only with my authorisation.
- Customizing of the mod, in order to fit your board's skin, is welcomed. Share your experiences with the community.But do not hurt my copyright by distributing code segment derivated from this mod.
- Violation of these rules will finally let me stop any production of free available modifications or programs.
Please, respect the creative work of coders and take care of their copyrights.
|
| Mod Token |
mod_mkportal |
Content
1.4.2- Code for skin and language modification removed from index.php
1.3 Final ⇒ 1.4- Numerous bugfixes
- Update for TinyMCE
- ...
All files of MKPortal have to get iexhchanged with the newer version (except of lan_custom.php". Then you have to reinstall the mod MKPortal in IPB ACP.
If you are running an upgrade, then you have to process the script upgrade_13_14.php. Do not forget to remove that script thereafter
| Changed file |
Changed function |
| index.php |
body |
| sources/Drivers/mySQL.php |
class properties or methods |
| sources/Drivers/mySQL.php |
query(..) |
| sources/functions.php |
authorise(..) |
| sources/functions.php |
board_offline(..) |
| sources/functions.php |
class properties or methods |
| sources/functions.php |
do_output(..) |
| sources/functions.php |
do_output(..), do_output(..) |
| sources/functions.php |
Error(..) |
| sources/lib/emailer.php |
build_headers(..) |
| sources/Login.php |
delete_cookies(..) |
DecompressingDecompress the archive. You will find a directory uploads and 2 directories
Invisionboard and
mkportal inside uploads.
Copy Invisionboard filesCopy all files and dirs in
Invisionboard into the root dir of your ipb und take care of the structure.
Best if you copy the entire directores. They are prestructured.
- archive_in ⇒ archive_in // Here you will find our new multi language skin mkportal_int
- sources/mods/mkportal ⇒ sources/mods/mkportal
- lang/en/mod_customize_lang.php ⇒ lang/en/mod_customize_lang.php
The other lang files should be copied in their appropriate directories.
Example:
If your Italian Language resides in lang/2 then you should copy
lang/Italian/mod_customize_lang.php ⇒ lang/2/mod_customize_lang.php - Skin/s1/mod_mkportal_skin.php ⇒ Skin/s1/mod_mkportal_skin.php
This file should be copied in all other skin directories. You can customize these files to fit your Invisionboard skin. Do not forget to resynchronize your databse templates from the PHP files.
Copy MKPortal filesNew Installation- Copy the entire dir mkportal on your webspace in the same directory, where your ipb resides. Do not change the dir name.
- Copy the file index.php in uploads on your webspace above of mkportal.
UpgradeDo the same as above except of mkportal/conf_mk.php. Do not overwrite this file. Attention: Do avoid overwriting your language entries for custom blocks, copy the folder lang_update instead of lang.
After these steps you will have this structure
- ./index.php
- ./upgrade_11a_12.php
- ./upgrade_101_11.php
- ./mkportal
- ./[your ipb]
ExampleLet us assume, that you have your ipb in /home/htdocs/forum, then you should have this structure
- /home/htdocs/index.php
- /home/htdocs/forum
- /home/htdocs/mkportal
Permissions (chmod)Now you have to set some permissions on the new directories.
- All directories, in which MKPortal must be able to create files, must be chmodded to 0777.
- All files, which MKPortal must be able to change (to write in) must have 0666.
(Sometimes we can chmod lower, but only if we know, which user is used for access).
Use your favorite ftp-client and set the follwing permissions:
- mkportal itself: 0777
- mkportal/conf_mk.php: 0666
- mkportal/blog: 0777
- mkportal/cache: 0777
- mkportal/files: 0777
- mkportal/files/downloads: 0777
- mkportal/files/gallery: 0777
- mkportal/files/reviews: 0777
- mkportal/files/uploads: 0777
- mkportal/lang/xx: 0777 (all subdirs in this dir)
- mkportal/lang/xx/xx: 0666 (all files in the subdirs, but not the admin subdir).
Step 1: Open index.php
A. Find
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];
|
Insert below the blue code
$DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix'];
//-- mod_mkportal begin
define('IN_FORUM', TRUE);
define("MK_PATH", "../");
require MK_PATH."mkportal/conf_mk.php";
if ($MK_CONFIG['forum_view'] == "1") {
unset ($DB);
require MK_PATH."mkportal/include/mk_mySQL.php";
$DB = new mk_db_driver( $INFO['sql_database'],
$INFO['sql_user'],
$INFO['sql_pass'],
$INFO['sql_host'],
$INFO['sql_tbl_prefix'],
$MK_CONFIG['mk_tbl_prefix'],
$INFO['debug_level']
);
}
//-- mod_mkportal end
|
B. Find
$skin_universal = $std->load_template('skin_global');
|
Insert below the blue code
$skin_universal = $std->load_template('skin_global');
//-- mod_mkportal begin
define('IN_MK', TRUE);
if ($MK_CONFIG['forum_view'] == "1") {
require MK_PATH."mkportal/include/functions.php";
require "$mklib->template_path/tpl_main.php";
}
//-- mod_mkportal end
|
Step 2: Open sources/functions.php
A. Find in function
Error(..)
}
$print = new display();
|
Insert below the blue code
}
$print = new display();
//-- mod_mkportal begin
global $MK_CONFIG, $Skin, $mklib;
if (!defined("IN_IPB")) {
$this->boink_it($MK_CONFIG['forum_path']."/index.php");
}
if (!defined("IN_MK")) {
define('IN_MK', TRUE);
require MK_PATH."mkportal/include/functions.php";
require "$mklib->template_path/tpl_main.php";
}
if ($MK_CONFIG['forum_view'] == "1") {
if (!class_exists("mkportal") ) {
if (file_exists(ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php")) {
require ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php";
}
else {
die("Could not call required function from file 'sources/mods/mkportal/mod_mkportal_func.php'<br />Does it exist?");
}
}
$print->add_output($mkportal->insert_js());
$print->add_output($html);
$print->to_print = str_replace( "<% MEMBER BAR %>", "", $print->to_print);
$FORUM_OUT = $mkportal->clean_html($print->to_print);
$mklib->forum['js'] = $FORUM_OUT['js'];
$mklib->forum['css'] = $FORUM_OUT['css'];
$mklib->printpage(!$mklib->forumcs, !$mklib->forumcd, $mklib->sitename."->".$ibforums->lang['error_title'], $FORUM_OUT['html']);
exit();
}
//-- mod_mkportal end
|
B. Find in function
board_offline(..)
$html = $skin_universal->board_offline( $msg );
$print = new display();
|
Insert below the blue code
$html = $skin_universal->board_offline( $msg );
$print = new display();
//-- mod_mkportal begin
global $MK_CONFIG;
if ($MK_CONFIG['forum_view'] == "1") {
$TAGS = $DB->query("SELECT macro_value, macro_replace FROM ibf_macro WHERE macro_set={$ibforums->skin['macro_id']}");
while ( $row = $DB->fetch_row($TAGS) ) {
if ($row['macro_value'] != "") {
$print->to_print = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $print->to_print );
}
}
$print->to_print = str_replace("<#IMG_DIR#>", $ibforums->skin['img_dir'], $print->to_print);
if (!class_exists("mkportal") ) {
if (file_exists(ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php")) {
require ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php";
}
else {
die("Could not call required function from file 'sources/mods/mkportal/mod_mkportal_func.php'<br />Does it exist?");
}
}
$print->add_output($mkportal->insert_js());
$print->add_output($html);
$print->to_print = str_replace( "<% MEMBER BAR %>", "", $print->to_print);
global $mklib;
$FORUM_OUT = $mkportal->clean_html($print->to_print);
$mklib->forum['js'] = $FORUM_OUT['js'];
$mklib->forum['css'] = $FORUM_OUT['css'];
$mklib->printpage(!$mklib->forumcs, !$mklib->forumcd, $mklib->sitename."->".$ibforums->lang['offline_title'], $FORUM_OUT['html']);
exit();
}
//-- mod_mkportal end
|
C. Find in function
do_output(..)
$nav = $skin_universal->start_nav();
|
Insert below the blue code
$nav = $skin_universal->start_nav();
//-- mod_mkportal begin
global $MK_CONFIG;
if (!$MK_CONFIG['forum_view']) {
$nav .= "<a href='".$MK_CONFIG['site_url']."/index.php'>".$MK_CONFIG['site_name']."</a>"."<{F_NAV_SEP}>";
}
//-- mod_mkportal end
|
D. Find in function
do_output(..)
$this_header = $skin_universal->BoardHeader();
|
Insert above the blue code
//-- mod_mkportal begin
global $MK_CONFIG;
if ($MK_CONFIG['forum_view'] == "1" ) {
if (!class_exists("mkportal") ) {
if (file_exists(ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php")) {
require ROOT_PATH."sources/mods/mkportal/mod_mkportal_func.php";
}
else {
die("Could not call required function from file 'sources/mods/mkportal/mod_mkportal_func.php'<br />Does it exist?");
}
}
$this_header = $mkportal->insert_js();
}
else
//-- mod_mkportal end
$this_header = $skin_universal->BoardHeader();
|
E. Find in function
do_output(..)
if ($ibforums->member['show_popup'])
|
Insert above the blue code
//-- mod_mkportal begin
if (empty($output_array['OVERRIDE']) && $MK_CONFIG['forum_view'] != "1") {
if ($ibforums->member['show_popup']) {
$DB->query("UPDATE ibf_members SET show_popup=0 WHERE id={$ibforums->member['id']}");
if ( $ibforums->input['act'] != 'Msg' ) {
$pm_js = $skin_universal->PM_popup();
}
}
}
else {
$css = preg_replace("`url\s*\(css.php`i", "url(".$ibforums->vars['board_url']."/css.php", $css);
}
//-- mod_mkportal end
if ($ibforums->member['show_popup'])
|
F. Find in function
do_output(..), do_output(..)
if ( empty($output_array['OVERRIDE']) )
|
Insert above the blue code
//-- mod_mkportal begin
if (empty($output_array['OVERRIDE']) && $MK_CONFIG['forum_view'] == "1") {
$ibforums->skin['template'] = str_replace( "<% MEMBER BAR %>", "", $ibforums->skin['template']);
}
//-- mod_mkportal end
if ( empty($output_array['OVERRIDE']) )
|
G. Find
print $ibforums->skin['template'];
exit;
|
Insert above the blue code
//-- mod_mkportal begin
if ($MK_CONFIG['forum_view'] == "1") {
if (empty($output_array['OVERRIDE'])) {
global $mklib;
$FORUM_OUT = $mkportal->clean_html($ibforums->skin['template']);
unset($ibforums->skin['template']);
$mklib->forum['js'] = $FORUM_OUT['js'];
$mklib->forum['css'] = $FORUM_OUT['css'];
$nav = str_replace("<{F_NAV_SEP}>", "->", $nav);
$nav = preg_replace("`<.*?".">`", "", $nav);
$mklib->printpage(!$mklib->forumcs, !$mklib->forumcd, $mklib->sitename."->".$nav, $FORUM_OUT['html']);
exit();
}
else {
$ibforums->skin['template'] = preg_replace("`('|\")style_images/`i", "\\1".ROOT_PATH."style_images/", $ibforums->skin['template']);
}
}
//-- mod_mkportal end
print $ibforums->skin['template'];
exit;
|
H. Find in function
authorise(..)
Insert above the blue code
//-- mod_mkportal begin
if (! $this->member['id'])
{
$lang = $std->my_getcookie('language');
if ($lang) {
$this->member['language'] = $lang;
}
$skin = $std->my_getcookie('skin');
if ($skin !== FALSE) {
$this->member['skin'] = $skin;
}
}
//-- mod_mkportal end
return $this->member;
}
|
Step 3: Open sources/Login.php
Find in function
delete_cookies(..)
$std->my_setcookie('forum_read', '-1');
|
Insert below the blue code
$std->my_setcookie('forum_read', '-1');
//-- mod_mkportal begin
$std->my_setcookie('language', 'en');
//-- mod_mkportal end
|
Step 4: Open sources/lib/emailer.php
Find in function
build_headers(..)
$this->mail_headers .= "X-Mailer: IPB PHP Mailer\n";
|
Insert below the blue code
$this->mail_headers .= "X-Mailer: IPB PHP Mailer\n";
//-- mod_mkportal begin
$offset = $ibforums->vars['time_offset'];
$offset += $ibforums->vars['time_adjust']/60;
$offset_h = floor(abs($offset));
$offset_m = round((abs($offset) - $offset_h)*60);
$offset_h = str_pad($offset_h, 2, "0", STR_PAD_LEFT);
if ($offset < 0) {
$offset_h = "-".$offset_h;
}
else {
$offset_h = "+".$offset_h;
}
$offset_m = str_pad($offset_m, 2, "0", STR_PAD_LEFT);
$this->mail_headers .= "Date: ".date("D, d M Y H:i:s ", time()).$offset_h.$offset_m."\n";
//-- mod_mkportal end
|
Step 5: Open sources/Admin/admin_functions.php
Step 6: Open sources/Drivers/mySQL.php
A. Find
Insert below the blue code
'debug' => 0,
//-- mod_mkportal begin
'debug_level' => 0,
//-- mod_mkportal end
|
B. Find in function
query(..)
$this->obj['cached_queries'][] = $the_query;
|
Insert above the blue code
//-- mod_mkportal begin
if ($this->obj['debug_level'] >= 3)
//-- mod_mkportal end
$this->obj['cached_queries'][] = $the_query;
|
Installation of MKportalRun the install script in directory mkportal
http://.../mkportal/mk_install.phpand follow the instructions.
Customize your InvisionboardZitat
Important
Before modifiying your Invisionboard files be sure, not to have installed my mod Customize Date In Your Own language with mod_token mod_customize_date. If this mod is installed, please remove it completely. This mod is integrated into MKPortal.
Several files must be modified. Follow the instruction above or use The ModInstaller (recommended).
Customize the lang-id translation to MKPortal language namesThis step could be done directly in MKPortal's Control Center. Go to Main ⇒ Preferences and assign languages of MKPortal to languages of your board.
Integration of MKPortal into the skin engine of InvisionboardThe archive contains a new template for MKPortal: "Forum_Skin".
- Go to your MKPortal's Control Panel and choose this Template. Now your portal will look like your Board.
New MKPortal Skin for your Invisionboard 1.3We have added a new MKPortal Skin, including buttons in several languages. When you have imported the skin via ACP, you will see some subdirs in style_images/mkportal-xxx.
These subdirs are named as en, de, fr, it etc. and you will understand its purpose immediately. With the above modifications you will be able to select the proper image directory automatically.
Look thru your lang dir in IPB and remember the dir names. They will be like en, 2, 3 etc. Take a look at some files to be sure, which language is assigned to which name.
Now rename the new dirs in the image folder according to these dir names.
You can choose this solution for other skins too. Simply create new dirs in the image folder and name them in this sense. Copy the orignal image files into these new directories and thereafter copy all your new buttons in according languages into these new dirs.
If users choose their language, your board will show the right buttons.
Upgrade MKportal 0.1 ⇒ MKPortal 1.0.xRun the upgrade script upgrade.php in directory mkportal. Do not forget to remove this script after having used it.
Upgrade MKportal 1.0.1 ⇒ MKPortal 1.1- Run the upgrade script upgrade_101_11.php in the root directory (above of mkportal with index.php inside). It will modify the existing database.
Do not forget to remove this script after having used it. - Remove all modification to Invisionboard, made by an previous installation of MKPortal.
- Remove all modification to Invisionboard, made by my mod "Customize Date In Your Own Language" (if necessary)
- Modify the Invisionboard files, as described above. Follow the instructions very carefully or use The ModInstaller (recommended).
- Go to your Portal Control Panel and set the options for your needs.
Upgrade MKportal 1.1a ⇒ MKPortal 1.2- Run the upgrade script upgrade_11a_12.php in the root directory (above of mkportal with index.php inside). It will modify the existing database.
Do not forget to remove this script after having used it. - Go to your Portal Control Panel and set the options for your needs.
Upgrade MKportal 1.2 ⇒ MKPortal 1.3- Exchange all files as described above except mk_conf.php
- Create a new folder ./mkportal/files/uploads and chmod to 0777
- We have customized the skin file mod_mkportal_skin.php for Invisionboard. Copy that file in all skin folders and customize it as you like it.
- Go to your Portal Control Panel and set the options for your needs.
Feedback is welcomed and desired. Support and Feedback at
mkportal.it
1.2 Final ⇒ 1.3- A lot of bugfixes
- Some modifications in ipb/sources/functions.php have been removed (function get_date())
- All changes in ipb/sources/Admin/admin_functions.php have been removed (function get_date())
In order to remove that code automatically there is an empty section in this howto (CodeChange.php). Don't worry about error messages concerning that file.
I recommend urgently to install the mod Security and Bug Update For IPB 1.3.1 or Security and Bug Update For IPB 1.3. - Unlimited depth for subcategories in Downloads, Gallery and Reviews
- Search function now for Reviews and Blogs, too
- Collapsable boxes
- Updates for TinyMCE, FCKEditor and PIRC (Chat module)
1.1b Final ⇒ 1.2General- TinyMCE Editor as the third html editor.
It looks a little bit different compared with Multiboard, because I have ordered the buttons similar to Word. The German language files are completed and improved (UTF-8). - RSS Reader Block with management in Portal CP
Admin- ad_download:
Upload files: Existing files will not get overwritten - ad_langs.php:
Select editor (html or raw). This is helpful for the help files - ad_nav.php:
default entries replacable by user defined links (list of default entries remains for selection)
User- Blocks:
- online_home.php:
- User sees only allowed sections
- Anonymous admins are not shown as anonymous members (Stealth mode for admins. This is a MI-Mod for IPB1.3, too)
- Modules:
- blog:
- Use of magic words for the templates, language dependent magic words and system magic words
- Bug in message archive fixed
- chat:
- removing annoying characters from nickname
- nickname = member name (for members only)
- gallery:
- reviews:
- an url is formatted as a clickable link
- an email address is formatted as a clickable mailto link
- Editor:
Copyright line under the editor post box.- fckeditor:
- replaced with newest version 2.0 RC3
- missing xml-file added
- German language files optimized
- TinyMCE:
- Newest stable version 1.43
- German language files optimized
- Basic functions in directory mkportal/include
- link to the shoutbox in last shout was buggy in forum view
- line feed problem for html editors solved
- html filter only for html editors
1.1 Final ⇒ 1.1b- Bugfixes
- Google search in user language