This plugin allows you to edit the picture views on the editpics.php form, if you are logged in as admin. There's no configuration. Just install the plugin and you can edit the picture views, see attached screenshot.
Αndré works perfectly. Again many, many thanks :)
This plugin could be extended so it can also be used on the edit_one_pic.php form. But as you haven't asked for it in your support thread, I haven't implemented it yet.
The multli picture edit is all that I need :)
I have tried to get this to work. I need to import a lot of pictures from Twitpic, as this service is shutting down on the 25th of October. I want to keep the views the same as they were on Twitpic. Anyway, when I try to upload the plugin via the web uploader, nothing seems to happen. I have installed the unzipped file via ftp. The folder is there. But when I go to the editpics.php, I can't edit the views...
What have I done wrong?
Have you actually installed the plugin after you uploaded it to the plugins directory? http://documentation.coppermine-gallery.net/en/plugins.htm#plugin_manager_install
The things that a person can accomplish when actually thinking while doing them... amazing! But seriously, I don't know how I managed to overlook this... Must be my being new to Coppermine. N00bs... ::)
Thanks for your help and understanding.
New question: when I upload video files, I don't seem to be able to edit the views. There's just no editable field. How can I do this?
I just uploaded a test video to an album with an existing test picture. Unfortunately, the edit pics form doesn't work as expected in that scenario. That's a bug of the plugin. I'll try to fix it as soon as possible.
In codebase.php, try to replace the whole function edit_pic_views_page_html with
function edit_pic_views_page_html($html) {
global $lang_editpics_php, $lang_common;
// we need to replace the HTML code of the video files first
$replace = '<input type="hidden" name="pid[]" value="'."\\1".'" />';
$replace .= sprintf($lang_editpics_php['pic_info_str'], '<input type="text" name="pwidth'."\\1".'" value="'."\\2".'" size="5" maxlength="5" class="textinput" />', '<input type="text" name="pheight'."\\1".'" value="'."\\3".'" size="5" maxlength="5" class="textinput" />', "\\4", '<input type="text" name="hits'."\\1".'" value="'."\\5".'" size="8" class="textinput" />', "\\6");
$html = preg_replace('/<input type="hidden" name="pid\[\]" value="([0-9]+)" \/>[\s]*'.str_replace('%s', '([0-9]+)', str_replace('%s × %s', '<input type="text" name="pwidth[0-9]+" value="%s".*\/> × <input type="text" name="pheight[0-9]+" value="%s".*\/>', $lang_editpics_php['pic_info_str'])).'[\s]*<\/td>/Ui', $replace, $html);
// non-movie files
$replace = '<input type="hidden" name="pid[]" value="'."\\1".'" />';
$replace .= sprintf($lang_editpics_php['pic_info_str'], "\\2", "\\3", "\\4", '<input type="text" name="hits'."\\1".'" value="'."\\5".'" size="8" class="textinput" />', "\\6");
$html = preg_replace('/<input type="hidden" name="pid\[\]" value="([0-9]+)" \/>[\s]*'.str_replace('%s', '([0-9]+)', $lang_editpics_php['pic_info_str']).'[\s]*<\/td>/Ui', $replace, $html);
return $html;
}
Works! Genius! :D
Added support for video files in version 1.1 (attached to initial post).
Version 1.2 (attached to initial post) fixes a possible permission issue.
This plugin seems to no longer work for me. Is there a fix?
Works for me as expected with cpg1.5.48. What exactly doesn't work for you?
Didn't know whether to post this under Plugins for 1.5 or 1.6 but here goes.
Can you tell me if it works under 1.6 please, André.
Many thanks.
John.
Sorry. I have just noticed that the thread was marked 'completed'.
I will post my question under 1.6 subjects.
Again, apologies.
Cheers.
John