coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: racl on March 24, 2006, 09:51:16 AM

Title: new (search) categories automatically checkt
Post by: racl on March 24, 2006, 09:51:16 AM
Hi!

i want to create some more categories. my problem is that they aren automatically checkt in the searchform. where do i have to change the code (checkted="checked") that all kind of searchposibillities are activated instantly?

thx for your help
Title: Re: new (search) categories automatically checkt
Post by: Nibbler on March 24, 2006, 11:32:59 AM
search.php
Title: Re: new (search) categories automatically checkt
Post by: racl on March 24, 2006, 11:51:24 AM
that's true for the static parts (title, caption, keywords) owner and filename is possible to change in the search.php as well. but the free choosable categories are hidden in a variable ($customs) where can i change this entries?
Title: Re: new (search) categories automatically checkt
Post by: Nibbler on March 24, 2006, 12:13:19 PM

while ($row = mysql_fetch_assoc($result)){
        $name = str_replace(array('_field', '_name'), '', $row['name']);
        $customs .= <<< EOT
                <tr>
                        <td><input type="checkbox" name="$name" id="$name" class="checkbox" /><label for="$name" class="clickable_option">{$row['value']}</label></td>
                </tr>
EOT;
}


Just add in checked="checked" there
Title: Re: new (search) categories automatically checkt
Post by: racl on March 24, 2006, 12:16:27 PM
okay thanks i didn't see that. i works :-)
Title: Re: new (search) categories automatically checkt
Post by: pcinfoman on December 14, 2007, 09:55:24 PM
Quote from: Nibbler on March 24, 2006, 12:13:19 PM
Just add in checked="checked" there
Sweet! Thanks for the info