Home - Watched Topics - FAQ - Member List - Groups - Edit Profile - Search - Slot Machine - Drawing - Play Flash Games


Login to Disable the Ads

Login or Click Here to Register
Username:    Password:      Log me on automatically each visit    
 Log in to check your private messages  -  Log in
Nation Name Mod
 
Post new topic   Reply to topic    Heroes of Gaming Forum Index -> Announcements and Site Topics -> Suggestions
Author Message
Kidd Rune3
Banned
Banned


Joined: 26 May 2006
Posts: 1898


1764668.02 Bronze Chips
0.00 Silver Chips
0.00 Gold Chips

PostPosted: Thu Aug 23, 2007 11:41 am    Post subject: Nation Name Mod Reply with quote

yeah i edited this mod. if u install in ur profile it shows a thing for your cn nation name so ppl dont ask me.

Code:
########################################################
##
## Hack Title:      Nation name Hack
## Hack Version:    1.0.0
## Description:     This hack adds a new field to the users information
##                  so they can include their Nation Name.
##         As seen on hacks.PhpBB.com/forums
##
## Installation Level:  Intermediate
## Installation Time:   1-5
## Files To Edit:       bb_profile.php, bb_register.php,
##         Viewtopic.php + DB
## Included Files:      N/A
##
########################################################
##
## Installation/Author Notes:
##
## Puts there Nation Name in here Profile and When they post it goes under their
## Username.
##
## BACK UP ALL FILES BEFORE TRYING THIS. THAT INCLUDES DB
##
########################################################
#
# BACK UP DATABASE
#
#-----[ Add to Database ]---------------------------------------
#

ALTER TABLE `users` ADD `users_name` VARCHAR(40) FIRST

#
# BACK UP BB_REGISTER.PHP
#
#-----[ Open: bb_register.php ]---------------------------------
#
#-----[ Find ]--------------------------------------------------
#
   $sql = "INSERT INTO users (user_id, username, user_regdate, user_email, user_icq, user_password, user_occ, user_intrest, user_from, user_website, user_sig, user_aim, user_viewemail, user_yim, user_msnm)
            VALUES ('$total', '$username', '$regdate', '$email', '$icq', '$passwd', '$occ', '$intrest', '$from', '$website', '$sig', '$aim', '$sqlviewemail', '$yim', '$msnm')";
#
#-----[ Replace With ]------------------------------------------
#
   $sql = "INSERT INTO users (users_name, user_id, username, user_regdate, user_email, user_icq, user_password, user_occ, user_intrest, user_from, user_website, user_sig, user_aim, user_viewemail, user_yim, user_msnm)
            VALUES ('$users_name', '$total', '$username', '$regdate', '$email', '$icq', '$passwd', '$occ', '$intrest', '$from', '$website', '$sig', '$aim', '$sqlviewemail', '$yim', '$msnm')";
#
#-----[ Find ]--------------------------------------------------
#
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b><?php echo $l_username?>: *</b></FONT><br><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize1?>" COLOR="<?php echo $textcolor?>">(<?php echo $l_useruniq?>)</FONT></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="username" SIZE="25" MAXLENGTH="40"></TD>
   </TR>
#
#-----[ Add Before ]------------------------------------------
#
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Nation Name: </b></FONT><br></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="users_name" SIZE="25" MAXLENGTH="40"></TD>
   </TR>
#
# BACK UP BB_PROFILE.PHP
#
#-----[ Open: bb_profile.php ]---------------------------------
#
#-----[ Find ]--------------------------------------------------
#
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b><?php echo $l_username?>:</FONT></b></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><?php echo $userdata[username]?></FONT>
           <font size=-2>(<a href="search.<?php echo $phpEx?>?term=&addterms=any&forum=all&search_username=<?php echo rawurlencode($userdata[username])?>&sortby=p.post_time&searchboth=both &submit=Search"><?php echo $l_viewpostuser?></a>)
           &nbsp;&nbsp;(<a href="sendpmsg.<?php echo $phpEx?>?tousername=<?php echo rawurlencode($userdata[username])?>"><?php echo $l_sendpmsg?></a>)</font></TD>
   </TR>
#
#-----[ Add After ]---------------------------------------------
#
<?php
if($userdata[users_name] == "") {
$users_name = "Not Given";
}else{
$users_name = $userdata[users_name];
}
?>
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Nation Name:</FONT></b></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><?php echo $userdata[users_name]?></FONT></TD>
   </TR>
#
#-----[ Find ]--------------------------------------------------
#
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b><?php echo $l_username?>: *</FONT></b></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>">
<?php
      if($allow_namechange) {
         echo "<input type=\"text\" name=\"user_name\" size=\"35\" maxlength=\"40\" value=\"$userdata[username]\">";
      }
      else {
         echo $userdata[username];
      }
?>
          </FONT></TD>
   </TR>

#
#-----[ Add After ]---------------------------------------------
#
   <TR ALIGN="LEFT">
      <TD  BGCOLOR="<?php echo $color1?>" width="25%"><FONT FACE="<?php echo $FontFace?>" SIZE="<?php echo $FontSize2?>" COLOR="<?php echo $textcolor?>"><b>Nation name: </b></FONT><br></TD>
      <TD  BGCOLOR="<?php echo $color2?>"><INPUT TYPE="TEXT" NAME="users_name" SIZE="25" MAXLENGTH="40" VALUE="<?php echo $userdata[users_name]?>"></TD>
   </TR>
#
#-----[ Find ]--------------------------------------------------
#
       if($new_name) {
          $sql = "UPDATE users SET username = '$user_name', user_password = '$md_pass', user_icq = '$icq', user_occ = '$occ', user_intrest = '$intrest', user_from = '$from', user_website = '$website', user_sig = '$sig', user_email = '$email', user_viewemail = '$viewemail', user_aim = '$aim', user_yim = '$yim', user_msnm = '$msnm' WHERE (user_id = '$user_id')";
       }
       else {
          $sql = "UPDATE users SET user_password = '$md_pass', user_icq = '$icq', user_occ = '$occ', user_intrest = '$intrest', user_from = '$from', user_website = '$website', user_sig = '$sig', user_email = '$email', user_viewemail = '$viewemail', user_aim = '$aim', user_yim = '$yim', user_msnm = '$msnm' WHERE (user_id = '$user_id')";
       }
#
#-----[ Replace With ]------------------------------------------
#

       if($new_name) {
          $sql = "UPDATE users SET users_name = '$users_name', username = '$user_name', user_password = '$md_pass', user_icq = '$icq', user_occ = '$occ', user_intrest = '$intrest', user_from = '$from', user_website = '$website', user_sig = '$sig', user_email = '$email', user_viewemail = '$viewemail', user_aim = '$aim', user_yim = '$yim', user_msnm = '$msnm' WHERE (user_id = '$user_id')";
       }
       else {
          $sql = "UPDATE users SET users_name = '$users_name', user_password = '$md_pass', user_icq = '$icq', user_occ = '$occ', user_intrest = '$intrest', user_from = '$from', user_website = '$website', user_sig = '$sig', user_email = '$email', user_viewemail = '$viewemail', user_aim = '$aim', user_yim = '$yim', user_msnm = '$msnm' WHERE (user_id = '$user_id')";
       }
#
# BACK UP VIEWTOPIC.PHP
#
#-----[ Open: viewtopic.php ]-----------------------------------
#
#-----[ Find 1.4.4 ]--------------------------------------------------------------------- ---
#
   echo "<TD valign=top><FONT FACE=\"$FontFace\" COLOR=\"$textcolor\"><b>$posterdata[username]</b></FONT>";
#
#-----[ Add After ]---------------------------------------------
#
   echo "<BR><FONT FACE=\"$FontFace\" SIZE=\"$FontSize1\" COLOR=\"$textcolor\">$posterdata[users_name]</FONT>";
#
#-----[ Find 1.4.2 ]--------------------------------------------------------------------- ----
#
   echo "<TD valign=top width=\"20%\"><FONT FACE=\"$FontFace\" COLOR=\"$textcolor\"><b>$posterdata[username]</b></FONT>";
#
#-----[ Add After ]---------------------------------------------
#
   echo "<BR><FONT FACE=\"$FontFace\" SIZE=\"$FontSize1\" COLOR=\"$textcolor\">$posterdata[users_name]</FONT>";
#
#---------------------------------------------------------------
#
EOF
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Heroes of Gaming Forum Index -> Suggestions All times are GMT - 8 Hours
Page 1 of 1

 



HeroesOfGaming.com | Cheat Codes | Shop | Calendar | Forum RPG | Flash Arcade Games | Bets

web counter   © 2005-2006 HeroesOfGaming.com / Powered by phpBB © 2001, 2005 phpBB Group / RSS Feed RSS Site Feed


Help Us Grow!