coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: rybosom on January 07, 2005, 10:09:50 AM

Title: change "input" in register
Post by: rybosom on January 07, 2005, 10:09:50 AM
where can I change <input type="text"> in register for <input type="radio"> ?

Title: Re: change "input" in register
Post by: Joachim Müller 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
Title: Re: change "input" in register
Post by: rybosom on January 07, 2005, 09:02:55 PM
so, I want to change this


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

to this:


Podaj swoja plec:
<input type="radio" name="plec" value="kobieta"> kobieta
<input type="radio" name="plec" value="mezczyzna"> mezczyzna







Title: Re: change "input" in register
Post by: Joachim Müller on January 08, 2005, 04:18:45 AM
Edit register.php, findarray('input', 'occupation', $lang_register_php['occupation'], 255),and replace witharray('radio', 'occupation', $lang_register_php['occupation'], 'kobieta','mezczyzna'),

Find        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)        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
Title: Re: change "input" in register
Post by: rybosom on January 08, 2005, 07:29:44 PM
it's work! thanks! You're great!!!  ;D