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 [2] 3 4 5 6 ... 10   Go Down

Author Topic: Coppermine should also allow Video  (Read 154493 times)

0 Members and 1 Guest are viewing this topic.

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Coppermine should also allow Video
« Reply #20 on: January 12, 2004, 02:44:53 pm »

Go ahead do it -show us :)
Logged
SANIsoft PHP applications for E Biz

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #21 on: January 12, 2004, 03:21:40 pm »

It seems the key file in all of this is the db_input.php file. Line (263) being the beginning of the problems. There should be a file extension check there to keep it from falling into the trap on (273). I tried to comment out (273-275) but it got caught on (281)....close but no cigar. Anyway, since it seems to be a go for this, I should have an alpha for this by the weekend....hopefully.
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #22 on: January 13, 2004, 09:49:18 am »

Dudes!!!

I think I did it! I haven't had a chance to test the code yet, because I typed it all at work. (Shhh. Don't tell anyone.)

Here are the files that I've modified so far:

db_input.php (1 function added; modifed rest of code to use function; and changed the order of some if statements)

functions.inc.php (added 7 functions; modified code to use functions)

init.inc.php (added 3 arrays for file types; constants for browser types; and modified code)


I have yet to modify the following:

editpics.php
thumbnails.php
index.php

...and probably a few more, but these are the ones that I figure do the most of the work. (anything else I should be looking at....I'll figure it out anyway, once I get back to my computer.)


Since I'm not that good of an artist, can someone make the three images that will function as the thumbnails for the files when they can't be embeded? I figure the images should be about 320x240, so they can be scaled down if needed. Here are the new types: movie, document (as in pdf or txt), and audio.


One more thing: Is it ok for me to modify it, so if an GD/Imagemagick isn't present, it'll just squeeze/inflate the image using height/width parameters?


Once complete, it should be able to accept anything from txt files to avis....Sorry, no zip support....although, it'll be easier to add it now.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #23 on: January 13, 2004, 11:34:44 pm »

Quote from: "omniscientdeveloper"
One more thing: Is it ok for me to modify it, so if an GD/Imagemagick isn't present, it'll just squeeze/inflate the image using height/width parameters?
Since either GD or Image Magick is minimum requirement to run Coppermine I'd say "go": if someone's foolsih enough to run Coppermine just to be able to have video files without fullfilling the min requirements (not having GD/IM)  he/she deserves to be "punished" with scaled down full-sized pics :wink:

GauGau
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Functionality Question: Store files in database?
« Reply #24 on: January 14, 2004, 01:27:42 am »

I have a question.

Would you guys be opposed to storing the files in the database? It's possible to have it work both ways for backward compatibilty. I know it'll pose a performance penalty, but in the long run, it'll make it more flexible....OR it could use unique file names which are stored in the database.

Let me know, and I'll code a patch for it. (I'm using coppermine for two projects that I'm doing, that's why I'm making all these changes.)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #25 on: January 14, 2004, 01:43:38 am »

you mean storing the files themselves as blobs in the database? I don't favor this option, because databases can become too big to handle (especially do backups over http) when using blobs, especially when it comes to (potentially large) video files. I'd favor having only the links/paths inside the db (same as with pics).

GauGau
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #26 on: January 14, 2004, 03:29:56 am »

OK...No problem. I just want to make sure that I do something that could get used.

So....unique file names stored in the database is a go? What do you think about... http://forum.coppermine-gallery.net/index.php?topic=3069

Here are a couple things I'm considering:

#1
I haven't modified the db structure yet, but I was thinking that there should be a field for the mime type of the file so it  wouldn't have to keep checking. That can be intergrated into the init.inc.php file so it can add it if it isn't there. It would then have to scan the db and all the files to insert the mime type. (This would require a PHP 4.3 installation to work with videos, etc.)


#2
Putting all configs in the db except for username and password info for the db.

#3
Seperating the functions.inc.php file so that functions that are normally used together are in one file and the core ones are in a (core.functions.inc.php???) file. (I think this'll speed it up some.)
Logged

moorey

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 404
Coppermine should also allow Video
« Reply #27 on: January 14, 2004, 04:08:07 am »

I must this progress looks very promising - waiting in anticipation for this one.
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Coppermine should also allow Video
« Reply #28 on: January 14, 2004, 04:34:59 am »

The document idea is particularly nice. I would never have thought of it, but I can already imagine some excellent applications.

Quote from: "omniscientdeveloper"
#2
Putting all configs in the db except for username and password info for the db.


Could you clarify? Are you proposing to move the database server name, database name, and table prefix into the database itself?
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png)

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #29 on: January 14, 2004, 08:24:44 am »

No...basically I was talking about the config variables that are in the init.inc.php file. The ones in the config.inc.php file are fine.

I think it'd be horror to try to put all those different types in one album, though it'll be possible. I think it'd look much cleaner having a document album, movie album, etc. (I started to program it this way, but figured that I'd be microsofting people into my way of thinking.)
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #30 on: January 16, 2004, 06:26:26 pm »

I just setup a demo site with the changes that I've made.
It's about 90% complete, so I should be done really soon. It's still a tad bit buggy, since I have about three more pages to edit.

Here's the site:

{edit: site deleted}



The document types are not viewable yet.

I tested it in IE 6.1. If some of you guys, that have other browsers, can tell me if it looks ok for you, that'd be sweet.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #31 on: January 17, 2004, 10:25:16 am »

looks great - I'm looking forward to the upload facility and the other "backend" functions :wink:

GauGau
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #32 on: January 18, 2004, 05:19:16 pm »

I'm about 95% done now. I was out all day today....church, so I only got about 1 1/2 hours of coding done. I just have the batch upload and ecard parts to do now, so I'll be done tomorrow. :)

I downloaded some icons from deviantart.com. I'm supposing that they're freeware, but I'll ask the author anyway. I use these to display the file types.

I uploaded the changes to the my test site again, so you can check out the changes. I'm still having problems with the document types though. I think I'm going to just make those links open in a new window for any view other than thumbnail.

I may also make the user manually type in the dimensions of the video files, so they get rendered correctly.

...Oh...Everything but the images look like crap in NN 7.1.   :cry:
Logged

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #33 on: January 19, 2004, 02:17:29 am »

Looking forward to this :) If it works.. :)
I have been using cpg for some time now, and I love it, but I have always missed to be able to upload small video files and so on. Most digital cameras have a video function, and the clips arent much bigger than the pics taken with the same camera, so the ability to share those small clips along with the pics is a must I think. So I am trembling inmy pants here, and hoping you will get it to work 100%, or 95% sounds good to me aswell :)
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
HERE YOU GO! ALL DONE!
« Reply #34 on: January 19, 2004, 08:32:44 am »

Finished!!!

I used the release version.

Notice: The menus still look the same as before, so to upload a video, etc., you just click the "upload picture" link or use the batch add mode.

WARNINGS:
1. If you have any mods installed, you may have to reinstall them.
2. MAKE SURE YOU BACKUP YOUR CURRENT FILES BEFORE INSTALLING (ESPECIALLY IF YOU HAVE MODS INSTALLED)!!!!!!
3. It's still buggy in netscape navigator when viewing movies.
4. Be careful of the file names. It can throw faulty "file type" errors.

5. These installation files may only work with ENGLISH because of changes to the english language file. If you're setup with a different language, then you may want to ask the translator for your language to update the language file.  You can install it, however, but you may have problems with the editpics.php page.


INSTRUCTIONS FOR USE:
If you upload a movie, especially quicktime, make sure you enter the width and height of the video. (I have yet to add support for REAL video formats.)


MODIFICATION INSTRUCTION:
The file types are hard-coded into the init.inc.php file. If you want to add a new file type (you'll have to do this if you get file type errors) you can add it to one of the arrays there. I think it's pretty complete though.


Once installed, you should be able to add extra file types.
Logged

omniscientdeveloper

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 901
Coppermine should also allow Video
« Reply #35 on: January 19, 2004, 09:07:07 am »

I've also upgraded my site, so you can see it in work:

http://www.brownfloyd.com/bgallery/
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Coppermine should also allow Video
« Reply #36 on: January 19, 2004, 10:23:50 am »

I had only a rough look over it, but I'm very impressed!
I packaged this up for the download section into two packages:
  • cpg1.2.1_mod_video_hack.zip
    as provided by omniscientdeveloper with only the files that were changed (meant for an upgrade of an existing coppermine1.2.1 install)
  • cpg1.2.1_mod_video_full.zip
    a full installation package of cpg1.2.1 with the hack included[/list:u]Please note: this mod hasn't been tested intensively on various platforms, there will surely be some issues to be ironed out - that's why I'd label this *beta*-software! Do not use it on live/production sites! Use it at your own risk. Backup your files before applying the mod!

    This great mod will almost certainly go into the next release... :D  :D  :D

    GauGau
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net
Coppermine should also allow Video
« Reply #37 on: January 19, 2004, 10:55:38 am »

Bravo!!! Three cheers for omniscientdeveloper

Great work!!

Folks please download and test as throughly as possible (I am doing it as well) so that we can integrate it in the next release
Logged
SANIsoft PHP applications for E Biz

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #38 on: January 19, 2004, 11:44:14 am »

hmmm.. I tried uploading both an avi file, and a mpg file to my gallery.. It shows a "thumb" that says there is a mpeg file there, but when I click it, I only get a small dot showing.. What did I do wrong? I hava a standard installation, with no modifications of cpg.. *sniff*
Logged

salvemeum

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Coppermine should also allow Video
« Reply #39 on: January 19, 2004, 11:47:57 am »

nevermind :) Dont know what it was, I copied the cpg files and overwrote the excisting files, and now it works. Maybe there was some file left from my old "Non modded" cpg there... or my cache in the browser or something... But Hurray! it works! :)
This guy who did this deserves a beer, or 20 :)
Logged
Pages: 1 [2] 3 4 5 6 ... 10   Go Up
 

Page created in 0.024 seconds with 18 queries.