vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   [UserCP Options] Yes No chooser does not work (https://vborg.vbsupport.ru/showthread.php?t=42671)

Entourage 08-23-2002 09:29 PM

[UserCP Options] Yes No chooser does not work
 
I'm trying to build an on and off button for users in their options so they can turn tips on and off on the main page.

Looks like any other regular makeyesnocode but does not seen to work very well.

PHP Code:



 
if ($bbuserinfo[tipssystem]) {
    
$tipssystemchecked="checked";
    
$tipssystemnotchecked="";
  } else {
    
$tipssystemchecked="";
    
$tipssystemnotchecked="checked";
  }

  if (
$bbuserinfo[emailonpm]) {
    
$emailonpmchecked="checked";
    
$emailonpmnotchecked="";
  } else {
    
$emailonpmchecked="";
    
$emailonpmnotchecked="checked";
  }

  if (
$bbuserinfo[pmpopup]) {
    
$pmpopupchecked="checked";
    
$pmpopupnotchecked="";
  } else {
    
$pmpopupchecked="";
    
$pmpopupnotchecked="checked";
  } 

in start modify options

and

PHP Code:

  $receivepm=iif($receivepm=="yes",1,0);
  
$emailonpm=iif($emailonpm=="yes",1,0);
  
$pmpopup=iif($pmpopup=="yes",1,0);
  
$tipssystem=iif($tipssystem=="yes",1,0); 

in the part where everything is checked

And the query taking place...

PHP Code:

  //delete cookies if cookie user is off
  
if ($cookieuser==0) {
    
vbsetcookie("bbuserid","");
    
vbsetcookie("bbpassword","");
  }

  
$DB_site->query("UPDATE user
                   SET "
.$updatestyles."adminemail='$adminemail',
                      showemail='
$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='"
.addslashes($umaxposts)."',ordening='".addslashes($ordening)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='"
.addslashes($timezoneoffset)."',emailnotification='$emailnotification',
                      startofweek='"
.addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='
$emailonpm',pmpopup='$pmpopup',tipssystem='$tipssystem' WHERE userid='$bbuserinfo[userid]'");
                   
  if (
$modifyavatar!="") {
    
$goto="member.php?s=$session[sessionhash]&action=editavatar";
  } else {
    
$goto="usercp.php?s=$session[sessionhash]";
  }
  eval(
"standardredirect(\"".gettemplate("redirect_updatethanks")."\",\"$goto\");"); 

When i submit the choosercode gives the correct output in the link but somehow my new option will not work :( and the tips system keeps returning yes when going back to my options

Xenon 08-24-2002 12:17 AM

i can't see something wrong, have you changed the templates correctly?
perhaps a little misspelling?

Entourage 08-24-2002 01:42 PM

Code:

<!-- begin -->
<tr>
        <TD bgcolor="{firstaltcolor}" valign=top><normalfont><B>Show tips on the frontpage?</b></normalfont><br>
        <smallfont>Clicking yes shows tips on the main page.</smallfont></TD>
        <TD bgcolor="{firstaltcolor}" valign=top><normalfont>
                <INPUT TYPE="RADIO" NAME="tipssystem" VALUE="yes" $tipssystemnotchecked> yes
                <INPUT TYPE="RADIO" NAME="tipssystem" VALUE="no" $tipssystemchecked> no
        </normalfont></TD>
</TR>
<!-- end -->

Should work :)

Xenon 08-24-2002 01:52 PM

<INPUT TYPE="RADIO" NAME="tipssystem" VALUE="yes" $tipssystemnotchecked> yes
<INPUT TYPE="RADIO" NAME="tipssystem" VALUE="no" $tipssystemchecked> no

shouldnt that be:
<INPUT TYPE="RADIO" NAME="tipssystem" VALUE="yes" $tipssystemchecked> yes
<INPUT TYPE="RADIO" NAME="tipssystem" VALUE="no" $tipssystemnotchecked> no

Entourage 08-24-2002 02:29 PM

Yes bu I just changed that for testing it's back to that now. Nothing seems to work :(


All times are GMT. The time now is 08:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01004 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete