View Single Post
  #1  
Old 02-06-2002, 10:45 AM
badr511 badr511 is offline
 
Join Date: Dec 2001
Location: asia
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

firefly look this code, iwant use this code in vbulletin board

######
1) Open thread.php
######
- Search for:
eval ("\$thread_postbit .= \"".gettemplate("thread_postbit")."\";");

- Add ABOVE it:
$reg_date = (time() - $posts[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $posts[userposts];
else $postsperday = $posts[userposts] / $reg_date;

$level = pow (log10 ($posts[userposts]), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($postsperday / 6, 1);
if ($hpmulti > 1.5) {
$hpmulti = 1.5;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}

$maxhp = $level * 25 * $hpmulti;
$hp= $postsperday / 5;
if ($hp >= 1) {
$hp= $maxhp;
} else {
$hp= floor ($hp * $maxhp);
}
$hp= floor ($hp);
$maxhp= floor ($maxhp);
if ($maxhp <= 0) {
$zhp = 1;
} else {
$zhp = $maxhp;
}
$hpf= floor (100 * ($hp / $zhp)) - 1;

$maxmp= ($reg_date * $level) / 5;
$mp= $posts[userposts] / 3;
if ($mp >= $maxmp) {
$mp = $maxmp;
}
$maxmp = floor ($maxmp);
$mp = floor ($mp);
if ($maxmp <= 0) {
$zmp = 1;
} else {
$zmp = $maxmp;
}
$mpf= floor (100 * ($mp / $zmp)) - 1;

######
2) Open search.php
######
- Search for:
eval ("\$thread_postbit .= \"".gettemplate("thread_postbit")."\";");

- Add ABOVE it:
$reg_date = (time() - $posts[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $posts[userposts];
else $postsperday = $posts[userposts] / $reg_date;

$level = pow (log10 ($posts[userposts]), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($postsperday / 6, 1);
if ($hpmulti > 1.5) {
$hpmulti = 1.5;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}

$maxhp = $level * 25 * $hpmulti;
$hp= $postsperday / 5;
if ($hp >= 1) {
$hp= $maxhp;
} else {
$hp= floor ($hp * $maxhp);
}
$hp= floor ($hp);
$maxhp= floor ($maxhp);
if ($maxhp <= 0) {
$zhp = 1;
} else {
$zhp = $maxhp;
}
$hpf= floor (100 * ($hp / $zhp)) - 1;

$maxmp= ($reg_date * $level) / 5;
$mp= $posts[userposts] / 3;
if ($mp >= $maxmp) {
$mp = $maxmp;
}
$maxmp = floor ($maxmp);
$mp = floor ($mp);
if ($maxmp <= 0) {
$zmp = 1;
} else {
$zmp = $maxmp;
}
$mpf= floor (100 * ($mp / $zmp)) - 1;

######
3) Open members.php
######
- Search for:
eval("dooutput(\"".gettemplate("members_profile"). "\");");

- Add ABOVE it:
$reg_date = (time() - $user_info[regdate]) / 86400;
if ($reg_date < 1) $postsperday = $user_info[userposts];
else $postsperday = $user_info[userposts] / $reg_date;

$level = pow (log10 ($user_info[userposts]), 3);
$ep = floor (100 * ($level - floor ($level)));
$showlevel = floor ($level + 1);
$hpmulti =round ($postsperday / 6, 1);
if ($hpmulti > 1.5) {
$hpmulti = 1.5;
}
if ($hpmulti < 1) {
$hpmulti = 1;
}

$maxhp = $level * 25 * $hpmulti;
$hp= $postsperday / 5;
if ($hp >= 1) {
$hp= $maxhp;
} else {
$hp= floor ($hp * $maxhp);
}
$hp= floor ($hp);
$maxhp= floor ($maxhp);
if ($maxhp <= 0) {
$zhp = 1;
} else {
$zhp = $maxhp;
}
$hpf= floor (100 * ($hp / $zhp)) - 1;

$maxmp= ($reg_date * $level) / 5;
$mp= $user_info[userposts] / 3;
if ($mp >= $maxmp) {
$mp = $maxmp;
}
$maxmp = floor ($maxmp);
$mp = floor ($mp);
if ($maxmp <= 0) {
$zmp = 1;
} else {
$zmp = $maxmp;
}
$mpf= floor (100 * ($mp / $zmp)) - 1;

######
4) Open misc.php
######
- Search for:
require("_board_jump.php");

Add UNDER it:
if($info == "level") {
eval("dooutput(\"".gettemplate("level_info")."\"); ");
}

=====================================
5) Open templates/thread_postbit.htm
=====================================
- Search for:
$user_on_off

- ADD UNDER it:
<br><br>
Level: $showlevel [<a href="#" onClick="openWindow('misc.php?info=level','Experie nce','width=530,height=200')"> ?</a>]<br>
HP: $hp / $maxhp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bhg.gif" width="$hpf%" height="9"><img src="images/bar/bhb.gif" width="1" height="9"></td>
</tr>
</table>
MP: $mp / $maxmp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bmg.gif" width="$mpf%" height="9"><img src="images/bar/bmb.gif" width="1" height="9"></td>
</tr>
</table>
Exp: $ep%
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bxg.gif" width="$ep%" height="9"><img src="images/bar/bxb.gif" width="1" height="9"></td>
</tr>
</table>
<br>
================================================== ==========


=====================================
6) Open templates/members_profile.htm
=====================================

- Search for:
=================
Usertext
=================

- Replace with:
===============
Usertext/Stats
===============
-
-
-
- Search for:
================================================== ========================
<FONT face="{font}" size=2>$user_text</font>

- Add AFTER it:
<br><br><hr width="100%" color="{tablea}" noShade size=1><FONT face="{font}" size=1>
Level: $showlevel [<a href="#" onClick="openWindow('misc.php?info=level','Experie nce','width=530,height=200')"> ?</a>]<br>
HP: $hp / $maxhp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bhg.gif" width="$hpf%" height="9"><img src="images/bar/bhb.gif" width="1" height="9"></td>
</tr>
</table>
MP: $mp / $maxmp
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bmg.gif" width="$mpf%" height="9"><img src="images/bar/bmb.gif" width="1" height="9"></td>
</tr>
</table>
Exp: $ep%
<table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
<tr>
<td bgcolor="#9999FF"><img src="images/bar/bxg.gif" width="$ep%" height="9"><img src="images/bar/bxb.gif" width="1" height="9"></td>
</tr>
</table></font>

================================================== ========================

=====================================
7) Open templates/headerinclude.htm
=====================================
At the end of the file, add:
<script language="JavaScript">
<!--
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01993 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete