To use this website completely, it is necessary to store cookies on your computer.
 

* Navigator

Expand - Collapse

* Statistic

  • *Total Posts: 14944
  • *Total Topics: 2271
  • *Online Today: 10
  • *Most Online: 292
(2016 November 12, 09:37:31 am)

Mootools Animated Slide Show Block

Started by mikeymx5, 2010 October 25, 05:54:25 pm

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

mikeymx5

2010 October 25, 05:54:25 pm Last Edit: 2011 January 05, 04:19:52 am by mikeymx5
Im now using GallerySlideshow Plus 1.2.5  (.5 because I edited half the code to my liking)
I attached it to the post, Original authors site http://askusaquestion.net/index.php?PHPSESSID=96d9015d144588eaa3aaf3aa89985ce3&topic=904.0
Keep in mind that my code is different from the original so if you need help you can ask here.
use this block code 2.0 RC3, should work in RC4 but haven't updated the installer.

Code Select
/* PHOTO GALLERY PLUS v1.2 - Intended for use with  *** Simple Portal ***
    visit: http://askusaquestion.net/index.php/board,36.0.html for SMF support of this adapted version.
    Slideshow is a javascript class for Mootools 1.2 to stream and animate the presentation of images on your website.
    Copyright (c) 2008 by Aeron Glemann (http://www.electricprism.com/aeron/).  (Freeware)
    This package was adapted to work with SMF and no part of the original script was modified in any way.
    PHOTO GALLERY PLUS is an alternative to viewing pictures on a SMF website and is intended as a package add-on for Simple Portal.

Respected applications and developers concerning this modification:
    Aeva Media    - Developed by Nao/Gilles (c) Noisen.com / SMF-Media.com
Simple Portal - Developed by The Simple Portal Team - v2.3.1 (c)2008-2009   (http://simpleportal.net/)
PortaMX   - Developed by Feline (c)2008-2010 by PortaMx corp. (http://portamx.net/)
Slideshow     - Developed by Aeron Glemann  (c)2008 (http://www.electricprism.com/aeron/)                                             */



/* >>>>>>>START - User supplied info<<<<<<< */

/* Enter total number of pics to view for forum */
$total_pics = 15;

/* Set 'true' for recent display and 'false' for random display in forum photos */
$type0 = true;

/* Enter total number of pics to view for aeva */
$total_pics_aeva = 6;

/* Set 'true' for recent display and 'false' for random display in aeva media */
$type1 = true;

/* Enter topic id to view pics from
- set to 0 for whole forum
- board id in next version */
$topic_id = 0;

/* Settings for Forum or Aeva Pics:
1 - Strictly Forum Photo Attachments
2 - Strictly Aeva Photo Gallery
3 - Use both Forum and Aeva Pics */
$gallery_type = 2;

/* Other specific settings can be adjusted in: / slideshow / settings.php    */

/* >>>>>>>END - User supplied info<<<<<<<  */


global $boarddir;
   /*  Grab the photo viewer file. */
   if (file_exists('slideshow/photo_viewer.php'))
{
require_once('slideshow/photo_viewer.php');
$gallery_type = (int)$gallery_type;
photo_gallery_v1a($total_pics, $total_pics_aeva, $type0, $type1, $topic_id, $gallery_type);
}
else
   {
      echo 'You do not have PHOTO GALLERY PLUS installed... Please install the necessary package! ... ';
      echo 'Visit askusaquestion.net for support.';
      return;
   }



This was repackaged with the original authors consent.

Edit Dec 20th - Fixed AEVA from showing private document and photos and forced it to show only images. It should be good to go now for all SMF 2.0.   
Edit Jan 4th - I noticed that a last minute change to the photo_viewer.php file was not in the correct place in the zip... if you are using this redownload and install it or just copy the file to the slideshow folder from the zip.

1.0 people this may crash as I havent updated the files to reflect a folder location change.


[attachment deleted by admin]

hartiberlin

#1
2010 November 12, 11:05:19 am
Great !
Can you please post a demo link ?
Many thanks.

Regards, Stefan.

mikeymx5

#2
2010 November 19, 07:23:51 pm
Houstonmiataclub.com
On home page

I am about to do some updates that will involve a rewrite of the background PHP so I will post it up when done. The reason for my rewrite is because the forum image stuff doesnt work, and I would like to have easy options. Also this slide show cant tell the difference between images and video and to it can fail to start if it picks up the wrong info.

hartiberlin

#3
2010 November 19, 07:46:47 pm
Looks really great.

Can I use it with AEVA 2.04 galleries somehow ?

Please post again, when you have done the latest work on it.
Many thanks !

Regards, Stefan.

jarska

#4
2010 November 20, 11:11:07 am
That would be great with SMF gallery pro and portamx too? ::)

mikeymx5

#5
2010 November 21, 07:36:38 pm
no plans for SMF gallery pro - I have read to many bad things about people getting screwed when purchasing it and so I dont plan to ever use it or write anything for it.

Underdog

#6
2010 November 27, 02:44:24 am
Quote from: mikeymx5 ,  2010 November 19, 07:23:51 pm
Houstonmiataclub.com
On home page

I am about to do some updates that will involve a rewrite of the background PHP so I will post it up when done. The reason for my rewrite is because the forum image stuff doesnt work, and I would like to have easy options. Also this slide show cant tell the difference between images and video and to it can fail to start if it picks up the wrong info.


;D ... one of my first smf packages.. still available but I kind of scrapped fixing/upgrading it as I moved on to create other modifications/hacks and learn other stuff.

If you added some features and fixed up the code can you post us a copy? Add it to the SP thread also if you want.





This version : Click Here ... is the same but with the html cleaned up a bit.
 


mikeymx5

#7
2010 November 30, 09:01:43 pm
thank you Underdog... if its alright to repackage your code Ill make a package of what I am currently using and make a new easy installer.

I moved all the files to a single folder to make it more organized so that will have to change as well.

The only thing that I havent done was look into forum attachments, as far as I know it doesnt work and crashes... because I have little use for it I really dont care to spend time fixing it.

mikeymx5

#8
2010 December 20, 04:52:30 pm
Updated and attached package, will add a new version if I can find time to do the mods to it that I wanted.

Just an update - A new version of sideshow is out. Im going to add it to this package and add settings to be able to select pan zoom and sizes from the portal block. This should make it easy for all to customize.

I also would like to see fancy thumb nails on the side so that will be added.

I will probably give it a new name as I dont want to cause support problems with the original author and I dont plan to continue the SMF 1 support as I dont have it installed so can test any code.

mikeymx5

#9
2011 April 13, 10:34:05 pm
Ok made a few updates to this, and its getting better but I have a problem I cant figure out. Does anyone know how to make aeva pull from random pictures only the last albums.  I know that you can add Array(10) - 10 being the specific album number but i really want to make it pull photos from say the last to albums or from the last 30 days.

I added the image description and a album link to the slide show. If i can clean up the code I will post it up. You can view a demo on Houstonmiataclub.com

mikeymx5

#10
2011 July 30, 11:32:51 pm
OK I have made a heck of alot of changes to this code, but havent had the time to package it so let me post what I have here for all.

Demo at HoustonMiataclub.com

Currently the slide show will only show "Pictures" that the guest or user has visual access to and have been rated at least 3 stars in AEVA. This may have code left over for smf 1.0 but will only work for 2.0. I repeat it will only work for 2.0. I am a volunteer admin of the Houston miata Club and I have a new born child so dont expect much from me as far as cleaning up this and repackaging it, I just dont have the time.

I attached a zip file un zip it in the root of your SMF directory (so unzipped it should look like SMF/SLIDESHOW)

Here is the block code
Code Select
/* PHOTO GALLERY PLUS v1.2 - Intended for use with  *** Simple Portal ***
    visit: https://www.portamx.com/2052/mootools-animated-slide-show-block/ SMF/PortaMX support of this adapted version.
    Slideshow is a javascript class for Mootools 1.2 to stream and animate the presentation of images on your website.
    Copyright (c) 2008 by Aeron Glemann (http://www.electricprism.com/aeron/).  (Freeware)
    This package was adapted to work with SMF and no part of the original script was modified in any way.
    PHOTO GALLERY PLUS is an alternative to viewing pictures on a SMF website and is intended as a package add-on for Simple Portal.

    Respected applications and developers concerning this modification:
        Aeva Media    - Developed by Nao/Gilles (c) Noisen.com / SMF-Media.com
        Simple Portal - Developed by The Simple Portal Team - v2.3.1 (c)2008-2009   (http://simpleportal.net/)
        Slideshow     - Developed by Aeron Glemann  (c)2008 (http://www.electricprism.com/aeron/)           
        Several code edits were done thanks to Louis Lester for SMF 2.0 and AEVA Gallery   with permission from original author.                           */



/* >>>>>>>START - User supplied info<<<<<<< */

/* Enter total number of pics to view for forum */
$total_pics = 15;

/* Set 'true' for recent display and 'false' for random display in forum photos */
$type0 = true;

/* Enter total number of pics to view for aeva */
$total_pics_aeva = 6;

/* Set 'true' for recent display and 'false' for random display in aeva media */
$type1 = true;

/* Enter topic id to view pics from
- set to 0 for whole forum
- board id in next version */
$topic_id = 0;

/* Settings for Forum or Aeva Pics:
1 - Strictly Forum Photo Attachments
2 - Strictly Aeva Photo Gallery
3 - Use both Forum and Aeva Pics */
$gallery_type = 2;

/* Other specific settings can be adjusted in: / slideshow / settings.php    */

/* >>>>>>>END - User supplied info<<<<<<<  */


global $boarddir;
   /*  Grab the photo viewer file. */
   if (file_exists('slideshow/photo_viewer.php'))
{
require_once('slideshow/photo_viewer.php');
$gallery_type = (int)$gallery_type;
photo_gallery_v1a($total_pics, $total_pics_aeva, $type0, $type1, $topic_id, $gallery_type);
}
else
   {
      echo 'You do not have PHOTO GALLERY PLUS installed... Please install the necessary package! ... ';
      echo 'Visit askusaquestion.net for support.';
      return;
   }


[attachment deleted by admin]

b4pjoe

#11
2011 July 31, 05:20:59 am
Quote from: mikeymx5 ,  2011 July 30, 11:32:51 pm
Currently the slide show will only show "Pictures" that the guest or user has visual access to and have been rated at least 3 stars in AEVA.


Thanks for posting this. I think I have the slide showing working but I'm wondering if there is a way to have it display all images from a certain gallery or galleries?

mikeymx5

#12
2011 August 01, 09:03:25 pm
Yes you can assign specific gallerys, I'll look st the code tonight and show you where.

What function do you specifically what it to do for you? Latest photo, random? 3 stars and up everything?

b4pjoe

#13
2011 August 03, 01:56:21 am
All I need it to do is to show all files from one album. I tried the code you posted here and all that gives me a slide show window with the example image from the slideshow that never changes and it was filling my SMF error log. By reverting back to the code in the first post of this thread I was able to get it working but I had to make quite a few changes in the code but I do have a working slideshow now. Thanks.

mikeymx5

#14
2011 August 12, 03:56:43 am
OK what you need to change is on line 127 in the photo-viewer.php file.
Code Select
   /* Use aeva functions to show the media. */
if ($type1 == false)
{
   $aeva_images = aeva_listedItems(aeva_getMediaItems(0, $total_pics_aeva, 'RAND()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""'), true, '', 0);
}
else
{
   $aeva_images = aeva_listedItems(aeva_getMediaItems(0, $total_pics_aeva,'m.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd="" AND m.rating>="3"'), true, '', 0);
}
}


So some simple explanations
Show items in descending order
Code Select
'm.id_media DESC', true, array(),
else random order
Code Select
'RAND()', true, array()

Show only images
Code Select
'm.type = "image"

Show items with current access level and with out a password
Code Select
a.access LIKE "%-1%" AND a.passwd=""'

Show only Items with a 3 or greater rating (so far its the only way Ihave found to control what gets in the slide show.
Code Select
m.rating>="3"

mikeymx5

#15
2011 November 28, 10:57:06 pm
Some day I will get around to updating this... I have one problem that I identified. if you have a ' in the description of a photo it will crash the slide show. I need to make it clean the description to ASCII before it outputs it.

Does anyone have any suggestions when I do this I will try to add them in.   I also am going to remove all support for versions of SMF that I do not use and for other gallery packages as my version has evolved far beyond it.

kev

#16
2011 December 16, 10:27:29 pm
Please excuse me if i have this wrong, i am using SMF 2.1 and have SMF gallery installed i have tried to get this to work after install i have this message

"You do not have Aeva installed... Change gallery type to forum only!"

i changed the gallery type to "1" and got this message

"Fatal error: Call to undefined function sp_loadColors() in /public_html/smf/slideshow/photo_viewer.php on line 173"

Am i right thinking this should work with SMf ? i also presume this is a PHP block code ?

sorry again i am pretty new and still very much trying to get to grips of things

thank you and btw looks awesome

thnx

mikeymx5

#17
2012 April 03, 02:50:28 am
Sorry I just got back to working on this and fixing some long over due bugs such as if you have a ' character in the title or desc it crashes the slide show.

So what version of AEVA do you have?

mikeymx5

#18
2012 April 03, 03:07:12 am
Extract and up load this zip to your root smf folder.

Sorry i dont have time to package or clean up all the old code... this will only work for PortaMX and AEVA... I made many edits so Im sure I broke all the other functionality. All credit goes to the original author that wrote the code.

Also in this version it will pull the latest 7 pictures from the galler with a rating of 3 and up.  Have fun.


my block code
Code Select
/* PHOTO GALLERY PLUS v1.2 - Intended for use with  *** PortaMX and Aeva***
    visit: https://www.portamx.com/2052/mootools-animated-slide-show-block/ SMF/PortaMX support of this adapted version.
    Slideshow is a javascript class for Mootools 1.2 to stream and animate the presentation of images on your website.
    Copyright (c) 2008 by Aeron Glemann (http://www.electricprism.com/aeron/).  (Freeware)
    This package was adapted to work with SMF and no part of the original script was modified in any way.
    PHOTO GALLERY PLUS is an alternative to viewing pictures on a SMF website and is intended as a package add-on for Simple Portal.

    Respected applications and developers concerning this modification:
        Aeva Media    - Developed by Nao/Gilles (c) Noisen.com / SMF-Media.com
        Simple Portal - Developed by The Simple Portal Team - v2.3.1 (c)2008-2009   (http://simpleportal.net/)
        Slideshow     - Developed by Aeron Glemann  (c)2008 (http://www.electricprism.com/aeron/)           
        Several code edits were done thanks to Louis Lester for SMF 2.0 and AEVA Gallery   with permission from original author.                           */



/* >>>>>>>START - User supplied info<<<<<<< */

/* Enter total number of pics to view for forum */
$total_pics = 15;

/* Set 'true' for recent display and 'false' for random display in forum photos */
$type0 = true;

/* Enter total number of pics to view for aeva */
$total_pics_aeva = 6;

/* Set 'true' for recent display and 'false' for random display in aeva media */
$type1 = true;

/* Enter topic id to view pics from
- set to 0 for whole forum
- board id in next version */
$topic_id = 0;

/* Settings for Forum or Aeva Pics:
1 - Strictly Forum Photo Attachments
2 - Strictly Aeva Photo Gallery
3 - Use both Forum and Aeva Pics */
$gallery_type = 2;

/* Other specific settings can be adjusted in: / slideshow / settings.php    */

/* >>>>>>>END - User supplied info<<<<<<<  */


global $boarddir;
   /*  Grab the photo viewer file. */
   if (file_exists('slideshow/photo_viewer.php'))
{
require_once('slideshow/photo_viewer.php');
$gallery_type = (int)$gallery_type;
photo_gallery_v1a($total_pics, $total_pics_aeva, $type0, $type1, $topic_id, $gallery_type);
}
else
   {
      echo 'You do not have PHOTO GALLERY PLUS installed... Please install the necessary package! ... ';
      echo 'Visit askusaquestion.net for support.';
      return;
   }


[attachment deleted by admin]