bobsfm Опубликовано 30 Января 2004 Жалоба Поделиться Опубликовано 30 Января 2004 Кто поможет переделать этот мод под русскую версию форумов 1.2 и выше и ПХП-Нуков 6.9 и выше? Мне бы хотелось, чтобы регистрация велась только через форумы с возможность регистрировать только через админа, ЛС шли только через форум, форум вставлятся в ПХП блоком, как сейчас у них вставляется пхпюбб, выход из РХР-Нуке атвоматом выходил из форума, как и вхот и обратно, администрирование форума открывало бы админпанель форума, а РХР-Нуки админились бы через открытие их пенели, но админ был общий. Нашел предлагаемый конвертор http://mods.ibplanet.com/db/?mod=2253 По конвертации IPB и PHP-Nuke:http://forums.invisionpower.com/index.php?...=ST&f=7&t=14632 (Patiek) - обсуждение Вот что написал Патиек:"Anyway, many people have asked how to copy IBF members into PHPnuke members if they were to already have an Invision Board and wanted to install a PHPnuke with all the same members. Once you have installed phpnuke, download this file: http://hack-ibf-phpnuke.ep-dev.com/runsql.zip ; unzip it, edit the variables in it, upload it, and then visit it in your web browser. As for people who want PHPnuke members to become Invision Board members... that will take a bit more of coding. Maybe someone else can do that who knows how to code in php, or perhaps I will release it later when I have more time. " http://forums.invisionpower.com/index.php?...ndpost&p=465123 (кажется ему удалось сдалть остаток) Далее в обсуждении тему есть доработки мода конвертации обеих ДБ, встраивания мода форума ЙПБ в НукеРХР, перевод ЛС их Нуке в ЙПБ http://forums.invisionpower.com/index.php?...ndpost&p=543268 - Note this is for IPB1.2 and PHP-Nuke6.5 от AussieSatи от него же http://forums.invisionpower.com/index.php?...ndpost&p=557155 о том как My question is, How can I make the board load up inside the main site like the way the builtin forums in phpnuke do, ie not loadup in a new window.? Replace modules/Forums/index.php with the following code: <?php /********************************************************/ /* I-frame Module for PHP-Nuke */ /* http://phpnuke.holbrookau.com */ /********************************************************/ $index = 0; include("header.php"); OpenTable(); echo "<iframe src=\"URL_to_forums\" frameborder=\"0\" width=\"100%\" height=\"600\"></iframe>"; CloseTable(); include("footer.php");Change URL_to_forums to suit your site. If you had edited your Modules block to point the forums link directly to your board, you will need to undo it again (or just upload the standard Modules block). Open your blocks/block-Modules.php and find: if ((is_admin($admin) AND $view == 2) OR $view != 2) { if ($m_title != 'Forums') { $content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=$m_title\">$m_title2</a><br>\n"; } else { $content .= "<strong><big>·</big></strong> <a href='/forums/index.php'>$m_title2</a><br>\n"; } } Replace it with: if ((is_admin($admin) AND $view == 2) OR $view != 2) { $content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=$m_title\">$m_title2</a><br>\n"; } Есть еще http://forums.invisionpower.com/index.php?...ndpost&p=573958 от AussieSat In forums_dir/sources/Admin/ad_member.php, find (around line 2020 in IPB 1.2):$DB->query("INSERT INTO ibf_members (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")");After add:$nukeuname = trim($IN['name']); $phpnukepass = md5(trim($IN['password'])); $nukeemail = trim(strtolower($IN['email'])); $DB->query("INSERT into nuke_users (username, user_email, user_password) values ('$nukeuname', '$nukeemail', '$phpnukepass')"); http://forums.invisionpower.com/index.php?...ndpost&p=574178 от Madrose If you interested in importing all common data from IPB to php nuke use this code:<?php // Root path define( 'ROOT_PATH', "./" ); require "./conf_global.php"; $INFO['sql_driver'] = !$INFO['sql_driver'] ? 'mySQL' : $INFO['sql_driver']; $to_require = "./sources/Drivers/".$INFO['sql_driver'].".php"; require ($to_require); $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database']; $DB->obj['sql_user'] = $INFO['sql_user']; $DB->obj['sql_pass'] = $INFO['sql_pass']; $DB->obj['sql_host'] = $INFO['sql_host']; $DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; // Get a DB connection $DB->connect(); $ibfprefix = "ibf"; // Prefix of your IPB tables - edit if required. $prefix = "nuke"; //Prefix for nuke tables $sql = $DB->query("SELECT * FROM ".$ibfprefix."_members WHERE id > 1 AND mgroup != 1 ORDER BY id"); while ($row = $DB->fetch_row($sql)) { $db_string = $DB->compile_db_insert_string( array( 'user_id' => $row['id'], 'name' => $row['title'], 'username' => $row['name'], 'user_email' => $row['email'], 'user_website' => $row['website'], 'user_avatar' => $row['avatar'], 'user_icq' => $row['icq_number'], 'user_from' => $row['location'], 'user_sig' => $row['signature'], 'user_password' => $row['password'], 'user_viewemail' => $row['hide_email'], 'user_aim' => $row['aim_name'], 'user_yim' => $row['yahoo'], 'counter' => $row['posts'], 'user_active' => 1, 'user_lang' => 'english', 'user_timezone' => $row['time_offset'], 'user_interests' => $row['interests'], 'user_regdate' => gmdate('M m, Y', $row['joined'] ), ) ); $DB->query("INSERT INTO ".$prefix."_users (".$db_string['FIELD_NAMES'].") VALUES(".$db_string['FIELD_VALUES'].")"); echo $row['name']; echo "<br />"; } echo "<br /><b>All IPB members listed above have been successfully added as phpNuke users."; ?>save this code into a file and upload it to your main IPB forum folder and run it.This code will import all users in your forums with their (names, titles, id, joining date, sig ... etc. as you can see from the above code. http://forums.invisionpower.com/index.php?...ndpost&p=578515 от AussieSat Add member to IBP when they register in PHP-Nuke.This adds the member at the point of signup confirmation.Open modules/Your_Account/index.php and find (around line 139): $db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')");Add After:// Hack = add new user to IPB $membergroup = "3"; // Registered members group - default = 3 $ipbprefix = "ibf"; // Prefix of your IPB tables - default = ibf $row = $db->sql_fetchrow($db->sql_query("SELECT id FROM ".$ipbprefix."_members ORDER BY id DESC LIMIT 1")); $lastid = $row[id] +1; $jointime = time(); $db->sql_query("INSERT INTO ".$ipbprefix."_members (id, mgroup, name, password, email, joined) values ('$lastid', '$membergroup', '$username', '$new_password', '$user_email','$jointime')"); $db->sql_query("UPDATE ".$ipbprefix."_stats SET "."MEM_COUNT=MEM_COUNT+1,"."LAST_MEM_NAME='".$username."',"."LAST_MEM_ID='".$lastid."'"); // End HackEDIT - Now adds signup date/time, updates member stats. http://forums.invisionpower.com/index.php?...ndpost&p=578832 от Madrose Delete Member from phpnuke when deleted from IPBopen ./sources/Admin/ad_member.php and find: $DB->query("UPDATE ibf_stats SET ". "MEM_COUNT=MEM_COUNT-1, ". "LAST_MEM_NAME='" . $memb['name'] . "', ". "LAST_MEM_ID='" . $memb['id'] . "'");and add immediatly after that: // Delete member from phpnuke. $DB->query("DELETE from nuke_users WHERE username='{$mem['name']}'"); http://forums.invisionpower.com/index.php?...ndpost&p=579145 от AussieSat Heres a slightly differant one for those that prefer it - in this one the member is not added to IPB until they click the confirm link in the PHP-Nuke email. Add member to IBP when they register in PHP-Nuke. Open modules/Your_Account/index.php and find (around line 171):CODE $db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");Add after:// Hack = add new user to IPB $membergroup = "3"; // Registered members group - default = 3 $ipbprefix = "ibf"; // Prefix of your IPB tables - default = ibf $row2 = $db->sql_fetchrow($db->sql_query("SELECT id FROM ".$ipbprefix."_members ORDER BY id DESC LIMIT 1")); $lastid = $row2[id] +1; $jointime = time(); $db->sql_query("INSERT INTO ".$ipbprefix."_members (id, mgroup, name, password, email, joined) values ('$lastid', '$membergroup', '$row[username]', '$row[user_password]', '$row[user_email]', '$jointime')"); $db->sql_query("UPDATE ".$ipbprefix."_stats SET "."MEM_COUNT=MEM_COUNT+1,"."LAST_MEM_NAME='".$row['username']."',"."LAST_MEM_ID='".$lastid."'"); // End HackRayCRP - You wern't quick enough and I saw your post Just wondering what did you do to solve the problem? EDIT - Now adds signup date/time to IPBEDIT2 - Now updates IPB member stats http://forums.invisionpower.com/index.php?...ndpost&p=676647 от AussieSat 1. when I change password in one of them it changes it in both (nuke/IPB)2. once logged into NUke and you go into the forum, you dont have to log in again.3. need to sort out the 10 last post preview section from IPB to nuke, only shows up when admin is loged in. other times.. blank area.1. I'm sure that is already done and documented in this thread? (both ways).2. You mean only login once instead of to both PHP-Nuke and IPB? - I think it is the most wanted thing but I'm not up for it at this stage, would really love some guidence on this one..3. I just tried it as a center block - no problem. But users don't have to be logged in to read posts on my site either.. Scrap that bit as I just visited your site and saw that logging in isn't necessary.. Here is my Last10:<?php /**************************************/ /* Last Posts from IPB */ /* A block for phpNuke 6.0 - 6.6 */ /* By Holbrookau */ /* http://phpnuke.holbrookau.com */ /**************************************/ if (eregi("block-IPB_last_posts.php", $PHP_SELF)) { Header("Location: index.php"); die(); } global $admin; $ibf_path = "forums"; // path from phpNuke root directory to IPB index.php $ibf_table_prefix = "ibf_"; // change if your IPB table prefix is not ibf_ $limit = "10"; // How many threads would you like to display? $noshow = "0"; // Dont show posts from these forum IDs - seperate with commas $scroll = "1"; // Scroll - 1=On, 0=Off if (is_admin($admin)) { $ibf_query = mysql_query("SELECT DISTINCT tid, title, last_poster_name, last_poster_id, forum_id FROM ".$ibf_table_prefix."topics ORDER BY last_post DESC LIMIT ".$limit); } else { $ibf_query = mysql_query("SELECT DISTINCT tid, title, last_poster_name, last_poster_id, forum_id FROM ".$ibf_table_prefix."topics WHERE forum_id NOT IN ($noshow) ORDER BY last_post DESC LIMIT ".$limit); } if ($scroll=="1") { $content = " <MARQUEE behavior= \"scroll\" align= \"left\" direction= \"up\" height=\"150\" scrollamount= \"1\" scrolldelay= \"10\" onmouseover='this.stop()' onmouseout='this.start()'>"; } while($ibf_result = mysql_fetch_row($ibf_query)) { $content .= "<br><img src=\"".$ibf_path."/style_images/1/newpost.gif\"><b> <a href=\"/".$ibf_path."/index.php?act=ST&f=".$ibf_result[4]."&t=".$ibf_result[0]."&view=getnewpost\">".$ibf_result[1]."</a></b> <i>by "; if($ibf_result[3] != 0) { $content .= "<a href=\"".$ibf_path."?act=Profile&CODE=03&MID=".$ibf_result[3]."\">".$ibf_result[2]."</a></i><br>\n"; } else { $content .= $ibf_result[2]."</i></p>\n"; } } ?> http://forums.invisionpower.com/index.php?...ndpost&p=735565 от AussieSat Combined Logins!OK guys (& girls?), here is a little mod to allow your users to login into both PHP-Nuke and IPB at the same time using the PHP-Nuke Login block or Your Account login page. There is no combined logout just yet, and a combined login from IPB is another hack (maybe later).I fairly sure everything works correctly, but please let me know if something is not right. EDITED - changed code insertion point as navbar was not showing up in Your Account. Heres how: Open your phpnuke/modules/Your_Account/index.php file and find the following code (around line 750):} else { Header("Location: modules.php?name=$module_name&stop=1"); }Immediately after add:// IPB Login Hack define ("IPB_PATH", "/path/to/your/forums/" ); // eg: /home/username/public_html/forums/ require IPB_PATH."conf_global.php"; require IPB_PATH."sources/functions.php"; require IPB_PATH."sources/Drivers/".$INFO['sql_driver'].".php"; $INFO['number_format'] = isset($INFO['number_format'])?$INFO['number_format']:'none'; $std = new FUNC; class info { var $vars = ""; } $ibforums = new info; $ibforums->vars['strip_space_chr'] = isset($INFO['strip_space_chr'])?$INFO['strip_space_chr']:0; $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database']; $DB->obj['sql_user'] = $INFO['sql_user']; $DB->obj['sql_pass'] = $INFO['sql_pass']; $DB->obj['sql_host'] = $INFO['sql_host']; $DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; $DB->connect(); $username = strtolower($username); $password = md5( $user_password ); $DB->query("SELECT m.id, g.g_id, g.g_access_offline, m.name, m.mgroup, m.password FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) WHERE LOWER(m.name)='$username'"); if ($DB->get_num_rows()) { $input = $std->parse_incoming(); $member = $DB->fetch_row(); $session_id = md5( uniqid(microtime()) ); $DB->query("DELETE FROM ibf_sessions WHERE ip_address='".$input['IP_ADDRESS']."'"); $db_string = $DB->compile_db_insert_string( array ( 'id' => $session_id, 'member_name' => $member['name'], 'member_id' => $member['id'], 'running_time' => time(), 'member_group' => $member['mgroup'], 'ip_address' => substr($input['IP_ADDRESS'], 0, 50), 'browser' => substr($_SERVER['HTTP_USER_AGENT'], 0, 50), 'login_type' => 0 ) ); $db_query = "INSERT INTO ibf_sessions (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"; $DB->query( $db_query ); $std->my_setcookie('session_id', $session_id, 1); $std->my_setcookie("member_id" , $member['id'], 1); $std->my_setcookie("pass_hash" , $password, 1); $std->my_setcookie("anonlogin", 0 ); } // end IPB Login HackNOTE: You must enter your full path from root to IPB in define ("IPB_PATH", "/path/to/your/forums/" ); Save the file and that's it! Credit to Pit for the snippet of code from his Loginout From Anywhere mod for IPB which you can find here: http://mods.ibplanet.com/db/?mod=861 http://forums.invisionpower.com/index.php?...ndpost&p=735691 от AussieSat This is the Logout part of the combined LogIn-LogOut mod. As a member it will log you out of IPB whenever you logout of PHP-Nuke - admin login status is unaffected.See the next post for a modified Login block - recommended if you do this mod.As before, if you have a problem with the mod please let me know. Open your phpnuke/modules/Your_Account/index.php file and find the following code (around line 620): $db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$r_username'"); $db->sql_query("DELETE FROM ".$prefix."_bbsessions WHERE session_user_id='$r_uid'"); $user = "";Immediately after add:// IPB Logout Hack define ("IPB_PATH", "/path/to/your/forums/" ); // eg: /home/username/public_html/forums/ require IPB_PATH."conf_global.php"; require IPB_PATH."sources/functions.php"; require IPB_PATH."sources/Drivers/".$INFO['sql_driver'].".php"; $INFO['number_format'] = isset($INFO['number_format'])?$INFO['number_format']:'none'; $std = new FUNC; class info { var $vars = ""; } $ibforums = new info; $ibforums->vars['strip_space_chr'] = isset($INFO['strip_space_chr'])?$INFO['strip_space_chr']:0; $input = $std->parse_incoming(); $logout_mode = 'null'; global $HTTP_SERVER_VARS; $cookie = array(); $cookie['session_id'] = $std->my_getcookie('session_id'); $cookie['member_id'] = $std->my_getcookie('member_id'); $cookie['pass_hash'] = $std->my_getcookie('pass_hash'); if ($INFO['match_browser'] == 1) $user_agent = substr($HTTP_SERVER_VARS['HTTP_USER_AGENT'],0,50); if ( ! empty($cookie['session_id']) ) { $session_id = $cookie['session_id']; $logout_mode = 'cookie'; } elseif (! empty($input['session_id']) ) { $session_id = preg_replace("/([^a-zA-Z0-9])/", "", $input['session_id']); if ( !empty($session_id) ) { $logout_mode = 'session_id'; } } elseif (! empty($input['s']) ) { $session_id = preg_replace("/([^a-zA-Z0-9])/", "", $input['s']); if ( !empty($session_id) ) { $logout_mode = 'session_id'; } } $DB = new db_driver; $DB->obj['sql_database'] = $INFO['sql_database']; $DB->obj['sql_user'] = $INFO['sql_user']; $DB->obj['sql_pass'] = $INFO['sql_pass']; $DB->obj['sql_host'] = $INFO['sql_host']; $DB->obj['sql_tbl_prefix'] = $INFO['sql_tbl_prefix']; $DB->connect(); $query = "SELECT member_id FROM ibf_sessions WHERE id='". $session_id ."'"; $query .= isset($user_agent)?" AND browser='".$user_agent."'":""; $DB->query($query); $query = "UPDATE ibf_sessions SET ". "member_name='',". "member_id='0',". "login_type='0' ". "WHERE id='". $session_id ."'"; $query .= isset($user_agent)?" AND browser='".$user_agent."'":""; $DB->query($query); $query = "UPDATE ibf_members SET last_visit='".time()."', last_activity='".time()."' WHERE id='".$member['member_id']."'"; $DB->query($query); $std->my_setcookie( "member_id" , "0" ); $std->my_setcookie( "pass_hash" , "0" ); $std->my_setcookie( "anonlogin" , "-1" ); global $HTTP_COOKIE_VARS; if (is_array($HTTP_COOKIE_VARS)) { foreach( $HTTP_COOKIE_VARS as $cookie => $value ) { if (preg_match( "/^(".$INFO['cookie_id']."ibresource.*$)/i", $cookie, $match)) $std->my_setcookie( str_replace( $INFO['cookie_id'], "", $match[0] ) , '-', -1 ); } } // End IPB Logout HackNOTE: You must enter your full path from root to IPB in define ("IPB_PATH", "/path/to/your/forums/" ); Save the file and that's it! Credit to Pit for the snippet of code from his Loginout From Anywhere mod for IPB which you can find here: http://mods.ibplanet.com/db/?mod=861 http://forums.invisionpower.com/index.php?...ndpost&p=735721 от AussieSat This is a modified PHP-Nuke Login block which will show (depending on status) the member login form and/or logout links for both member and admin. It is designed to be displayed all the time (see Note below). EDITED - added code for later versions. Open your phpnuke/blocks/block-Login.php file and replace all the code with the following:<?php /************************************************************************/ /* PHP-NUKE: Web Portal System */ /* =========================== */ /* */ /* Copyright (c) 2002 by Francisco Burzi */ /* http://phpnuke.org */ /* */ /* This program is free software. You can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License. */ /************************************************************************/ if (eregi("block-Login.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } global $cookie, $admin, $user, $sitekey; mt_srand ((double)microtime()*1000000); $maxran = 1000000; $random_num = mt_rand(0, $maxran); cookiedecode($user); $uname = $cookie[1]; if (is_admin($admin) AND is_user($user)) { $content = "<center><b>$uname</b><br>[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]<br><br></center>"; $content .= "<center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=logout\">"._LOGOUT."</a> ]</center>"; } else { if (is_user($user)) { $content = "<center><b>$uname</b><br>[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]</center>"; } else { $content = "<form action=\"modules.php?name=Your_Account\" method=\"post\">"; $content .= "<center><font class=\"content\">"._NICKNAME."<br>"; $content .= "<input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>"; $content .= ""._PASSWORD."<br>"; $content .= "<input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>"; if (extension_loaded("gd")) { $content .= ""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n"; $content .= ""._TYPESECCODE."<br><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\">\n"; $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n"; } else { $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">"; $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">"; } $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">"; $content .= "<input type=\"submit\" value=\""._LOGIN."\"></font></center></form>"; $content .= "<center><font class=\"content\">"._ASREGISTERED."</font></center>"; } if (is_admin($admin)) { $content .= "<br><center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=logout\">"._LOGOUT."</a> ]</center>"; } else { $content .= "<br><center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=login\">"._LOGIN."</a> ]</center>"; } } ?>For PHP-Nuke versions 6.9 and later<?php /************************************************************************/ /* PHP-NUKE: Web Portal System */ /* =========================== */ /* */ /* Copyright (c) 2002 by Francisco Burzi */ /* http://phpnuke.org */ /* */ /* This program is free software. You can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License. */ /************************************************************************/ if (eregi("block-Login.php", $_SERVER['PHP_SELF'])) { Header("Location: index.php"); die(); } global $cookie, $admin, $user, $sitekey, $gfx_chk; mt_srand ((double)microtime()*1000000); $maxran = 1000000; $random_num = mt_rand(0, $maxran); cookiedecode($user); $uname = $cookie[1]; if (is_admin($admin) AND is_user($user)) { $content = "<center><b>$uname</b><br>[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]<br><br></center>"; $content .= "<center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=logout\">"._LOGOUT."</a> ]</center>"; } else { if (is_user($user)) { $content = "<center><b>$uname</b><br>[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]</center>"; } else { $content = "<form action=\"modules.php?name=Your_Account\" method=\"post\">"; $content .= "<center><font class=\"content\">"._NICKNAME."<br>"; $content .= "<input type=\"text\" name=\"username\" size=\"10\" maxlength=\"25\"><br>"; $content .= ""._PASSWORD."<br>"; $content .= "<input type=\"password\" name=\"user_password\" size=\"10\" maxlength=\"20\"><br>"; if (extension_loaded("gd") AND ($gfx_chk == 2 OR $gfx_chk == 4 OR $gfx_chk == 5 OR $gfx_chk == 7)) { $content .= ""._SECURITYCODE.": <img src='modules.php?name=Your_Account&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br>\n"; $content .= ""._TYPESECCODE."<br><input type=\"text\" NAME=\"gfx_check\" SIZE=\"7\" MAXLENGTH=\"6\">\n"; $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\"><br>\n"; } else { $content .= "<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">"; $content .= "<input type=\"hidden\" name=\"gfx_check\" value=\"$code\">"; } $content .= "<input type=\"hidden\" name=\"op\" value=\"login\">"; $content .= "<input type=\"submit\" value=\""._LOGIN."\"></font></center></form>"; $content .= "<center><font class=\"content\">"._ASREGISTERED."</font></center>"; } if (is_admin($admin)) { $content .= "<br><center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=logout\">"._LOGOUT."</a> ]</center>"; } else { $content .= "<br><center><b>"._ADMIN."</b><br>[ <a href=\"admin.php?op=login\">"._LOGIN."</a> ]</center>"; } } ?>NOTE: You will need to edit the blocks properties and change the Who Can View This setting to All Visitors. Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
bobsfm Опубликовано 30 Января 2004 Автор Жалоба Поделиться Опубликовано 30 Января 2004 Но, думаю, что мне это подойдет больше - регистрация через форум http://forums.invisionpower.com/index.php?...ndpost&p=736431 от Ancyru Use these in place of AussieSat's: Redirect new phpNuke users to sign up at IBF. In phpnuke/modules/Your_Account/index.phpFind (if unedited, on line 975 - 1049): if (!is_user($user)) { if ($allowuserreg==0) { mt_srand ((double)microtime()*1000000); $maxran = 1000000; $random_num = mt_rand(0, $maxran); include("header.php"); if ($requireadmin==0) { title(_USERREGLOGIN); } else { title(_USERAPPLOGIN); } OpenTable(); echo "<b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")<br><br>\n" ."<table cellpadding=\"0\" cellspacing=\"10\" border=\"0\">\n<form action=\"modules.php?name=$module_name\" method=\"post\">\n" ."<tr><td>"._NICKNAME.":</td><td><input type=\"text\" name=\"username\" size=\"30\" maxlength=\"25\"></td></tr>\n" ."<tr><td>"._EMAIL.":</td><td><input type=\"text\" name=\"user_email\" size=\"30\" maxlength=\"255\"></td></tr>\n" ."<tr><td>"._PASSWORD.":</td><td><input type=\"password\" name=\"user_password\" size=\"11\" maxlength=\"40\"></td></tr>\n" ."<tr><td>"._RETYPEPASSWORD.":</td><td><input type=\"password\" name=\"user_password2\" size=\"11\" maxlength=\"40\"><br><font class=\"tiny\">("._BLANKFORAUTO.")</font></td></tr>\n"; if (extension_loaded("gd") AND ($usegfxcheck == 1 OR $usegfxcheck == 3)) { echo "<tr><td>"._SECURITYCODE.":</td><td><img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>\n" ."<tr><td>"._TYPESECCODE.":</td><td><input type=\"text\" name=\"gfx_check\" size=\"7\" maxlength=\"6\"></td></tr>\n" ."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">\n"; } echo "<tr><td colspan='2'>\n" ."<input type=\"hidden\" name=\"op\" value=\"confirm\">\n" ."<input type=\"submit\" value=\""._NEWUSER."\">\n"; echo _DIRECT1."$adminmail"._DIRECT2; echo "</td></tr></form></table>\n"; echo "<br>\n"; if ($requireadmin == 0) { echo ""._YOUWILLRECEIVE."<br><br>\n"; } echo ""._COOKIEWARNING."<br>\n" .""._ASREGUSER."<br>\n" ."<ul>\n" ."<li>"._ASREG1."\n" ."<li>"._ASREG2."\n" ."<li>"._ASREG3."\n" ."<li>"._ASREG4."\n" ."<li>"._ASREG5."\n"; $handle=opendir('themes'); while ($file = readdir($handle)) { if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) { $thmcount++; } } closedir($handle); if ($thmcount > 1) { echo "<li>"._ASREG6."\n"; } $sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $custom_title = $row[custom_title]; if ($custom_title != "") { echo "<li>"._ACCESSTO." $custom_title\n"; } } $sql = "SELECT title FROM ".$prefix."_blocks WHERE active='1' AND view='1'"; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) { $b_title = $row[title]; if ($b_title != "") { echo "<li>"._ACCESSTO." $b_title\n"; } } if (is_active("Journal")) { echo "<li>"._CREATEJOURNAL."\n"; } if ($my_headlines == 1) { echo "<li>"._READHEADLINES."\n"; } echo "<li>"._ASREG7."\n" ."</ul>\n" .""._REGISTERNOW."<br>\n" .""._WEDONTGIVE."<br><br>\n" ."<center><font class=\"content\">[ <a href=\"modules.php?name=$module_name\">"._USERLOGIN."</a> | <a href=\"modules.php?name=$module_name&op=pass_lost\">"._PASSWORDLOST."</a> ]</font></center>\n"; CloseTable(); include("footer.php"); } else { include("header.php"); title(_ACTDISABLED); include("footer.php"); } } elseif (is_user($user)) { global $cookie; cookiedecode($user); userinfo($cookie[1]); }And replace with:include("header.php"); OpenTable(); echo "<center><p>We have combined our Forum and Webpage user databases.</p> <p><b><a href=\"http://yourdomain.com/forums/index.php?act=Reg\">Please Click Here to Continue.</a></b></p>"; CloseTable(); include("footer.php");*Change yourdomain.com/forums to suit your site Make phpnuke profiles redirect to IBF profiles (Not sure why you would want to do this, I only left it in as it was one of the original hacks). In phpnuke/modules/Your_Account/index.phpFind (if unedited, on line 1209):echo "<font class=\"title\">"._PERSONALINFO.": ".$usrinfo['username']."</font></center><br><br>";And replace it with:$result = sql_query("select id from ibf_members where name='$username'", $dbi); list($memid) = sql_fetch_row($result, $dbi); Header("Location: /forums/index.php?act=Profile&CODE=03&MID=$memid");*Change forums to suit your site Find (if unedited, line 501 - 637): getusrinfo($user); if (($userinfo[username] != $cookie[1]) AND ($userinfo[user_password] != $cookie[2])) { include("header.php"); title(_PERSONALINFO); OpenTable(); nav(); CloseTable(); echo "<br>"; if (!eregi("http://", $userinfo['user_website']) && $userinfo['user_website'] != "http://") { $userinfo['user_website'] = "http://".$userinfo['user_website']; } OpenTable(); $userinfo[user_avatar] = ereg_replace("gallery/","",$userinfo[user_avatar]); echo "<table cellpadding=\"3\" border=\"0\" width='100%'><tr><td bgcolor='$bgcolor2'>" ."<form name=\"Register\" action=\"modules.php?name=$module_name\" method=\"post\">" ."<b>"._USRNICKNAME."</b>:</td><td bgcolor='$bgcolor3'><b>$userinfo[username]</b></td></tr><tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._UREALNAME."</b>:<br>"._OPTIONAL."</td><td bgcolor='$bgcolor3'>" ."<input type=\"text\" name=\"realname\" value=\"$userinfo[name]\" size=\"50\" maxlength=\"60\"></td></tr>"; if ($allowmailchange < 1) { echo "<tr><td bgcolor='$bgcolor2'><b>"._UREALEMAIL.":</b><br>"._REQUIRED."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_email\" value=\"$userinfo[user_email]\" size=\"50\" maxlength=\"255\"><br>"._EMAILNOTPUBLIC."</td></tr>"; } else { echo "<input type=\"hidden\" name=\"user_email\" value=\"$userinfo[user_email]\">\n"; } echo "<tr><td bgcolor='$bgcolor2'><b>"._UFAKEMAIL.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"femail\" value=\"$userinfo[femail]\" size=\"50\" maxlength=\"255\"><br>"._EMAILPUBLIC."</td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YOURHOMEPAGE.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_website\" value=\"$userinfo[user_website]\" size=\"50\" maxlength=\"255\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YOURAVATAR.":</b><br>"._OPTIONAL."</td><td bgcolor='$bgcolor3'>[ <a href=\"modules.php?name=$module_name&op=avatarlist\">"._LIST."</a> ] " ."<select name=\"user_avatar\" onChange=\"showimage()\">" ."<option value=\"$userinfo[user_avatar]\">$userinfo[user_avatar]</option>"; $direktori = "modules/Forums/images/avatars/gallery"; $handle=opendir($direktori); while ($file = readdir($handle)) { $filelist[] = $file; } asort($filelist); while (list ($key, $file) = each ($filelist)) { ereg(".gif|.jpg|.png",$file); if ($file == "." || $file == ".." || (eregi("blank",$file)) || (eregi("index",$file))) { $a=1; } else { echo "<option value=\"$file\">$file</option>"; } } echo "</select> <img src=\"modules/Forums/images/avatars/gallery/$userinfo[user_avatar]\" name=\"avatar\" width=\"32\" height=\"32\" alt=\"\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YICQ.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_icq\" value=\"$userinfo[user_icq]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YAIM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_aim\" value=\"$userinfo[user_aim]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YYIM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_yim\" value=\"$userinfo[user_yim]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YMSNM.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_msnm\" value=\"$userinfo[user_msnm]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YLOCATION.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_from\" value=\"$userinfo[user_from]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YOCCUPATION.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_occ\" value=\"$userinfo[user_occ]\" size=\"30\" maxlength=\"100\"></td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._YINTERESTS.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><input type=\"text\" name=\"user_interests\" value=\"$userinfo[user_interests]\" size=\"30\" maxlength=\"100\"></td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._RECEIVENEWSLETTER."</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[newsletter] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"newsletter\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"newsletter\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._ALWAYSSHOWEMAIL.":</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_viewemail] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_viewemail\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_viewemail\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._HIDEONLINE.":</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_allow_viewonline] == 1) { $ck1 = ""; $ck2 = " checked"; } else { $ck1 = " checked"; $ck2 = ""; } echo "<input type=\"radio\" name=\"user_allow_viewonline\" value=\"0\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_allow_viewonline\" value=\"1\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._REPLYNOTIFY.":</b><br>"._REPLYNOTIFYMSG."</td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_notify] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_notify\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_notify\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._PMNOTIFY.":</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_notify_pm] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_notify_pm\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_notify_pm\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._POPPM.":</b><br>"._POPPMMSG."</td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_popup_pm] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_popup_pm\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_popup_pm\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._ATTACHSIG.":</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_attachsig] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_attachsig\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_attachsig\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._ALLOWBBCODE."</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_allowbbcode] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_allowbbcode\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_allowbbcode\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._ALLOWHTMLCODE."</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_allowhtml] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_allowhtml\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_allowhtml\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._ALLOWSMILIES."</b></td><td bgcolor='$bgcolor3'>"; if ($userinfo[user_allowsmile] == 1) { $ck1 = " checked"; $ck2 = ""; } else { $ck1 = ""; $ck2 = " checked"; } echo "<input type=\"radio\" name=\"user_allowsmile\" value=\"1\"$ck1>"._YES." " ."<input type=\"radio\" name=\"user_allowsmile\" value=\"0\"$ck2>"._NO."</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._FORUMSTIME."</b></td><td bgcolor='$bgcolor3'>"; echo "<select name='user_timezone'>"; for ($i=-12; $i<13; $i++) { if ($i == 0) { $dummy = "GMT"; } else { if (!ereg("-", $i)) { $i = "+$i"; } $dummy = "GMT $i "._HOURS.""; } if ($userinfo[user_timezone] == $i) { echo "<option name=\"user_timezone\" value=\"$i\" selected>$dummy</option>"; } else { echo "<option name=\"user_timezone\" value=\"$i\">$dummy</option>"; } } echo "</select>"; echo "</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._FORUMSDATE.":</b><br>"._FORUMSDATEMSG."</b></td><td bgcolor='$bgcolor3'>"; echo "<input size='15' maxlength='14' type=\"text\" name=\"user_dateformat\" value=\"$userinfo[user_dateformat]\">"; echo "</td></tr>"; echo "<tr><td bgcolor='$bgcolor2'><b>"._SIGNATURE.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"user_sig\">$userinfo[user_sig]</textarea><br>"._255CHARMAX."</td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._EXTRAINFO.":</b><br>"._OPTIONAL."</td>" ."<td bgcolor='$bgcolor3'><textarea wrap=\"virtual\" cols=\"50\" rows=\"5\" name=\"bio\">$userinfo[bio]</textarea><br>"._CANKNOWABOUT."</td></tr>" ."<tr><td bgcolor='$bgcolor2'><b>"._PASSWORD."</b>:</td><br>" ."<td bgcolor='$bgcolor3'><input type=\"password\" name=\"user_password\" size=\"22\" maxlength=\"20\"> <input type=\"password\" name=\"vpass\" size=\"22\" maxlength=\"20\"><br>"._TYPENEWPASSWORD."</td></tr>" ."<tr><td bgcolor='$bgcolor3' colspan='2' align='center'>" ."<input type=\"hidden\" name=\"username\" value=\"$userinfo[username]\">" ."<input type=\"hidden\" name=\"user_id\" value=\"$userinfo[user_id]\">" ."<input type=\"hidden\" name=\"op\" value=\"saveuser\">" ."<input type=\"submit\" value=\""._SAVECHANGES."\">" ."</form></td></tr></table>"; CloseTable(); include("footer.php"); } else { main($user); }And replace with:Header("Location: /forums/index.php?act=UserCP&CODE=01");*Change forums to suit your site http://forums.invisionpower.com/index.php?...ndpost&p=736464 от Ancyru AussieSat, how would go if you wanted to intergrate nuke Private Messages with ibf Private Messages? [EDIT]Nevermind got it. To Redirect nuke Private Messages to ibf Private Messages: Create a new file named index.php and enter this into it and save: <?php Header("Location: /forums/index.php?act=Msg&CODE=1&MID=1"); ?>*Change forums to suit your siteUpload this file into phpnuke/modules/Private_Messages and replace the index.php file. [EDIT]Also in your login hack, there is an error. Replace:$db_query = "INSERT INTO ibf_sessions (" .$db_string['FIELD_NAMES']. ") VALU[I]ES (". $db_string['FIELD_VALUES'] .")";With:$db_query = "INSERT INTO ibf_sessions (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")";Otherwise you get a syntax error and it doesn't log you into IPB. Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.