Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Hide file title field on editpics.php  (Read 2848 times)

0 Members and 1 Guest are viewing this topic.

St. Anger

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Hide file title field on editpics.php
« on: August 25, 2012, 09:27:02 am »

Is there a way to hide the "file title" form field on the editpics.php page? I don't want my users to be able to use the file title field when uploading images (mainly because they fill it with useless nonsense that I have to delete). I was hoping there would be a quick fix, like just commenting a line out or something.
Logged

St. Anger

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Re: Hide file title field on editpics.php
« Reply #1 on: August 27, 2012, 04:36:42 am »

Well, I didn't find a way to actually hide the field, but I found a way to set titles to empty strings. In case anyone else ever wants to do the same, I simply changed line 222 from

Code: [Select]
$title = get_post_var('title', $pid);
to

Code: [Select]
$title = "";
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hide file title field on editpics.php
« Reply #2 on: September 03, 2012, 02:34:19 pm »

To hide the title field, open editpics.php, find
Code: [Select]
array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),and replace with
Code: [Select]
//array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
Logged

St. Anger

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Re: Hide file title field on editpics.php
« Reply #3 on: September 03, 2012, 07:42:51 pm »

If that line is commented out, this error is displayed when you try to edit file info:

Quote
Critical error
Script called without the required parameter(s). (title20596)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hide file title field on editpics.php
« Reply #4 on: September 04, 2012, 12:00:40 pm »

You also need to apply/keep your mod.
Logged

St. Anger

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 107
Re: Hide file title field on editpics.php
« Reply #5 on: September 04, 2012, 02:23:44 pm »

Thanks, it works now. ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.