coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: St. Anger on August 25, 2012, 09:27:02 AM

Title: Hide file title field on editpics.php
Post by: St. Anger 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.
Title: Re: Hide file title field on editpics.php
Post by: St. Anger 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

$title = get_post_var('title', $pid);

to

$title = "";
Title: Re: Hide file title field on editpics.php
Post by: ΑndrĂ© on September 03, 2012, 02:34:19 PM
To hide the title field, open editpics.php, find
array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
and replace with
//array($icon_array['title'] . $lang_common['title'], 'title', 0, 255),
Title: Re: Hide file title field on editpics.php
Post by: St. Anger 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:

QuoteCritical error
Script called without the required parameter(s). (title20596)
Title: Re: Hide file title field on editpics.php
Post by: ΑndrĂ© on September 04, 2012, 12:00:40 PM
You also need to apply/keep your mod.
Title: Re: Hide file title field on editpics.php
Post by: St. Anger on September 04, 2012, 02:23:44 PM
Thanks, it works now. ;D