coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: AfroJoJo on December 12, 2006, 06:56:50 AM

Title: modifyalb.php
Post by: AfroJoJo on December 12, 2006, 06:56:50 AM
Does anyone know how to set a maxlength on the album title. I looked in modifyalb.php and can't figure it out. Any ideas?
Title: Re: modifyalb.php
Post by: AfroJoJo on December 12, 2006, 09:21:00 PM
I figured out how to change it in the albmgr.php, but still can't figure it out in modifyalb.php. I need a maxlength in both of these because if there is a maxlength in one and not the other then it doesnt do any good. They could just make the album title longer in the one that doesnt have a maxlength set.
Title: Re: modifyalb.php
Post by: AfroJoJo on December 13, 2006, 07:55:23 AM
Ok, I figured it out. Im an idiot. Dont make fun of me.  :'(
Title: Re: modifyalb.php
Post by: Joachim Müller on December 13, 2006, 08:13:49 AM
You might want to post your changes for the benefit of others.
Title: Re: modifyalb.php
Post by: AfroJoJo on December 13, 2006, 09:30:21 AM

function form_input($text, $name)
{
    global $ALBUM_DATA;

    $value = $ALBUM_DATA[$name];

    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="$name" value="$value" class="textinput" maxlength="40"/>
                </td>
        </tr>

I just added a maxlength to the <input>. So simple, yet it took me so long to figure out. Deserves another crying face - :'(