View Single Post
  #9  
Old 06-14-2001, 12:47 AM
RobAC RobAC is offline
 
Join Date: Oct 2001
Posts: 314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kevin,

Thanks, but this doesn't solve my original problem. That piece of code which you cited is what was missing out of member.php and did solve the problem for the Community Bulletin Generator hack, however, I used that same piece of code which wluke suggested but modified it with the correct variables. It still doesn't work.

Maybe I'm not explaining the problem clearly. I have set up two option in Edit Profile which are radio buttons (yes/no) asking the user if they are a member of a particular organization. Depending on what they choose, that option will show up as Yes or No in their Member Profile.

If you go into Edit Profile, both Yes and No are not checked. If you check one of them, the result will show up in the Member Profile. However, when you go back into Edit Profile, both options are unchecked again and if you make any other changes to profile and submit, it wipes out whatever was previously set for those two organizations thus wiping out the "Yes" or "No" in their profile. Here is the code I have in Member.php:

PHP Code:
  $DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='".addslashes($signature)."',customtitle='$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))."',msn='".addslashes(htmlspecialchars($msn))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',ncm='".addslashes(htmlspecialchars($ncm))."',ncrs='".addslashes(htmlspecialchars($ncrs))."',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");

  if (
$showbirthdays)
    
getbirthdays();
  
// insert custom user fields
  
$DB_site->query("UPDATE userfield SET userid=$bbuserinfo[userid]$userfields WHERE userid=$bbuserinfo[userid]");

if (
$bbuserinfo[ncm]) { 
$ncmchecked " checked"
$ncmnotchecked ""
} else { 
$ncmchecked""
$ncmnotchecked=" checked"


if (
$bbuserinfo[ncrs]) { 
$ncrschecked " checked"
$ncrsnotchecked ""
} else { 
$ncrschecked""
$ncrsnotchecked" checked"

I should probably also state, I have the fields in the database set to be varchar(4), Default=0

This is the code in the modifyprofile template:

PHP Code:
<tr>
    <
td bgcolor="{secondaltcolor}"><normalfont><b>National Corvette Museum member? (Yes/No)</b></normalfont></td>
    <
td bgcolor="{secondaltcolor}"><normalfont>

        <
input type="radio" name="ncm" value="Yes" $ncmcheckedyes
        
<input type="radio" name="ncm" value="No" $ncmnotcheckedno    </normalfont></td>
</
tr>
<
tr>
    <
td bgcolor="{firstaltcolor}"><normalfont><b>National Corvette Restorers Society member?</b></normalfont></td>
    <
td bgcolor="{firstaltcolor}"><normalfont>

        <
input type="radio" name="ncrs" value="Yes" $ncrscheckedyes
        
<input type="radio" name="ncrs" value="No" $ncrsnotcheckedno        </normalfont></td>
</
tr
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,809KB
  • 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
  • (2)bbcode_php
  • (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