coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pftq on October 14, 2006, 09:42:41 PM

Title: Default Video Size
Post by: pftq on October 14, 2006, 09:42:41 PM
Hi there.  I've been searching for a while, but I can't seem to find anything about this.

Is there a way to set a default size for videos? As in instead of being 0x0 when first uploaded, change it to something like 720x480?
Title: Re: Default Video Size
Post by: Nibbler on October 14, 2006, 11:48:54 PM
http://forum.coppermine-gallery.net/index.php?topic=15275.msg80370#msg80370

The code is a little different in 1.4, but you should be able to find it.
Title: Re: Default Video Size
Post by: pftq on October 15, 2006, 02:04:20 AM
I found it.. but I can't really figure out what to do.  The value field is filled with $default

Should I overwrite $default?
Title: Re: Default Video Size
Post by: Sami on October 15, 2006, 06:55:55 AM
Above the

// Create a text box.


Just add this


$default = $name == 'movie_wd' ? '123' : ($name == 'movie_ht' ? '456' : '');
Title: Re: Default Video Size
Post by: pftq on October 15, 2006, 08:31:34 PM
Urgh - not working.  It still defaults to 0x0 :-[

$default = $name == 'movie_wd' ? '720' : ($name == 'movie_ht' ? '480' : ''); //vidsize
    // Create a text box.
    echo <<<EOT
        <tr>
            <td width="40%" class="tableb">
                        $text  $ordinal
        </td>
        <td width="60%" class="tableb" valign="top">
                <input type="text" style="width: 100%" name="$name" maxlength="$max_length" value="$default" class="textinput" id="$name" />
                </td>
        </tr>

EOT;
Title: Re: Default Video Size
Post by: Nibbler on October 15, 2006, 08:37:41 PM
Works for me. Explain what you are doing in detail.
Title: Re: Default Video Size
Post by: pftq on October 16, 2006, 02:48:46 AM
When I add a video to the gallery (wmv) through batch file upload, it goes into an album and the dimensions in the file info are 0x0
Title: Re: Default Video Size
Post by: Nibbler on October 16, 2006, 04:08:20 AM
Batch add works completely differently, the mod we are discussing does not even apply.
Title: Re: Default Video Size
Post by: pftq on October 16, 2006, 07:05:15 AM
Oh... what would apply to that then?  ???

I add all my files via batch (too many for selecting one by one). :-\