Tarih: 2006-06-13, 00:23:10 Mesaj konusu: memberlist mödülünde ilginç bir hata
sitemde memberlist modülü çalışıyo ama oradan herhangi bir üyeyenin üzerine tıkladığımda üye profili gelmiyo bu sorunu nasıl çözebiliriz yardımlarınızı bekliyorum ii çalışmalar
Tarih: 2006-06-25, 14:04:45 Mesaj konusu: Re: memberlist mödülünde ilginç bir hata
Forums/profile.php
Kod:
<?php
/***************************************************************************
* profile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* Id: profile.php,v 1.193.2.5 2004/11/18 17:49:37 acydburn Exp
*
*
***************************************************************************/
/***************************************************************************
*
* 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, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
if ($popup != "1"){
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");
}
else
{
$phpbb_root_path = 'modules/Forums/';
}
<?php
/***************************************************************************
* sessions.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* Id: sessions.php,v 1.58.2.14 2005/05/06 20:50:11 acydburn Exp
*
*
***************************************************************************/
/***************************************************************************
*
* 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, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
//
// Adds/updates a new session to the database for the given userid.
// Returns the new session ID on success.
//
function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0)
{
global $db, $board_config, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$c o o k i ename = $board_config['c o o k i e_name'];
$c o o k i epath = $board_config['c o o k i e_path'];
$c o o k i edomain = $board_config['c o o k i e_domain'];
$c o o k i esecure = $board_config['c o o k i e_secure'];
if ( isset($HTTP_COOKIE_VARS[$c o o k i ename . '_sid']) || isset($HTTP_COOKIE_VARS[$c o o k i ename . '_data']) )
{
$session_id = isset($HTTP_COOKIE_VARS[$c o o k i ename . '_sid']) ? $HTTP_COOKIE_VARS[$c o o k i ename . '_sid'] : '';
$sessiondata = isset($HTTP_COOKIE_VARS[$c o o k i ename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$c o o k i ename . '_data'])) : array();
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
//
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
$session_id = '';
}
//
// Try and pull the last time stored in a c o o k i e, if it exists
//
$sql = "SELECT *
FROM " . USERS_TABLE . "
WHERE user_id = '$user_id'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not obtain lastvisit data from user table', '', __LINE__, __FILE__, $sql);
}
$userdata = $db->sql_fetchrow($result);
if ( $user_id != ANONYMOUS )
{
$auto_login_key = $userdata['user_password'];
if ( $auto_create )
{
if ( isset($sessiondata['autologinid']) && $userdata['user_active'] )
{
// We have to login automagically
if( $sessiondata['autologinid'] === $auto_login_key )
{
// autologinid matches password
$login = 1;
$enable_autologin = 1;
}
else
{
// No match; don't login, set as anonymous user
$login = 0;
$enable_autologin = 0;
$user_id = $userdata['user_id'] = ANONYMOUS;
$sql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS;
$result = $db->sql_query($sql);
$userdata = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
}
}
else
{
// Autologin is not set. Don't login, set as anonymous user
$login = 0;
$enable_autologin = 0;
$user_id = $userdata['user_id'] = ANONYMOUS;
setc o o k i e($c o o k i ename . '_data', serialize($sessiondata), $current_time + 31536000, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
setc o o k i e($c o o k i ename . '_sid', $session_id, 0, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
$SID = 'sid=' . $session_id;
return $userdata;
}
//
// Checks for a given user session, tidies session table and updates user
// sessions at each page refresh
//
function session_pagestart($user_ip, $thispage_id, $nukeuser)
{
global $db, $lang, $board_config, $session_id, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$c o o k i ename = $board_config['c o o k i e_name'];
$c o o k i epath = $board_config['c o o k i e_path'];
$c o o k i edomain = $board_config['c o o k i e_domain'];
$c o o k i esecure = $board_config['c o o k i e_secure'];
$current_time = time();
unset($userdata);
if ( isset($HTTP_COOKIE_VARS[$c o o k i ename . '_sid']) || isset($HTTP_COOKIE_VARS[$c o o k i ename . '_data']) )
{
$sessiondata = isset( $HTTP_COOKIE_VARS[$c o o k i ename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$c o o k i ename . '_data'])) : array();
$session_id = isset( $HTTP_COOKIE_VARS[$c o o k i ename . '_sid'] ) ? $HTTP_COOKIE_VARS[$c o o k i ename . '_sid'] : '';
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$sessiondata = array();
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
$session_id = '';
}
if ( ($nukeuser != "") && ($userdata['session_logged_in'] == "" )) {
bblogin($nukeuser, $session_id);
} else {
$thispage_id = (int) $thispage_id;
}
//
// Does a session exist?
//
if ( !empty($session_id) )
{
//
// session_id exists so go ahead and attempt to grab all
// data in preparation
//
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
WHERE s.session_id = '$session_id'
AND u.user_id = s.session_user_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
}
$userdata = $db->sql_fetchrow($result);
//
// Did the session exist in the DB?
//
if ( isset($userdata['user_id']) )
{
//
// Do not check IP assuming equivalence, if IPv4 we'll check only first 24
// bits ... I've been told (by vHiker) this should alleviate problems with
// load balanced et al proxies while retaining some reliance on IP security.
//
$ip_check_s = substr($userdata['session_ip'], 0, 6);
$ip_check_u = substr($user_ip, 0, 6);
//
// Only update session DB a minute or so after last update
//
if ( $current_time - $userdata['session_time'] > 60 )
{
// A little trick to reset session_admin on session re-usage
$update_admin = (!defined('IN_ADMIN') && $current_time - $userdata['session_time'] > ($board_config['session_length']+60)) ? ', session_admin = 0' : '';
setc o o k i e($c o o k i ename . '_data', serialize($sessiondata), $current_time + 31536000, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
setc o o k i e($c o o k i ename . '_sid', $session_id, 0, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
}
return $userdata;
}
}
}
//
// If we reach here then no (valid) session exists. So we'll create a new one,
// using the c o o k i e user_id if available to pull basic user prefs.
//
$user_id = ( isset($sessiondata['userid']) ) ? intval($sessiondata['userid']) : ANONYMOUS;
if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )
{
message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);
}
return $userdata;
}
//
// session_end closes out a session
// deleting the corresponding entry
// in the sessions table
//
function session_end($session_id, $user_id)
{
global $db, $lang, $board_config, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
$c o o k i ename = $board_config['c o o k i e_name'];
$c o o k i epath = $board_config['c o o k i e_path'];
$c o o k i edomain = $board_config['c o o k i e_domain'];
$c o o k i esecure = $board_config['c o o k i e_secure'];
$current_time = time();
//
// Pull c o o k i edata or grab the URI propagated sid
//
if ( isset($HTTP_COOKIE_VARS[$c o o k i ename . '_sid']) )
{
$session_id = isset( $HTTP_COOKIE_VARS[$c o o k i ename . '_sid'] ) ? $HTTP_COOKIE_VARS[$c o o k i ename . '_sid'] : '';
$sessionmethod = SESSION_METHOD_COOKIE;
}
else
{
$session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : '';
$sessionmethod = SESSION_METHOD_GET;
}
if (!preg_match('/^[A-Za-z0-9]*$/', $session_id))
{
return;
}
//
// Delete existing session
//
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_id = '$session_id'
AND session_user_id = '$user_id'";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
}
setc o o k i e($c o o k i ename . '_data', '', $current_time - 31536000, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
setc o o k i e($c o o k i ename . '_sid', '', $current_time - 31536000, $c o o k i epath, $c o o k i edomain, $c o o k i esecure);
return true;
}
//
// Append $SID to a url. Borrowed from phplib and modified. This is an
// extra routine utilised by the session code above and acts as a wrapper
// around every single URL and form action. If you replace the session
// code you must include this routine, even if it's empty.
//
function append_sid($url, $non_html_amp = false)
{
global $SID, $admin, $userdata;
if (ereg("admin=1", $url) || ereg("admin_", $url) || ereg("pane=", $url)){
// The format is fine, don't change a thing.
} else if (ereg("Your_Account", $url)){
$url = str_replace(".php", "", $url); // Strip the .php from all the files,
$url = str_replace("modules", "modules.php", $url); // and put it back for the modules.php
}
else if (ereg("redirect", $url))
{
$url = str_replace("login.php", "modules.php?name=Your_Account", $url); // Strip the .php from all the files,
$url = str_replace(".php", "", $url); // Strip the .php from all the files,
$url = str_replace("?redirect", "&redirect", $url); // Strip the .php from all the files,
$url = str_replace("modules", "modules.php", $url); // and put it back for the modules.php
}
else if (ereg("menu=1", $url))
{
$url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
$url = str_replace(".php", "", $url); // Strip the .php from all the files,
$url = "../../../modules.php?name=Forums&file=$url";
}
else if ((ereg("privmsg", $url)) && (!ereg("highlight=privmsg", $url)))
{
$url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
$url = str_replace("privmsg.php", "modules.php?name=Private_Messages&file=index", $url); // and put it back for the modules.php
}
else if ((ereg("profile", $url)) && (!ereg("highlight", $url) && !ereg("profile", $url)))
{
$url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
$url = str_replace("profile.php", "forumlar.html&file=profile", $url); // and put it back for the modules.php
$dummy = 1;
}
else if ((ereg("memberlist", $url)) && (!ereg("highlight=memberlist", $url)))
{
$url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
$url = str_replace("memberlist.php", "modules.php?name=Members_List&file=index", $url); // and put it back for the modules.php
} else {
$url = str_replace("?", "&", $url); // As we are already in nuke, change the ? to &
$url = str_replace(".php", "", $url);
$url = "forumlar.html&file=".$url; //Change to Nuke format
}
Warning: themeheader(banners.php): failed to open stream: No such file or directory in /home/forever/public_html/v1/themes/BEST/theme.php on line 35
Warning: themeheader(banners.php): failed to open stream: No such file or directory in /home/forever/public_html/v1/themes/BEST/theme.php on line 35
Warning: themeheader(banners.php): failed to open stream: No such file or directory in /home/forever/public_html/v1/themes/BEST/theme.php on line 35
Warning: themeheader(): Failed opening 'banners.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/forever/public_html/v1/themes/BEST/theme.php on line 35
display eroru 0 dı 1 yaptım sonra üye listesine tıkladım profil kısmında yukarıdaki hatayı verdi hatayı her sayfada gösteriyo ben mi hata yaptım yoksa ???
Tarih: 2006-07-01, 00:25:38 Mesaj konusu: Re: memberlist mödülünde ilginç bir hata
Kod:
<?php
/***************************************************************************
* usercp_viewprofile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* Id: usercp_viewprofile.php,v 1.5.2.5 2005/07/19 20:01:16 acydburn Exp
*
*
***************************************************************************/
/***************************************************************************
*
* 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, or
* (at your option) any later version.
*
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
//
// Output page header and profile_view template
//
$template->set_filenames(array(
'body' => 'profile_view_body.tpl')
);
if (is_active("Forums")) {
make_jumpbox('viewforum.'.$phpEx);
}
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$nukedate = strtotime($regdate);
$memberdays = max(1, round( ( time() - $nukedate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;
// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0 )
{
$total_posts = get_db_stat('postcount');
$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
$percentage = 0;
}
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) .
/* BEGIN LEVEL MOD */
'HP' => $level_hp,
'HP_WIDTH' => $level_hp_percent,
'HP_EMPTY' => ( 100 - $level_hp_percent ),
'MP' => $level_mp,
'MP_WIDTH' => $level_mp_percent,
'MP_EMPTY' => ( 100 - $level_mp_percent ),
'EXP' => $level_exp,
'EXP_WIDTH' => $level_exp_percent,
'EXP_EMPTY' => ( 100 - $level_exp_percent ),
'LEVEL' => $level_level,
/* END LEVEL MOD */
"&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'],* Begin HP/MP/EXP Mod
*
* Note: all new variables used created in this mod
* are prefixed with level_ to be sure of not overwriting
* other variables.
*
*/
/* Calculate Level
* A user's level is determined by their total number of posts.
* A nice mathmatical formula is used to translate their post count
* into an intager level.
*
* Note: A user with zero (0) posts is considered level 0, however
* making one (1) post, raises them to level 1.
*
*/
/* Determine Hit Points (HP)
*
* Hp is based on user activity.
* Max HP is based on the user's level, and will generally
* be the same for all users of the same level.
*
* A user's current HP is based on the user's posts per day.
* A higher post per day (ppd), the more HP they will have. A
* user with an average PPD (set below) will have 50% of their
* max HP. As a user goes over the average PPD, they will have
* more HP, but the gains will decrease as the user's PPD increases.
* This makes achieving 100% hp difficult, but not impossible.
*
* For users with under the average PPD, they will have HP equal
* to 1/2 the percentage their ppd is of the average.
* ie- a user with 2.5 ppd, and an average ppd of 5 will have
* 25% of their max HP. This is because 2.5 is 50% of 5, and 1/2
* of that, is 25%.
*
* Users who manage to post so far above the average that they have
* more HP than their max will recieve a bonus to their max HP.
*
* Note that users at level 0 will always have 0 / 0 hp.
*
*/
/*
* This value determines the 'average' posts per day.
* The admin may redefine this variable as he wishes.
* Higher values will generally decrease users' HP, and
* lower values will generally increase users' HP.
*
* Note: Do NOT set this value to zero (0).
* This -may- be set to a fractional value (eg, 5.1, 3.1415)
*
*/
$level_avg_ppd = 5;
/*
* this value sets how hard it is to achieve 100%
* hp. The higher you set it, the harder it is to
* get full hp.
*
* to judge how high to set it, a user must have
* posts per day equal to the $level_avg_ppd plus
* the number set below.
*
* This should NOT be zero.
*/
if($level_hp_percent > 100)
{
//Give the user a bonus to max HP for greater than 100% hp.
$level_max_hp += floor( ($level_hp_percent - 100) * pi() );
$level_hp_percent = 100;
}
else
{
$level_hp_percent = max(0, $level_hp_percent);
}
//Be sure a user has no more than max, and no less than zero hp.
$level_cur_hp = max(0, $level_cur_hp);
$level_cur_hp = min($level_max_hp, $level_cur_hp);
/* Determine MP
*
* MP is calculated by how long the user has been around
* and how often they post.
*
* Max MP is based on level, and increases with level
* Each post a user makes costs them mp,
* and a user regenerates mp proportional to how
* many days they have been registered
*
*/
//Number of days the user has been at the forums.
$level_user_days = max(1, round( ( time() - strtotime($profiledata['user_regdate']) ) / 86400 ));
/* The mp cost for one post.
* Raising this value will generally decrease the current
* mp for most posters.
* This may be set to a decimal value (eg, 2, 2.1, 3.141596)
* This should NOT be set to 0
*/
$level_post_mp_cost = 2.5;
/* This determines how much mp a user regenerates per day
* Raising this value will generally increase the current
* mp for most posters.
* This may be set to a decimal value (eg, 3, 3.5, 2.71828)
* This should NOT be set to 0
*/
$level_mp_regen_per_day = 4;
/* Determine EXP percentage
*
* Experience is determined by how far the user is away
* from the next level. This is expressed as a percentage.
*
* Note, a user of level 0 has 100% experience. Making one post
* will put them at level 1. Also, a user that is shown to have 100%
* experience, will go up a level on their next post.
*
*/
Tarih: 2006-07-01, 00:42:57 Mesaj konusu: Re: memberlist mödülünde ilginç bir hata
Kod:
<?php
/***************************************************************************
* usercp_viewprofile.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* Id: usercp_viewprofile.php,v 1.5.2.5 2005/07/19 20:01:16 acydburn Exp
*
*
***************************************************************************/
/***************************************************************************
*
* 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, or
* (at your option) any later version.
*
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
//
// Output page header and profile_view template
//
$template->set_filenames(array(
'body' => 'profile_view_body.tpl')
);
if (is_active("Forums")) {
make_jumpbox('viewforum.'.$phpEx);
}
//
// Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day
//
$regdate = $profiledata['user_regdate'];
$nukedate = strtotime($regdate);
$memberdays = max(1, round( ( time() - $nukedate ) / 86400 ));
$posts_per_day = $profiledata['user_posts'] / $memberdays;
// Get the users percentage of total posts
if ( $profiledata['user_posts'] != 0 )
{
$total_posts = get_db_stat('postcount');
$percentage = ( $total_posts ) ? min(100, ($profiledata['user_posts'] / $total_posts) * 100) : 0;
}
else
{
$percentage = 0;
}
'EXP' => $level_exp,
'EXP_WIDTH' => $level_exp_percent,
'EXP_EMPTY' => ( 100 - $level_exp_percent ),
'LEVEL' => $level_level,
/* END LEVEL MOD */
"&showresults=posts");
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'],* Begin HP/MP/EXP Mod
/*
* Note: all new variables used created in this mod
* are prefixed with level_ to be sure of not overwriting
* other variables.
*
*/
/* Calculate Level
* A user's level is determined by their total number of posts.
* A nice mathmatical formula is used to translate their post count
* into an intager level.
*
* Note: A user with zero (0) posts is considered level 0, however
* making one (1) post, raises them to level 1.
*
*/
/* Determine Hit Points (HP)
*
* Hp is based on user activity.
* Max HP is based on the user's level, and will generally
* be the same for all users of the same level.
*
* A user's current HP is based on the user's posts per day.
* A higher post per day (ppd), the more HP they will have. A
* user with an average PPD (set below) will have 50% of their
* max HP. As a user goes over the average PPD, they will have
* more HP, but the gains will decrease as the user's PPD increases.
* This makes achieving 100% hp difficult, but not impossible.
*
* For users with under the average PPD, they will have HP equal
* to 1/2 the percentage their ppd is of the average.
* ie- a user with 2.5 ppd, and an average ppd of 5 will have
* 25% of their max HP. This is because 2.5 is 50% of 5, and 1/2
* of that, is 25%.
*
* Users who manage to post so far above the average that they have
* more HP than their max will recieve a bonus to their max HP.
*
* Note that users at level 0 will always have 0 / 0 hp.
*
*/
/*
* This value determines the 'average' posts per day.
* The admin may redefine this variable as he wishes.
* Higher values will generally decrease users' HP, and
* lower values will generally increase users' HP.
*
* Note: Do NOT set this value to zero (0).
* This -may- be set to a fractional value (eg, 5.1, 3.1415)
*
*/
$level_avg_ppd = 5;
/*
* this value sets how hard it is to achieve 100%
* hp. The higher you set it, the harder it is to
* get full hp.
*
* to judge how high to set it, a user must have
* posts per day equal to the $level_avg_ppd plus
* the number set below.
*
* This should NOT be zero.
*/
if($level_hp_percent > 100)
{
//Give the user a bonus to max HP for greater than 100% hp.
$level_max_hp += floor( ($level_hp_percent - 100) * pi() );
$level_hp_percent = 100;
}
else
{
$level_hp_percent = max(0, $level_hp_percent);
}
//Be sure a user has no more than max, and no less than zero hp.
$level_cur_hp = max(0, $level_cur_hp);
$level_cur_hp = min($level_max_hp, $level_cur_hp);
/* Determine MP
*
* MP is calculated by how long the user has been around
* and how often they post.
*
* Max MP is based on level, and increases with level
* Each post a user makes costs them mp,
* and a user regenerates mp proportional to how
* many days they have been registered
*
*/
//Number of days the user has been at the forums.
$level_user_days = max(1, round( ( time() - strtotime($profiledata['user_regdate']) ) / 86400 ));
/* The mp cost for one post.
* Raising this value will generally decrease the current
* mp for most posters.
* This may be set to a decimal value (eg, 2, 2.1, 3.141596)
* This should NOT be set to 0
*/
$level_post_mp_cost = 2.5;
/* This determines how much mp a user regenerates per day
* Raising this value will generally increase the current
* mp for most posters.
* This may be set to a decimal value (eg, 3, 3.5, 2.71828)
* This should NOT be set to 0
*/
$level_mp_regen_per_day = 4;
/* Determine EXP percentage
*
* Experience is determined by how far the user is away
* from the next level. This is expressed as a percentage.
*
* Note, a user of level 0 has 100% experience. Making one post
* will put them at level 1. Also, a user that is shown to have 100%
* experience, will go up a level on their next post.
*
*/
tamam oldu sonsuz teşekkürlerimi sunuyorum size saolun orjinali attım birde level mod hala çalışıyo hata vermedi buda beni çok sevindirdi inşalahta hata vermez
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız