forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Nibbler on November 27, 2005, 02:22:03 am

Title: Plugin: Filetype editor
Post by: Nibbler on November 27, 2005, 02:22:03 am
This plugin provides the admin with an easy to use interface to Coppermine's filetypes table, avoiding the need to use phpmyadmin. You can add, edit and delete file types and set the default player for each type of file.



Update: v1.0.2 - Remoed use of short tags.
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on November 28, 2005, 10:48:32 pm
oh, wow. This has been on my todo list for cpg1.5. Great idea, I'm glad you coded this.
Title: Re: Plugin: Filetype editor
Post by: ganesh on December 01, 2005, 06:59:35 pm
Great plugin! Thanx! ;)
Title: Re: Plugin: Filetype editor
Post by: gvlakers on February 17, 2006, 04:30:21 am
This plugin provides the admin with an easy to use interface to Coppermine's filetypes table, avoiding the need to use phpmyadmin. You can add, edit and delete file types and set the default player for each type of file.

Hi there.  Just found the link to this plugin which I have been needing to upload file types other than those that are listed.  How do you use this plugin?   I see there are 3 files that are in the .zip, now where should they be put on the server and how are they accessed?  Thanks.
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on February 17, 2006, 07:26:26 am
Title: Re: Plugin: Filetype editor
Post by: wuurp on March 09, 2006, 04:15:43 am
This plugin wasn't working for me. On the edit form it would print <?=$presel_extension?> instead of the extension since I don't allow the short form of the tags. For portability, shouldn't this be long form, as in <?php echo $presel_extension?> There are 5 of the short form tags in editor.php. I changed these and now I'm happy.



 
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on March 09, 2006, 06:18:35 am
you're right, short PHP tags should be avoided (best practise), however I suggest reviewing your server (PHP) setup.
Title: Re: Plugin: Filetype editor
Post by: wuurp on March 09, 2006, 07:23:52 am
I have the short form tags disabled on my servers for various reasons. I just thought I would point it out because the main core of coppermine doesn't use short tags and I figured it would be good if plugins followed the same conventions.

For this I get a -1 Karma?  :(
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on March 09, 2006, 07:31:55 am
no, you didn't get a negative karma rating for your reply (at least not from me). Please avoid meta-discussion (about karma stuff etc.), especially on this particular thread, as it should deal with the plugin only, we're keen on not having too much thread drift here. As I suggested: your reply goes noted and the short tags will eventually be replaced by the proper long ones at some later stage.
Title: Re: Plugin: Filetype editor
Post by: Nibbler on March 09, 2006, 02:32:53 pm
Plugin updated. Also note that if you use the plugin to remove filetypes you should rename or remove your update.php.
Title: Re: Plugin: Filetype editor
Post by: Captain Bob on November 17, 2007, 10:56:54 am
This post began as a support request.  I couldn't figure out how to actually use this plugin.  I followed all the rules:

- I couldn't get a .mp4 file I uploaded to work, so I searched the forums for a solution until I found this thread.
- I followed the instructions (http://forum.coppermine-gallery.net/index.php?topic=24327.0) on how to install the plugin.
- I read Coppermine's documentation (http://www.chamotlabs.com/Bob/chamot/coppermine/docs/index.htm#plugin): "we can't give any recommendations within this documentation...usually, plugins that require you to edit or configure anything come with a README file that tells you how to do so."  There was no readme when I extracted the zip file.
- I read the FAQ thread (http://forum.coppermine-gallery.net/index.php?topic=24327.0): "Follow any setup instructions provided by the plugin's installer."  When I installed the plugin from pluginmgr.php, I got no follow-up instructions on how to use or configure the plugin.
- I tried navigating to each of the included .php pages.  configuration.php (http://www.chamotlabs.com/Bob/chamot/coppermine/plugins/filetypes_editor/configuration.php) loaded a blank page, codebase.php (http://Not in Coppermine...) gave me a page with the text "Not in Coppermine...", and editor.php (http://www.chamotlabs.com/Bob/chamot/coppermine/plugins/filetypes_editor/editor.php) gave me this error:

Warning: main(include/init.inc.php) [function.main]: failed to open stream: No such file or directory in /data/[...]/coppermine/plugins/filetypes_editor/editor.php on line 3

Fatal error: main() [function.require]: Failed opening required 'include/init.inc.php' (include_path='.:/usr/services/vux/lib/php') in /data/[...]/coppermine/plugins/filetypes_editor/editor.php on line 3

- I searched the support forums, with the internal search engine and an external one, but found nothing about how to make use of the plugin.

- Finally, after I registered on these forums and was about to ask for help, I realized...

This plugin creates a new button at the top of your coppermine gallery page called "filetypes".  Click this button to actually make use of this plugin.

Perhaps the author considered this obvious, but it wasn't for me; I expected to see this fact documented somewhere.  I'm posting the information now in hopes of helping the next person with the same problem.
Title: Re: Plugin: Filetype editor
Post by: soleiltan2 on January 22, 2008, 09:02:05 pm
 ;D

Now this is the kind of help/response/information that I have been looking for....

You certainly did help, I was looking for all of the things that you mentioned here.

Sometimes when people write instructions, they leave out what seems blatant....but when you're a newbie...you need it spelled out.

Thanks a bundle!!!!!!
Title: Re: Plugin: Filetype editor
Post by: kryspin on March 18, 2008, 02:14:36 pm
Hi,
thanks for really great plugin. It seems to work just fine with some extensions. I successfully added .kml, .gpx and .plt (Ozi Explorer track). However, I ran into two problems recently. I tried to add .kmz file and .wpt (Ozi Explorer waypoint file) and even though the mimetype is correct (, it is set to "document" (once I forgot and left it for image - no wander it does not work then) and "no plazer" and everything seemed to be ok. When I tried to batch add uploaded .kmz, I got PB error (it works fine with .kml).  Attributes of directory the file is in is set to "777". I even tried to edit and to delete the extension and create it again, but it didn't help. Does anybody know where might be the problem? I would be really thankfull for help.
Title: Re: Plugin: Filetype editor
Post by: Nibbler on March 18, 2008, 02:39:20 pm
This is not related to the plugin - it's just an interface. Post on the upload support board, posting the required information.
Title: Re: Plugin: Filetype editor
Post by: kryspin on March 18, 2008, 03:11:26 pm
Sorry, I put the question in a wrong thread. However I thought it somehow might be connected with the plugin for following reasons:
- I made the same mistake with two different filetypes - .kmz and .wpt. I set them independently not to "document" but to "image" and saved them.
- they both make the same error - they upload, but are no added to gallery
- the files which have never been set to "image" are working perfectly

I appologise, if I'm still mistaken and it really does not relate to the plugin.

PS> does your previous answer mean you already posted the required information (i couldn§§ find it) or should I ask question in upload support board?
Title: Re: Plugin: Filetype editor
Post by: kryspin on March 18, 2008, 03:20:53 pm
and I have forgotten - when I try to edit these .kml and .wpt files - the fields "file extension" and "mime type" are empty (even though the should not be) and the image type is set to "image", even though it was re-set to "document" several times. In the table with all the files it appears to be all right. These both files have been once set to "image", which might have caused the problem.
Title: Re: Plugin: Filetype editor
Post by: kryspin on March 18, 2008, 07:59:11 pm
I found the problem, it seems, that field "Allowed document types" in configuration has to be editted manualy. Then it works fine.
Title: file type editor.
Post by: hkr on April 15, 2008, 03:51:15 pm
i have installed this plugin: http://forum.coppermine-gallery.net/index.php/topic,24186.0.html
however it dosent show up anywhere, from where can i edit the file types?


thnx..
Title: Re: file type editor.
Post by: Joachim Müller on April 15, 2008, 05:22:03 pm
The plugin adds a menu item to the admin menu (named "Filetypes"). You can access it directly as well by going to http://yoursite.tld/your_gallery/index.php?file=filetypes_editor/editor

Merging with the thread you refered to, as this might not be ovious for everyone. Adding a screenshot.
Title: Re: Plugin: Filetype editor
Post by: hkr on April 15, 2008, 09:48:50 pm
thnx you very much, using the direct link works fine,however i dont see any such options under admin tools to view the file type editor.
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on April 16, 2008, 07:51:06 am
I didn't say that it would reside within the admin tools. I said that it was available in the admin menu. Take a look at the screenshot I posted, at the top right.
Title: Re: Plugin: Filetype editor
Post by: hkr on April 16, 2008, 12:08:18 pm
sorry about that,I meant its not visible in the admin menu.
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on April 16, 2008, 07:47:17 pm
Then you must be using a custom theme that comes with an admin menu definition of it's own. Add the link to that item manually in that case.
Title: Re: Plugin: Filetype editor
Post by: aliceaod on May 06, 2008, 01:28:53 am
Thanks for this mod.

I used this in the past a while ago for pcstitch patterns (.pat). Problem  is that I disabled the sharing a long time ago since nobody was using it but thought try again and installed the lastest coppermine. This time I can't get the .pat to work. I also can't get roller coaster sims to work either.  .csa and .trk are some of the file extentions that I'd like to ad. I've tried all kinds of things...the files upload but they don't show on the coppermine site saying they "could not be placed".  Is there a work-around for the file and mime types especially if they are unknown?  There's no mime type for .csa and .trk.

I used application/octet-stream for the .pat files as recommended by pcstitch...tried it as image and document, same results. Gets uploaded but doesn't get posted to the site. Same for the roller coaster sims.  I don't want to force uploading stuff in .zip folders as people can include potentially harmful .exe files in .zip folders. I'd rather have people upload their roller coaster sims in their original file format (.csa or .trk for example).
Title: Re: Plugin: Filetype editor
Post by: RenesCopper on May 27, 2008, 02:27:27 pm
Interesting mod, but it still won't let my psd image show. I get a box frame with a ? icon on album list page and on the album index, with a small little box where medium image should be, and for full size image which opens in new window, a large blank grey page with the name of the image.psd in the corner.
I added psd to the documents types list. and image types to ALL.
but still doesn't show. Looked at the filetypes added by this plugin, and psd is included. I can change the image type and reload it, but wonder why it won't work.

I have manually upgraded to v. 1.4.18, took two days, not a snap of a button. My webhost does provide ImageMagick.

Title: Re: Plugin: Filetype editor
Post by: IslandGirl on August 14, 2008, 10:03:52 am
Thank you!
I know this post is older - but it was quite helpful to a newb like me.
I was going nuts trying to figure out just what the plug-in did...thanks again!  :)

This post began as a support request.  I couldn't figure out how to actually use this plugin.  I followed all the rules:

- I couldn't get a .mp4 file I uploaded to work, so I searched the forums for a solution until I found this thread.
- I followed the instructions (http://forum.coppermine-gallery.net/index.php?topic=24327.0) on how to install the plugin.
- I read Coppermine's documentation (http://www.chamotlabs.com/Bob/chamot/coppermine/docs/index.htm#plugin): "we can't give any recommendations within this documentation...usually, plugins that require you to edit or configure anything come with a README file that tells you how to do so."  There was no readme when I extracted the zip file.
- I read the FAQ thread (http://forum.coppermine-gallery.net/index.php?topic=24327.0): "Follow any setup instructions provided by the plugin's installer."  When I installed the plugin from pluginmgr.php, I got no follow-up instructions on how to use or configure the plugin.
- I tried navigating to each of the included .php pages.  configuration.php (http://www.chamotlabs.com/Bob/chamot/coppermine/plugins/filetypes_editor/configuration.php) loaded a blank page, codebase.php (http://Not in Coppermine...) gave me a page with the text "Not in Coppermine...", and editor.php (http://www.chamotlabs.com/Bob/chamot/coppermine/plugins/filetypes_editor/editor.php) gave me this error:

Warning: main(include/init.inc.php) [function.main]: failed to open stream: No such file or directory in /data/[...]/coppermine/plugins/filetypes_editor/editor.php on line 3

Fatal error: main() [function.require]: Failed opening required 'include/init.inc.php' (include_path='.:/usr/services/vux/lib/php') in /data/[...]/coppermine/plugins/filetypes_editor/editor.php on line 3

- I searched the support forums, with the internal search engine and an external one, but found nothing about how to make use of the plugin.

- Finally, after I registered on these forums and was about to ask for help, I realized...

This plugin creates a new button at the top of your coppermine gallery page called "filetypes".  Click this button to actually make use of this plugin.

Perhaps the author considered this obvious, but it wasn't for me; I expected to see this fact documented somewhere.  I'm posting the information now in hopes of helping the next person with the same problem.
Title: Re: Plugin: Filetype editor
Post by: coober on March 29, 2009, 01:25:38 pm
Yes , the change that this plugin makes is not obvious once it is installed. Some pointer would be useful just after the installation is completed. Currently there is a rather terse comment in the description.

Quote
Description A plugin to allow easy access to the filetypes table.

Perhaps this is where the information explaining about the extra tab could go, some indication of just how to access the "easy access" we now have would be nice.

Also if the "documentation" button linked to some specific doc rather than the generic coppermine "how to use plugins" page.
Maybe it should link to some doc about hte filetypes table.

Looks like a useful plugin, thanks.


Title: Re: Plugin: Filetype editor
Post by: cadillac807 on April 11, 2009, 11:18:18 am
This plugin provides the admin with an easy to use interface to Coppermine's filetypes table, avoiding the need to use phpmyadmin. You can add, edit and delete file types and set the default player for each type of file.

Update: v1.0.2 - Remoed use of short tags.


wow I used this to allow flv flash videos uploads with using realplayer as default thing for flv and allowing all uploads
http://www.greatphotoz.info
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on April 11, 2009, 09:00:56 pm
Setting realplayer as default for flash files is not a bright move, given the low number of realplayer installs in comparison to standard flash players (adobe/macromedia usually) - after all, you should catter for your visitors and not for your own particular browser setup. Anyway, yours is not a question, so if you were just planning to show off your site, please use the corresponding thread "share your gallery" on the general discussion board.
Title: Re: Plugin: Filetype editor
Post by: ZombieFAQ on August 27, 2009, 12:43:04 am
Hello ;D

I am using a fresh install of 1.4.25...
 
I am able to upload images just fine and have installed this plugin for the purposes of adding flv videos. I updated the plugin as follows:

File extension (lower case, no dot): flv    
MIME type (must be valid): video/x-flv   
Content type: movie    
Associated Player: Flash player


After attempting an upload, I get the "0 uploads were successful" error.

Debug info:
Code: [Select]
USER:
------------------
Array
(
    [ID] => 8dbe967f5b1a6d875dcf845f5fdfa8ea
    [am] => 1
    [lang] => english
    [liv] => Array
        (
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => ZombieFAQ
    [groups] => Array
        (
            [0] => 1
            [1] => 3
        )

    [disk_max] => 5000
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 1
    [ufc_min] => 0
    [custom_user_upload] => 0
    [num_file_upload] => 10
    [num_URI_upload] => 0
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 1
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg_filetypes; (0s)
    [1] => select * from cpg_plugins order by priority asc; (0s)
    [2] => delete from `zombief1_cpm01`.cpg_sessions where time<1251322606 and remember=0; (0s)
    [3] => delete from `zombief1_cpm01`.cpg_sessions where time<1250116606; (0s)
    [4] => select user_id from `zombief1_cpm01`.cpg_sessions where session_id = '6522b7ec8f0cfee9aded2ed4e1c2ee62' (0.001s)
    [5] => select user_id as id, user_password as password from `zombief1_cpm01`.cpg_users where user_id=2 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `zombief1_cpm01`.cpg_users AS u INNER JOIN `zombief1_cpm01`.cpg_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='2' (0s)
    [7] => SELECT user_group_list FROM `zombief1_cpm01`.cpg_users AS u WHERE user_id='2' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg_usergroups WHERE group_id in (1,3) (0s)
    [9] => SELECT group_name FROM  cpg_usergroups WHERE group_id= 1 (0s)
    [10] => update `zombief1_cpm01`.cpg_sessions set time='1251326206' where session_id = '6522b7ec8f0cfee9aded2ed4e1c2ee62' (0s)
    [11] => SELECT user_favpics FROM cpg_favpics WHERE user_id = 2 (0s)
    [12] => DELETE FROM cpg_banned WHERE expiry < '2009-08-26 16:36:46' (0s)
    [13] => SELECT * FROM cpg_banned WHERE (ip_addr='98.222.219.152' OR ip_addr='98.222.219.152' OR user_id=2) AND brute_force=0 (0s)
    [14] => SELECT aid, title FROM cpg_albums WHERE category < 10000 ORDER BY title (0.004s)
    [15] => SELECT aid, title FROM cpg_albums WHERE category='10002' ORDER BY title (0s)
    [16] => SELECT COUNT(*) FROM cpg_pictures WHERE approved = 'NO' (0s)
)

==========================
GET :
------------------
Array
(
)

==========================
POST :
------------------
Array
(
    [control] => phase_1
)

==========================
VERSION INFO :
------------------
PHP version: 5.2.9 - OK
------------------
mySQL version: 5.0.81-community-log
------------------
Coppermine version: 1.4.25(stable)
==========================
Module: GD
------------------
GD Version: bundled (2.0.34 compatible)
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support:
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XPM Support: 1
XBM Support: 1
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 5.0.81
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib64 -lmysqlclient_r 
==========================
Module: zlib
------------------
ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/lib/php:/usr/local/lib/php | .:/usr/lib/php:/usr/local/lib/php
open_basedir | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.098 seconds - 17 queries in 0.005 seconds - Album set : ; Meta set: ;

Suggestions?

Thank you very much for your consideration and time!
   
Title: Re: Plugin: Filetype editor
Post by: Joe Carver on August 27, 2009, 01:22:35 am

The last points are important to allow Coppermine to generate a meaningful error specific to your upload, plugin or not
Title: Re: Plugin: Filetype editor
Post by: ZombieFAQ on August 27, 2009, 02:12:42 am
  • Post the link to your Coppermine when asking for help, 1) Forum Rule 2) Speeds Assistance
  • Do not post the debug unless it's requested 
  • Start Here: Upload Troubleshooting (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble)
  • Continue Here if needed Asking for support on upload issues (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_support) Follow all steps

The last points are important to allow Coppermine to generate a meaningful error specific to your upload, plugin or not

http://www.zombiefaq.com/gallery (http://www.zombiefaq.com/gallery)

User "test"
Password "test"

"Upload Troubleshooting" read and followed ... no help.
Title: Re: Plugin: Filetype editor
Post by: Joachim Müller on August 27, 2009, 09:42:33 am
Do so in a thread of your own, as your upload issues are not related to this plugin.
Title: Re: Plugin: Filetype editor
Post by: AthleticLatino on May 18, 2012, 05:34:21 am
I get the following error when I try to run the plugin. I'm using the latest version of Coppermine.

Code: [Select]
Fatal error: Cannot redeclare cpggetmicrotime() (previously declared in /home/content/e/x/e/exerciseformen/html/photogallery/include/init.inc.php:25) in /home/content/e/x/e/exerciseformen/html/photogallery/include/init.inc.php on line 27
Does anyone know how to fix this issue?