Iris Опубликовано 19 Июля 2004 Жалоба Поделиться Опубликовано 19 Июля 2004 Возможна ли переделка мода под 2.0 и что именно нужно заменить ??? ******************************************* ** Online List Permissions for Invision Board 1.3 ** ** Author: gamer (gamer@blue-chalk.com)** ******************************************* ** Files edited: ** ** /sources/admin/ad_groups.php ** ** /lang/en/lang_online.php ** ** /sources/Online.php ******************************************* ****** Step 1 ****** Upload and run db_hack.php. ****** Step 2 ****** Open ad_groups.php **** FIND **** 'g_use_pm' => $IN['g_use_pm'], ********* ADD BELOW ********* 'g_view_online' => $IN['g_view_online], **** FIND **** $ADMIN->html .= $SKIN->add_td_row( array( "<b>Can use PM system?$guest_legend" , $SKIN->form_yes_no("g_use_pm", $group['g_use_pm'] ) ) ); ********* ADD BELOW ********* $ADMIN->html .= $SKIN->add_td_row( array( "<b>Can view Online List?$guest_legend" , $SKIN->form_yes_no("g_view_online", $group['g_view_online'] ) ) ); Save and close. ****** Step 3 ****** Open lang_online.php **** FIND **** ); ?> ********* ADD ABOVE ********* 'no_view_online' => 'Sorry, but you are not allowed to use this feature.', Save and close. ****** Step 4 ****** Open Online.php **** FIND **** //-------------------------------------------- // Require the HTML and language modules //-------------------------------------------- $ibforums->lang = $std->load_words($ibforums->lang, 'lang_online', $ibforums->lang_id); $this->html = $std->load_template('skin_online'); $this->base_url = $ibforums->base_url; ********* ADD BELOW ********* //-------------------------------------------- // Check permissions //-------------------------------------------- $this->member = $ibforums->member; if (empty($this->member['g_view_online'])) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_online' ) ); } if (empty($this->member['id'])) { $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) ); } Save and close. YAY! You are done! For support please visit IBPlanet.com. <?php /* +--------------------------------------------------------------------------+ | Hacking the DB! +--------------------------------------------------------------------------+ */ require "conf_global.php"; require "sources/functions.php"; $file = "Online List Permissions"; $file2 = "Online List Permissions Installer"; $std = new FUNC; $input = $std->parse_incoming(); //-------------------------------- // Load the DB driver and such //-------------------------------- $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(); if ($input['act'] == "") { print "<HEAD><TITLE>$file Installer</TITLE></HEAD> <span style='text-transform: capitalize'> <table align=center cellspacing=0 cellpadding=0 style='border: solid black 1px' width=602> <tr valign=top><td align=center valign=bottom colspan=2 width=600 style='border-bottom: solid black 1px'> Adding Permission Table</td></tr> <tr><td align=center colspan=2 style='border-bottom: solid black 1px' width=600> <b><font size=4 color=000000>$file2</font></td></tr> <tr><td valign=top align=center style='border-right: solid black 1px' width=140> <b>$file</b><hr><p> [ <a href=?act=install>Install Now</a> ]</td> <td align=center width=459> $file2<br> Please select install.<br><br> </table></span>"; } else if ($input['act'] == "install") { $query1="ALTER TABLE ibf_groups ADD g_view_online tinyint(1)"; $DB->query($query1); print "<title>$file Installation</title> <span style='text-transform: capitalize'> <table align=center cellspacing=0 cellpadding=0 style='border: solid black 1px' width=602> <tr valign=top><td align=center valign=bottom colspan=2 width=600 style='border-bottom: solid black 1px'> Online List permissions Database Installer</td></tr> <tr><td align=center colspan=2 style='border-bottom: solid black 1px' width=600> <font size=4><b>This will magically add the permission table to your forum!</font></td></tr> <tr> <td valign=top align=center style='border-right: solid black 1px' width=130> <b>$file2 </b><hr> <p>Installing....<p><b>Finished!</b></td> <td align=center width=469> <br> Congratulations, you have finished the $file Installation.<br> Please Delete this file right now!<p> <br></table></span>"; } ?> Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.