Support > cpg1.5 plugin contributions

Edit picture views plugin for cpg1.5.x

<< < (2/4) > >>

Αndré:
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

lsuarez:
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.

lsuarez:
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?

Αndré:
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.

Αndré:
In codebase.php, try to replace the whole function edit_pic_views_page_html with

--- Code: ---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 &times; %s', '<input type="text" name="pwidth[0-9]+" value="%s".*\/> &times; <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;
}
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version