Author Topic: Pictures AND videos in ONE folder?  (Read 14599 times)

elipsoid

  • TodayPlus Newbie
  • *
  • Posts: 3
    • http://www.elipsoid.com
Pictures AND videos in ONE folder?
« on: January 02, 2006, 08:23:36 PM »
Sorry if I overlooked something, it is late at night, but is it somehow possible to have pictures and videos in ONE gallery? I have plenty of shots from NYE celebrations along with some videos and I would like to have them together in one folder...

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Pictures AND videos in ONE folder?
« Reply #1 on: January 02, 2006, 11:20:22 PM »
Sorry, but at this time having pictures and videos in the same folder is not supported.  I'll think about a possible solution and try to include this feature in a future version.
Jim H

elipsoid

  • TodayPlus Newbie
  • *
  • Posts: 3
    • http://www.elipsoid.com
Pictures AND videos in ONE folder?
« Reply #2 on: January 03, 2006, 06:49:54 AM »
Thank you.

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Pictures AND videos in ONE folder?
« Reply #3 on: January 04, 2006, 09:40:15 AM »
@elipsoid:

While developing SPGM-Vid Sylvain asked that I keep the number of changes to "spgm.php" at a minimum.  At this point I have done so with basically adding only three lines of code.  So with that in mind, I have been thinking about the best way to have videos and pictures in the same gallery folder.  Unfortunately, to truly have pictures and videos in the gallery folder would require allot of changes to "spgm.php".

So the best solution I have been able to come up with would be similar to how a sub-photo gallery is displayed in a photo gallery (for example, see one of my photo galleries).  This should be fairly easy to integrate and require very little additional code be added to "spgm.php".

I'll work on this feature and include it in a future version of SPGM-Vid.
Jim H

elipsoid

  • TodayPlus Newbie
  • *
  • Posts: 3
    • http://www.elipsoid.com
Pictures AND videos in ONE folder?
« Reply #4 on: January 04, 2006, 12:04:47 PM »
I'm using Singapore (http://singapore.sourceforge.net/) at the moment and was looking to put videos on my website. I found SPGM and this plugin so I gave it a try. It is  definitely not bad, but I would have to re-work my photo album and still I wouldn't have video and pictures together. So I found out a little workaround - i uploaded a thumbnail along with the video and put a simple code, that shows the video, to the description of the image. The result looks like this: http://album.elipsoid.com/index.php?gallery=./2005-12%20Silvestr&image=IMG_0140.gif
It's just an idea, I don't know how SPGM works inside...

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Pictures AND videos in ONE folder?
« Reply #5 on: January 04, 2006, 10:03:17 PM »
Quote from: "elipsoid"
It's just an idea, I don't know how SPGM works inside...

In a nutshell, SPGM does a directory listing for the main photo gallery listed in the settings.  It then separates the sub-directory names from the photos.  It then displays the sub-directories as galleries and the photo's thumbnails.

SPGM-Vid is simply a modified version of the SPGM that looks for videos instead of photos.  It then determines what type of video it is and the correct Object/Embed statements to use to play the video.  SPGM-Vid still handles sub-directories the same as SPGM.  The only thing really special that SPGM-Vid does is provide a link in the root photo gallery to either a specified sub-video gallery or the root video gallery, depending on the settings.

The change I have in mind for SPGM-Vid will not only provide a link from the root photo gallery to SPGM-Vid, but will also provide a link from a sub-photo gallery to a sub-video gallery.  I am planning a including some sort of switch to turn-off the root-photo gallery link to SPGM-Vid.

So in a nutshell, that is what is under the hood of SPGM and SPGM-Vid.
Jim H

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Pictures AND videos in ONE folder?
« Reply #6 on: January 13, 2006, 04:12:21 PM »
Although it doesn't allow for the Photos and Videos to be in the same gallery, I have come up with a solution that might solve your problem.  See the newest version of SPGM-Vid.
Jim H

Tibo

  • TodayPlus Newbie
  • *
  • Posts: 5
Pictures AND videos in ONE folder?
« Reply #7 on: February 18, 2006, 06:06:08 AM »
Hi,

A friend advised me SPGM while I was looking for a gallery generation script for a website for me and my friends.
I wanted pictures + videos on the same gallery, and I overlooked your plug-in to SPGM.

I did something like a fusion between SPGM and SPGM-Vid, thus adding quite a few lines of code onto the original SPGM. I can read in this topic that Sylvain wasn't quite kind with that, but anyway, I think this can be interested.

Just in case you're intersted in the job done, have a look at : http://s146481156.onlinehome.fr/

Tibo

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Re: Pictures AND videos in ONE folder?
« Reply #8 on: February 18, 2006, 10:00:56 AM »
Quote from: "Tibo"
Hi,

A friend advised me SPGM while I was looking for a gallery generation script for a website for me and my friends.
I wanted pictures + videos on the same gallery, and I overlooked your plug-in to SPGM.

I did something like a fusion between SPGM and SPGM-Vid, thus adding quite a few lines of code onto the original SPGM. I can read in this topic that Sylvain wasn't quite kind with that, but anyway, I think this can be interested.

Just in case you're intersted in the job done, have a look at : http://s146481156.onlinehome.fr/

Tibo

While I was developing SPGM-Vid prior to its release, Sylvain wanted me to keep my changes to SPGM to minimum since I planned on releasing it.  That really wasn't a problem based on how I was planning on using SPGM & SPGM-Vid.  I feel he wouldn't mind if you added code to his script for own use.

Now as for your mod to SPGM and SPGM-Vid, I love it.  I love how you are providing detailed gallery information about how many pictures, videos and sub-galleries on in the gallery.  You might want to contact Sylvain, he might be interested in some of your ideas.
Jim H

Tibo

  • TodayPlus Newbie
  • *
  • Posts: 5
Re: Pictures AND videos in ONE folder?
« Reply #9 on: February 19, 2006, 05:08:37 AM »
Quote from: "jhollin1138"

Now as for your mod to SPGM and SPGM-Vid, I love it.  I love how you are providing detailed gallery information about how many pictures, videos and sub-galleries on in the gallery.  You might want to contact Sylvain, he might be interested in some of your ideas.


Thanks! Il like it too ;) I really felt it necessary to know what was inside the sub-galleries. Thus telling everybody new pictures, and videos when they arrive.

But, in fact, it's Sylvain who told me to contact you. He wasn't that excited about my mods :'(   ... ;)

jhollin1138

  • Administrator
  • TodayPlus Veteran
  • *****
  • Posts: 785
    • www.jhollin1138.com
Re: Pictures AND videos in ONE folder?
« Reply #10 on: February 19, 2006, 10:05:04 AM »
Quote from: "Tibo"
But, in fact, it's Sylvain who told me to contact you. He wasn't that excited about my mods :'(   ... ;)

Hmm, I am a little surprised about that. :shock:

The one problem I have with SPGM is it doesn't report anything about sub-galleries.  You don't even know a gallery has them until you open it.
Jim H

Tibo

  • TodayPlus Newbie
  • *
  • Posts: 5
Pictures AND videos in ONE folder?
« Reply #11 on: February 19, 2006, 10:39:22 AM »
Well, it's pretty simple :

1- Create this function:
Code: [Select]

function spgm_CreatePictureArrayRecursive($strGalleryId,&$nbSubGalleries) {
  $files = array();
  $strPathToGallery = DIR_GAL.$strGalleryId.'/';
 
  if ( $handle = opendir($strPathToGallery) ) {
    while ( ($file = readdir($handle)) !== false ) {
      if ( $file != ".." && $file != "." ) {
        if ( is_dir($strPathToGallery.$file) ) {
          $nbSubGalleries++;
          $files=array_merge($files,spgm_CreatePictureArrayRecursive($strGalleryId . "/" . $file,$nbSubGalleries));
        }else {
          if ( spgm_IsPicture($file, $strGalleryId) ) {
            $files[] = $strGalleryId . "/" . $file;
          }
        }
      }
    }
    closedir($handle);
    return $files;
  }
}


2- In function spgm_DisplayGalleryHierarchy() :
Instead of :
Code: [Select]

$arrPictureFilenames = spgm_CreatePictureArray($strPathToSubGallery, '', false); // no filter is provided to get all the pictures
$arrGalleryInfo = spgm_GetGalleryInfo($strPathToSubGallery, $arrPictureFilenames);

Call :
Code: [Select]

$iSubGalleries=0;
$arrPictureFilenames = spgm_CreatePictureArrayRecursive($strPathToSubGallery,$iSubGalleries);
$arrGalleryInfo = spgm_GetGalleryInfo('', $arrPictureFilenames);


3- That's all ;)

Well after, you customized the display to get the icons and the spgm_GetGalleryInfo to count videos.
$iSubGalleries gives me the nb of subgalleries

zippa

  • TodayPlus Newbie
  • *
  • Posts: 1
Pictures AND videos in ONE folder?
« Reply #12 on: April 05, 2006, 03:25:20 PM »
Hi!

Can someone please tell me how you did get the movies and picture to work in the same directory? And how you did get the icon för picture, movies and subbfolder to work? I f you want you can send me your spgm.php file to me.

Thanks!

johanssson@hotmail.com

Thanks.

Tibo

  • TodayPlus Newbie
  • *
  • Posts: 5
Pictures AND videos in ONE folder?
« Reply #13 on: April 05, 2006, 05:30:25 PM »
Hi,

As I said, I did quite some mods to the original SPGM.
You'll need the original SPGM package, the modules added my SPGM-Vid, my SPGM file and the icons...

I can send you my SPGM repository if you want something workin' out of the box. You'll have to get rid of some mods I did for lay out. I hope you're not scared of gettinf your hands into the code..

Tibo

tms

  • TodayPlus Newbie
  • *
  • Posts: 9
Pictures AND videos in ONE folder?
« Reply #14 on: August 01, 2006, 05:26:45 PM »
hi everybody,
i'm using the plug in for a couple of hours now and i'm really interessted in those modifications to see pics and video in the same gallery, it would be very kind to send me your package tibo
thx a lot
ludovic.bernard@gmail.com