Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Disable title field on Multiple Files Flash Driven upload option?  (Read 12224 times)

0 Members and 1 Guest are viewing this topic.

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81

I am trying to disable the title field when members are uploading images.

The "Simple one file at a time" is sorted, deleted the line
Code: [Select]
array($lang_upload_php['pic_title'], 'title', 0, 255, 1),in the upload.php

However the "Multiple Files - Flash Driven" upload option still displays the title field.  Any idea on how to remove the title field on this upload option?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #1 on: January 30, 2012, 04:30:26 pm »

The flash uploader redirects to editpics.php. This file is also used to edit all files of an album. Do you want to disable that field completely, or just after the flash upload?
Logged

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #2 on: January 30, 2012, 05:09:10 pm »

Just want to delete the "Title" field only after the images have been uploaded.  I want to retain the description field
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #3 on: January 31, 2012, 09:28:47 am »

Please apply that mod: http://forum.coppermine-gallery.net/index.php/topic,73826.msg356029.html#msg356029

Then (if it works as expected) we can check for the newly added parameter newer_than and remove the title field. So please confirm if the other mod works as expected.
Logged

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #4 on: February 01, 2012, 11:43:50 pm »

Added the script change.
But the multi flash upload option still shows the title field after the photo is uploaded.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #5 on: February 02, 2012, 10:17:42 am »

Of course it will still show the title field. Please read the other thread what those changes are supposed to do. It's important that you'll find the newer_than parameter in the URLs after the flash upload, as we need it for your request:
want to delete the "Title" field only after the images have been uploaded

In the meantime Phill already confirmed that the mod (only show pictures from the last flash upload) works for him. If it also works for you, apply the following changes:

Open editpics.php, find
Code: [Select]
$data = array(
    array($icon_array['file_info'] . $lang_editpics_php['pic_info'], '', 3),
    array($icon_array['album'] . $lang_common['album'], 'aid', 1),
    array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
    array($icon_array['description'] . $captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']),
    array($icon_array['keyword'] . $keywordLabel, 'keywords', 0, 255),
    array($CONFIG['user_field1_name'], 'user1', 0, 255),
    array($CONFIG['user_field2_name'], 'user2', 0, 255),
    array($CONFIG['user_field3_name'], 'user3', 0, 255),
    array($CONFIG['user_field4_name'], 'user4', 0, 255),
);
and below, add
Code: [Select]
if ($superCage->get->keyExists('newer_than')) {
    unset($data[2]);
}

find
Code: [Select]
$title       = get_post_var('title', $pid);and replace with
Code: [Select]
$title       = $superCage->get->keyExists('newer_than') ? '' : get_post_var('title', $pid);
find
Code: [Select]
$update .= ", title = '$title'";and replace with
Code: [Select]
//$update .= ", title = '$title'";
Logged

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #6 on: February 04, 2012, 03:22:21 pm »

Thanks your new code worked perfectly :D
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #7 on: February 04, 2012, 06:27:35 pm »

Please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #8 on: February 15, 2012, 06:54:19 pm »

Noticed that I still have a few problems.

After the image has been uploaded, if Edit File Information is used the title field is still available.  How do I remove this field completely?

Another question, is it possible to make the Description Field to be completed compulsory when uploading an image?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #9 on: February 24, 2012, 02:02:21 pm »

After the image has been uploaded, if Edit File Information is used the title field is still available.  How do I remove this field completely?
:o

Do you want to disable that field completely, or just after the flash upload?
Just want to delete the "Title" field only after the images have been uploaded.
::)


So we have to start from scratch. Undo all changes from this thread (or at least all changes from that post), open editpics.php, find
Code: [Select]
$data = array(
    array($icon_array['file_info'] . $lang_editpics_php['pic_info'], '', 3),
    array($icon_array['album'] . $lang_common['album'], 'aid', 1),
    array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
    array($icon_array['description'] . $captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']),
    array($icon_array['keyword'] . $keywordLabel, 'keywords', 0, 255),
    array($CONFIG['user_field1_name'], 'user1', 0, 255),
    array($CONFIG['user_field2_name'], 'user2', 0, 255),
    array($CONFIG['user_field3_name'], 'user3', 0, 255),
    array($CONFIG['user_field4_name'], 'user4', 0, 255),
);
and replace with
Code: [Select]
$data = array(
    array($icon_array['file_info'] . $lang_editpics_php['pic_info'], '', 3),
    array($icon_array['album'] . $lang_common['album'], 'aid', 1),
    //array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
    array($icon_array['description'] . $captionLabel, 'caption', 2, $CONFIG['max_img_desc_length']),
    array($icon_array['keyword'] . $keywordLabel, 'keywords', 0, 255),
    array($CONFIG['user_field1_name'], 'user1', 0, 255),
    array($CONFIG['user_field2_name'], 'user2', 0, 255),
    array($CONFIG['user_field3_name'], 'user3', 0, 255),
    array($CONFIG['user_field4_name'], 'user4', 0, 255),
);

find
Code: [Select]
$title       = get_post_var('title', $pid);and replace with
Code: [Select]
//$title       = get_post_var('title', $pid);
find
Code: [Select]
$update .= ", title = '$title'";and replace with
Code: [Select]
//$update .= ", title = '$title'";
Logged

crl

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 81
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #10 on: February 24, 2012, 05:05:28 pm »

Thanks for the updated code.
Before I try out the new code is the description field mandatory with this new code?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Disable title field on Multiple Files Flash Driven upload option?
« Reply #11 on: March 01, 2012, 01:37:05 pm »

No, as
We have a strict "One question/issue per thread rule", which helps both supporters/moderators to keep track of open/closed issues as well as users who search the board or browse it, looking for answers to their question.
Logged
Pages: [1]   Go Up
 

Page created in 0.026 seconds with 21 queries.