资源说明:A modification for Fluxbb
******************************************************************** F L U X B B M O D I F I C A T I O N ******************************************************************** Name: Usermap Author: GizzmoVersion: 1.1.1 Release date: April 13th 2011 Works on: 1.4.5 ******************************************************************** DISCLAIMER: Mods are not officially supported by FluxBB. Installation of this modification is done at your own risk. Backup your forum database and any and all applicable files before proceeding. DESCRIPTION: This modification allows users on your site to share their location on a global map. Other users can view the global map to see everyone's location. AFFECTED FILES: include/common.php include/functions.php header.php profile.php AFFECTED DATABASE: config users groups NOTES: - All options and group permissions settings are found through the "Usermap Settings" plugin, link found at the bottom of the admin menu. - Each group has a set of permissions. They have permission to view the map (good for not allowing guests viewing the map). They also have permission to add their location to the map (good for new members, so the map doesn't get spammed). - Each group also can have an icon for the map, so they stand out when others view the map. - If you want to you can view your users location in Google Earth, by downloading the file here: /usermap/list.php?kml Access to this is also protected by the group permissions. ******************************************************************** INSTALLATION: 1. Upload the following files to the root directory of your forum. usermap/ (folder) plugins/ (folder) install_mod.php usermap.php 2. Run and then delete the 'install_mod.php' file to install the database changes. 4. Follow the following steps to make the changes to files. ******************************************************************** #-------[ 1. Open ] include/common.php ******************************************************************** #-------[ 2. Place at end of the file ] // Usermap by Gizzmo - START // Require things like functions or language files require PUN_ROOT.'usermap/include.php'; // Usermap by Gizzmo - END ******************************************************************** #-------[ 3. Open ] include/functions.php ******************************************************************** #-------[ 4. Find (line: 516) ] '', 'googleapi' => '', // Context Menu 'contextmenuCSS' => '', 'contextmenuJS' => '', // The Core 'css' => '', 'core' => '' ); // code ob_start(); ?>
- >
- >
******************************************************************** #-------[ 5. After Add ] '.$lang_usermap['User map'].''."\n"; // Usermap by Gizzmo - END ?> ******************************************************************** #-------[ 6. Open ] header.php ******************************************************************** #-------[ 7. Find (line: 185) ] // Index should always be displayed $links[] = ' '; if ($pun_user['g_read_board'] == '1' && $pun_user['g_view_users'] == '1') $links[] = ' '; ******************************************************************** #-------[ 8. After Add ] // Usermap by Gizzmo - START global $lang_usermap; // This is here to so $lang_usermap is accessable when message() is called if ($pun_user['g_view_users'] == '1' && $pun_user['g_um_view_map'] == '1') $links[] = ' '; // Usermap by Gizzmo - END ******************************************************************** #-------[ 9. Open ] profile.php ******************************************************************** #-------[ 10. Find (line: 866) ] if ($form['email_setting'] < 0 || $form['email_setting'] > 2) $form['email_setting'] = $pun_config['o_default_email_setting']; break; } ******************************************************************** #-------[ 11. After Add ] // Usermap by Gizzmo - START case 'usermap': { if ($pun_user['g_um_add_to_map'] == '0') message($lang_common['No permission']); $form = array( 'um_lat' => pun_trim($_POST['form']['um_lat']), 'um_lng' => pun_trim($_POST['form']['um_lng']), 'um_scrollwheel' => isset($_POST['form']['um_scrollwheel']) ? '1' : '0', ); // if any of them are not numeric, or they are empty, they all are set to NULL if (!is_numeric($form['um_lat']) || !is_numeric($form['um_lng']) || (empty($form['um_lat']) && empty($form['um_lng']))) $form['um_lat'] = $form['um_lng'] = ''; break; } // Usermap by Gizzmo - END ******************************************************************** #-------[ 12. Find (line: 953) ] $result = $db->query('SELECT u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.notify_with_post, u.auto_notify, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.dst, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, u.date_format, u.time_format, u.last_visit, g.g_id, g.g_user_title, g.g_moderator FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); ******************************************************************** #-------[ 13. Replace With ] // Usermap by Gizzmo - CHANGED // NOTE: only added 'u.um_lat, u.um_lng, u.um_scrollwheel,' $result = $db->query('SELECT u.um_lat, u.um_lng, u.um_scrollwheel, u.username, u.email, u.title, u.realname, u.url, u.jabber, u.icq, u.msn, u.aim, u.yahoo, u.location, u.signature, u.disp_topics, u.disp_posts, u.email_setting, u.notify_with_post, u.auto_notify, u.show_smilies, u.show_img, u.show_img_sig, u.show_avatars, u.show_sig, u.timezone, u.dst, u.language, u.style, u.num_posts, u.last_post, u.registered, u.registration_ip, u.admin_note, u.date_format, u.time_format, u.last_visit, g.g_id, g.g_user_title, g.g_moderator FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error()); ******************************************************************** #-------[ 14. Find (line 1770) ]
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。