View Single Post
  #35  
Old 07-25-2002, 04:02 AM
Brianna Brianna is offline
 
Join Date: Mar 2002
Location: home
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mei, you are right it is the same thing in both lines: replace it with this instead
Code:
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='".intval($customtitle)."',usertitle='".addslashes($customtext)."',email='".addslashes(htmlspecialchars($email))."',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser='$coppauser',homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',element='".addslashes(htmlspecialchars($element))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

Also, I added something small, but it makes the hack look better to users:

Instead of "None" being selected for the Element everytime a user goes to update their profile, I added some simple javascript to determine which Element the user currently has in their profile

first off add this into the head tag of the modifyprofile template:
Code:
<script language="Javascript" type="text/javascript">
function isselected(elemental, elementsinprofile)
{
  if (elementsinprofile == elemental )
 {
   document.write("<option value='"+elemental+"' selected>")
 }else{
   document.write("<option value='"+elemental+"'>")
 }
}
</script>
then replace this code (at the bottom of the same template):
Code:
		<select name="element">
                              
		<option value="0" selected>None</option>
		<option value="1" >Light</option>
		<option value="2" >Water</option>
		<option value="3" >Wind</option>
		<option value="4" >Lightning</option>
		<option value="5" >Earth</option>
		<option value="6" >Fire</option>
		<option value="7" >Dark</option>
	
          

		</select>
with:
Code:
		<select name="element">
                              
		<script>isselected("0", $bbuserinfo[element])</script>None</option>
		<script>isselected("1", $bbuserinfo[element])</script>Light</option>
		<script>isselected("2", $bbuserinfo[element])</script>Water</option>
		<script>isselected("3", $bbuserinfo[element])</script>Wind</option>
		<script>isselected("4", $bbuserinfo[element])</script>Lightning</option>
		<script>isselected("5", $bbuserinfo[element])</script>Earth</option>
		<script>isselected("6", $bbuserinfo[element])</script>Fire</option>
		<script>isselected("7", $bbuserinfo[element])</script>Dark</option>
	
          

		</select>
Feel free to add that into the original guys ^_^ Sweet hack! Better than the last HP/MP/Exp hack I had before I had to redo everything and import hackless tables I like the idea of mods/admins being able to adjust the stats to use them better in leiu of the Battle Square forum XD This is gonna be great! Thanks guys ^_^
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02952 seconds
  • Memory Usage 1,778KB
  • 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
  • (4)bbcode_code
  • (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