Autopopulate title with file name Autopopulate title with file name
 

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]

Main Menu

Autopopulate title with file name

Started by bitcloud, November 12, 2006, 04:08:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bitcloud

Hi,

I've really searched this forum for hours and am unable to find how to automatically populate the "title" field with the file name (preferably the file name stripped of underscores and the extension). I'm running the latest version of coppermine. v1.4.10

I know how to mass fill the titles after the uploads are done, but this isn't really workable for an active forum... it also strips any existing titles you may have put in.

I've managed to find in upload.php:
        $title=$iptc['Headline'];
    } else {
        $title='';


And this will let me replace $title=''; with $title=$filename; (or whatever else I want) and that will auto populate the field without any troubles, but I'm unable to find the correct variable for the "file name" ($filename isn't it)

I can see this one will be so obvious I'll slap my forehead, but any help would really be appreciated

cheers...

bitcloud

I know this one's been floating around for a while, so if anyone's still trying to figure out how to autopopulate the title field with the file name when you upload, find the line
        $title=$iptc['Headline'];
    } else {
$title='';


and change it to

        $title=$iptc['Headline'];
    } else {
// LACHLAN EDIT made title extension instead of ''
        $title=$escrow_array[$index]['actual_name'];


bitcloud

ah thanks! thats a much tidier method

cheers