Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: change "input" in register  (Read 2589 times)

0 Members and 1 Guest are viewing this topic.

rybosom

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
change "input" in register
« on: January 07, 2005, 10:09:50 am »

where can I change <input type="text"> in register for <input type="radio"> ?

« Last Edit: January 08, 2005, 07:37:45 pm by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: change "input" in register
« Reply #1 on: January 07, 2005, 12:26:32 pm »

in register.php (but this won't help you very much - you'll have to specify what excatly you want changed).

Joachim
Logged

rybosom

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
Re: change "input" in register
« Reply #2 on: January 07, 2005, 09:02:55 pm »

so, I want to change this

Code: [Select]
<input type="text" style="width: 100%" name="occupation" maxlength="255" value="" class="textinput">
               

to this:

Code: [Select]
Podaj swoja plec:
<input type="radio" name="plec" value="kobieta"> kobieta
<input type="radio" name="plec" value="mezczyzna"> mezczyzna


 



Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: change "input" in register
« Reply #3 on: January 08, 2005, 04:18:45 am »

Edit register.php, find
Code: [Select]
array('input', 'occupation', $lang_register_php['occupation'], 255),and replace with
Code: [Select]
array('radio', 'occupation', $lang_register_php['occupation'], 'kobieta','mezczyzna'),
Find
Code: [Select]
        case 'input' :
            if (isset($HTTP_POST_VARS[$element[1]])) {
                $value = $HTTP_POST_VARS[$element[1]];
            } else {
                $value = '';
            }
            echo <<<EOT
        <tr>
            <td width="40%" class="tableb"  height="25">
                        {$element[2]}
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="{$element[1]}" maxlength="{$element[3]}" value="$value" class="textinput">
                </td>
        </tr>

EOT;
            break;
and add after it (in a new line)
Code: [Select]
        case 'radio' :
            if (isset($_POST[$element[1]])) {
                $value = $_POST[$element[1]];
            } else {
                $value = '';
            }
            if ($element[2]) echo <<<EOT
        <tr>
            <td width="40%" class="tableb"  height="25">
                        {$element[2]}
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="radio" name="{$element[1]}" id="{$element[1]}1" value="{$element[3]}" class="radio" /><label for="{$element[1]}1" class="clickable_option">{$element[3]}</label>
                <input type="radio" name="{$element[1]}" id="{$element[1]}2" value="{$element[4]}" class="radio" /><label for="{$element[1]}2" class="clickable_option">{$element[4]}</label>
                </td>
        </tr>

EOT;
            break;
Please note that this will only have an impact on your registration form. You will have to modify profile.php and usermgr.php as well to make this consistent.

Joachim
Logged

rybosom

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 25
Re: change "input" in register
« Reply #4 on: January 08, 2005, 07:29:44 pm »

it's work! thanks! You're great!!!  ;D

Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.