forum.coppermine-gallery.net

Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: Timos-Welt on January 03, 2009, 12:22:24 am

Title: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on January 03, 2009, 12:22:24 am
===========
   Slider v0.5
===========


What it does:
--------------

Displays a JavaScript slider of a meta album on album list page, compatible with any modern browser.
This plugin has been created for cpg1.5.x.

=========================================================================

Browser Compatibility
-----------------------

The JavaScript slider is tested and works fine in these browsers:
- IE 6
- IE 6 sp1
- IE 7
- Firefox 1.5 (Win)
- Firefox 2.x (Win)
- Firefox 2.x (Linux)
- Opera 8.x (Win)
- Opera 9.x (Win)
- Opera 9.x (Linux)
- Konqueror 3.5.x
- Safari 3.x (Win)
It probably works fine in many other browsers, too.

=========================================================================

Demo gallery
http://cpg15xdev.spaetbier.de/

=========================================================================

How to install:
---------------

* Download
* Unzip
* Uninstall any previous version via plugin manager
* Upload folder 'slider' into Coppermine's plugins folder
* Go to plugin manager page and install it

How to enable:
--------------

* To enable this plugin, you'll have to add "slider" to "the content of the main page" in coppermine's config in the section "Album list view". The setting should look like "breadcrumb/catlist/alblist/slider" or similar. For details, review the documentation that comes with coppermine (inside the docs folder) in the section "The gallery configuration page" > "Album list view" > "The content of the main page".

How to configure:
-----------------

* Use the additional button 'Slider' in admin menu.

Multiple instances of slider:
-------------------------

* You can only create one instance with this plugin. If you really want a second slider, download 'cpg1.5.x_plugin_slider2ndinstance_v0.5.zip' attached to this post and install as own plugin in parallel. Then add 'slider2' to your content of the album list page. But: Please consider that animating the slider will eat up CPU and slow down your gallery start page, especially with EnlargeIt! and watching videos. Two sliders will be very demanding to the visitor's browser and computer!

SVN:
https://coppermine.svn.sourceforge.net/svnroot/coppermine/branches/cpg1.5.x/plugins/slider/

Download latest SVN snapshot:
http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/slider.tar.gz?view=tar

Download from official download page:
http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_slider_v0.7.zip/download

=========================================================================
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Abbas Ali on January 03, 2009, 01:55:54 pm
I haven't seen the code yet - but if you are not using jquery for slider then you probably would like to do it as cpg15x will be shipped with jquery library in core. You might find ready made jquery plugins for slider.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on January 03, 2009, 03:39:11 pm
Found a nice one under GPL:
http://jscroller.markusbordihn.de/

I'll see what I can do, but I'll probably wait for the missing parts of the plugin documentation to be finished before I touch the plugin again. For the moment, it works just as it did with CPG 1.4, that's all I wanted to obtain for my plugins before the beta test starts.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Meelis on January 09, 2009, 08:19:39 am
Ok, i tryed this plugin but in my case it don't work correctly. http://hullumajand.pri.ee try to click on scrolling picture... It just cant find the picture... Also if i try to enter the slider admin menu then it give an error
Fatal error: Class 'Inspekt' not found in d:\www\plugins\slider\plugin_config.php on line 17


What i did wrongly and how to fix it? I am not good in php.  :P
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: SaWey on January 09, 2009, 08:37:19 am
Ok, i tryed this plugin but in my case it don't work correctly. http://hullumajand.pri.ee try to click on scrolling picture... It just cant find the picture... Also if i try to enter the slider admin menu then it give an error
Fatal error: Class 'Inspekt' not found in d:\www\plugins\slider\plugin_config.php on line 17


What i did wrongly and how to fix it? I am not good in php.  :P

Please check which board you are one, this board is for the not released CPG1.5 and you are using 1.4
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on November 11, 2009, 04:53:07 pm
v0.2 (2009/11/11)
-----------------
* added: correct album icon for standard table on album list page
* fixed: pics without intermediate would be displayed incorrectly
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on November 13, 2009, 12:14:58 pm
I've added this one to the SVN as well.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on January 02, 2010, 10:27:31 am
Update to 0.5

v0.5 (2010/01/02)
-----------------
- fixed: plugin didn't work together with other plugins
- reduced animation speed to make IE8 work with it
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Joe Carver on February 16, 2010, 04:40:34 pm
Slider does not always seem to hide Private Albums (thumbs) to un-logged visitor.

I have downloaded from svn today just to be sure...

To test/confirm visit with no user privileges:

1) Config setting to show random thumbs

2) Slider shows no private thumbs in ...  index.php - Home Page or album list when clicked from Home Page

3) Pick a thumb, click it, then click "Album list" example....index.php?cat=5

4) You will now see thumbs from Private albums - when clicked will result in error

confirmed with no other plugins running
(this took some time because I had 3 of yours and 3 of mine running together)
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: mrdee on June 08, 2010, 04:01:22 pm
Just migrating my site from cpg1.4 to 1.5 and noticed a small 'feature' with this plugin.

I've been hunting around to see how this is coded so I could post a solution, but didn't find it yet.  I'd appreciate any hints on where the code is located that adds the "menu icons" into the subject lines on all pages.

Even though I have the "menu icons" option set to "no" it turns them off everywhere except for the subject line in this slider plugin.  Here is the source code taken from my browser:

Quote
<td class="tableh1" colspan="1"><img src="images/icons/random.png" border="0" alt="" width="16" height="16" title="Random files" class="icon" />Random files</td>

I can't find where that "random.png" code is added to the page, but notice it is not an icon provided with the plugin, but from the main code.  I wondered if it is theme-related but it happens on all themes.  I toggled the option on/off and it still appears.  I'm suspecting that the menu icons is a new feature in cpg1.5 and that the plugin needs to be coded to be able to handle it being switched on or off.  Please can someone give me a tip where to look?

Thanks in advance.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on June 09, 2010, 09:45:03 am
mrdee:
Find in codebase.php
Code: [Select]
starttable("100%", cpg_fetch_icon($slider_icon[$SLIDERSET['slider_album']],0,$lang_meta_album_names[$SLIDERSET['slider_album']]).$lang_meta_album_names[$SLIDERSET['slider_album']]);and change to
Code: [Select]
starttable("100%", '',0,$lang_meta_album_names[$SLIDERSET['slider_album']]).$lang_meta_album_names[$SLIDERSET['slider_album']]);Does this help?
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: mrdee on June 09, 2010, 12:09:28 pm
mrdee:
Find in codebase.php
Code: [Select]
starttable("100%", cpg_fetch_icon($slider_icon[$SLIDERSET['slider_album']],0,$lang_meta_album_names[$SLIDERSET['slider_album']]).$lang_meta_album_names[$SLIDERSET['slider_album']]);and change to
Code: [Select]
starttable("100%", '',0,$lang_meta_album_names[$SLIDERSET['slider_album']]).$lang_meta_album_names[$SLIDERSET['slider_album']]);Does this help?

Thanks for the help Timos.  I tried it directly and got a syntax error.  I thought it was due to the ")" in the middle of the replacement code.  I removed this and the script works again, but now also without the table text title of "Random Files" which would make it harmonise with the rest of the tables in the page.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: lamama on August 08, 2010, 02:49:59 am
Slider does not always seem to hide Private Albums (thumbs) to un-logged visitor.

Installed your plugin today - it's really nice, but has an privacy problem, as Joe Carver mentioned before.

In the Gallery Root, everything is ok, but when displaying any album, the slider shows pics from non-public albums to guests.

not funny :(

Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Timos-Welt on August 08, 2010, 12:58:14 pm
What do you mean with "displaying any album"? Link?
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: lamama on August 08, 2010, 03:59:12 pm
What do you mean with "displaying any album"? Link?

Sorry, i meant 'category', not album.


I guess it's the same issue that had been posted in February.

User: Guest

http://www.DOMAIN.de/cpg/index.php = works fine

http://www.DOMAIN.de/cpg/index.php?cat=45
= slider shows the same thumbs I can see on the 'top rated' page when logged in as admin.
for category you can take any category. Tested a few, all the same result.

I checked the $forbidden_set - the query generated by slider - it seems to be ok, so it's really surprising that the result is not.

I'm not comfortable with posting my 'working' gallery link, so you may apply the 'no link, no support' policy here. Anyway, I've already uninstalled the plugin because of the issues. But would really like to see it working right.

CPG 1.5.6, bridged with SMF2RC3
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Αndré on August 11, 2010, 12:31:47 pm
I checked the $forbidden_set
I haven't looked at that issue nor at the code. But in cpg1.5.x I always use $RESTRICTEDWHERE in my queries. Maybe that helps.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: willy2010 on October 31, 2010, 12:21:35 pm
Hi !, I've installed the beautiful slider and works fine but I would like it show the slides ONLY in the main page, like an invitation. When goes to the category, I wish to show ONLY the category's album but NOT the slider that continue to work ! Is't possible to do this ? Thank you a lot and sorry for the disturb. willy
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Αndré on November 01, 2010, 12:14:06 pm
Hi !, I've installed the beautiful slider and works fine but I would like it show the slides ONLY in the main page, like an invitation. When goes to the category, I wish to show ONLY the category's album but NOT the slider that continue to work ! Is't possible to do this ? Thank you a lot and sorry for the disturb. willy
Open codebase.php, find
Code: [Select]
// Add search display action
$thisplugin->add_filter('plugin_block','slider_mainpage');
// Add filter for page head
$thisplugin->add_action('page_start','slider_head');
and replace with
Code: [Select]
if (!$superCage->get->keyExists('cat')) {
    // Add search display action
    $thisplugin->add_filter('plugin_block','slider_mainpage');
    // Add filter for page head
    $thisplugin->add_action('page_start','slider_head');
}
Title: Change title from 'random files' to 'Sample Images'
Post by: scohen125 on November 07, 2010, 12:09:01 am
This is a really small thing, but I looked at the code in all the files in the slide plugin and I cannot figure out where to change this.  I would like to change the title from 'random files' to 'Sample Images'.  Random Files doesn't sound right on my site, because the slider is displaying images not files and the word random may not make sense too users who are not familiar with the file structure of the site.

I love the plugin.  I think it makes the site.  I put up the theme 'curves' and the site looked OK, but adding the slider makes it look great.  It is the first thing that everyone I show the site to comments on.  So thank you.  I appreciate the plugin.

www.retinagallery.com is my site.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Αndré on November 07, 2010, 11:35:32 am
If it's not in the plugin code, it probably uses the language file(s) in the lang/ directory. So you'll have to modify either the English language file or hard-code it in the plugin code.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: scohen125 on November 07, 2010, 04:10:06 pm
It was in the English Language File.  Thank you for the suggestions.  I changed the site so now it reads 'Sample Images' on top of the homepage.

www.retinagallery.com
Here is the line I changed in the English Language File for anyone interested.
$lang_meta_album_names['random'] = 'Sample Images';
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Cmaniac on November 26, 2010, 01:46:58 pm
Hello.

Have you coded 0.7 version of slider2? Currently slider2 0.5 is causing my gallery to crash and when installing together with 0.7 of slider enlargetit! wont work.

Thanks
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: sbrenna on December 14, 2010, 04:28:21 pm
Great plugin!
I would like to have the slideshow displayed on all pages in the header (not just on the front page), so I need to put the code to call the slideshow in the template.html (I guess). I did this with the flashcloud plugin, however I can't figure out how to do this with this one. Any help would be appreciated.

Thanks
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: saleks on December 16, 2010, 09:55:50 am
Hi,
Great work. Is there possibility to automaticly resize thumbnails in Slider and show all in equal heigh.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: fmk on January 02, 2011, 07:14:48 am
Great plug-in. But security issue persists.

Unregistered users are able to see pics from private albums.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: spider666 on January 25, 2011, 11:04:18 pm
Hello. I discover another issue. Thge slide show pictures who have not be validated by the admin :-( any update ?

Many thanks for your grat job
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: lurkalot on March 06, 2011, 02:44:32 pm
Any ideas on how to make this slider work with PNG files?  Please.  They don't seem to display, all my jpg's do just fine.

Any help would be appreciated.

EDIT:  I can get the PNG files to show by editing the codebase.php file, and replacing instances of jpg with PNG.  I can't seem to get both types to display though, and that's what I need.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: TCWORLD on May 15, 2011, 09:45:26 am
I have been having problems with this addon. It installs properly, but when it appears on the gallery page, all i get is 1 image in the centre that moves a couple of pixels back and forth.
(I am using cpg1.5.8 and IE9).

I'm not sure why there is a problem, but I have switched to using the imageflow plugin instead, but I thought it worth reporting here that there seems to be a problem with the slider plugin.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Cath22 on July 09, 2011, 05:35:35 pm
The previous slider (for 1.4) showed on the first page a random selection, but when going into a category, it showed only photos from that particular category (or album). I like that very much.
But in this new version (for 1.5) you always get a random selection from all photos instead of the particular category or album....

Can something to be done at this in the code, or is it waiting for a newer version?

example http://www.fotofantastic2.nl

Thanks
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Αndré on July 20, 2011, 10:49:14 am
If you want to embed the slider on an external page, put the attached file into the slider plugin directory and call it via index.php?file=slider/fetch. It just returns the slider without any other Coppermine output.

Examples how you might use it on every external website:
Code: (inline frame) [Select]
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
Code: (PHP) [Select]
echo file_get_contents('http://yoursite.com/gallery_directory/index.php?file=slider/fetch');

Edit 2011-07-22: updated attachment
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: hobert on July 20, 2011, 07:41:21 pm
Any ideas on how to make this slider work with PNG files?  Please.  They don't seem to display, all my jpg's do just fine.

Any help would be appreciated.

EDIT:  I can get the PNG files to show by editing the codebase.php file, and replacing instances of jpg with PNG.  I can't seem to get both types to display though, and that's what I need.

Well, switching JPG and PNG will just pick one or the other, but it sounds like you want both, so, change it to...

Code: [Select]
WHERE (filename LIKE '%.jpg' OR filename LIKE '%.png') AND filename not like 'youtube_%'
Please note the parenthesis locks the two with OR together, so either of these conditions will be met, as well as the rest of the WHERE statement.
Title: Re: Re: Slider animation on album list page for cpg1.5.x
Post by: lurkalot on July 22, 2011, 08:12:56 pm
If you want to embed the slider on an external page, put the attached file into the slider plugin directory and call it via index.php?file=slider/fetch. It just returns the slider without any other Coppermine output.

Examples how you might use it on every external website:
Code: (inline frame) [Select]
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
Code: (PHP) [Select]
echo file_get_contents('http://yoursite.com/gallery_directory/index.php?file=slider/fetch');

Edit 2011-07-22: updated attachment

Fantastic, thanks Andre, it works very nicely, and is just what I wanted. ;)

Well, switching JPG and PNG will just pick one or the other, but it sounds like you want both, so, change it to...

Code: [Select]
WHERE (filename LIKE '%.jpg' OR filename LIKE '%.png') AND filename not like 'youtube_%'
Please note the parenthesis locks the two with OR together, so either of these conditions will be met, as well as the rest of the WHERE statement.

Thanks hobert, this is handy to know, I'll give that a try. ;)
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: wildenborch on July 23, 2011, 07:07:51 am
Hi,

If you want to embed the slider on an external page, put the attached file into the slider plugin directory and call it via index.php?file=slider/fetch. It just returns the slider without any other Coppermine output.

Is it possible to open the slider images in a _blank page instead of opening in the same page?
Is it possible to make the slider not clickable at all?

Best regards

link to my website: [url]http://www.vanveen-nl.com//url]
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Αndré on July 23, 2011, 09:11:25 am
Is it possible to open the slider images in a _blank page instead of opening in the same page?
Replace
Code: [Select]
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\">with
Code: [Select]
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\" target=\"_blank\">three times.


Is it possible to make the slider not clickable at all?
Remove
Code: [Select]
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\">and
Code: [Select]
</a>completely (three times).
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: wildenborch on July 23, 2011, 10:16:31 am
Super!
Thank you very much for this quick reply!.

Title: Re: Slider animation on album list page for cpg1.5.x
Post by: mr.bena on March 26, 2012, 02:28:33 pm
Issue with this plugin:

* IE always crash. (I use IE 8)
* Last upload pictures shown even before approved by the gallery admin.

Question : How can I set a specific album in my gallery for the slider. It only offers "Last upload, Random Files, Mot Viewed and Top Rated".


Title: Re: Slider animation on album list page for cpg1.5.x
Post by: mr.bena on April 03, 2012, 02:25:19 am
This plugin would be very great if it offers "Choose Album" option apart form "Last Upload, Random, Most Viewed, Top Rated".

Can anyone suggest me how would I set one of my albums for this sliding pictures..
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: hobert on May 21, 2012, 12:55:10 am
I don't know this particular plugin at all, but I am familiar with the slider code.  You need to change this line in codebase.php:

Code: [Select]
$slider_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' $slider_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $sliderlimit";by replacing $META_ALBUM_SET with AND aid IN (95, 96, 97)   (the number being the album(s) you want).
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Niecher on March 11, 2013, 01:21:24 pm
Open codebase.php, find
Code: [Select]
// Add search display action
$thisplugin->add_filter('plugin_block','slider_mainpage');
// Add filter for page head
$thisplugin->add_action('page_start','slider_head');
and replace with
Code: [Select]
if (!$superCage->get->keyExists('cat')) {
    // Add search display action
    $thisplugin->add_filter('plugin_block','slider_mainpage');
    // Add filter for page head
    $thisplugin->add_action('page_start','slider_head');
}

I tried this code but it causes an error in php and displays a message saying something like "not an object". I do not remember the exact message. Anyway, I could not use it.

Then, as the slider appears in all categories, is it possible to show only the latest files for each category where the slider is displayed instead of displaying the latest files uploaded in the gallery?.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Niecher on March 11, 2013, 01:31:10 pm
I tried this code but it causes an error in php and displays a message saying something like "not an object". I do not remember the exact message. Anyway, I could not use it.

Then, as the slider appears in all categories, is it possible to show only the latest files for each category where the slider is displayed instead of displaying the latest files uploaded in the gallery?.

Sorry ;D I meant random files in each category where the slider is displayed instead of random files from the gallery.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Arminius on August 02, 2013, 09:10:50 am
Thanks for the slider, it works great!

(by the way: I did not need to install a second one for my homepage as i incorporated my gallery in a website window.)
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: tooold on October 13, 2013, 12:38:20 pm
At page 2 in this thread Andre explained how to use this slider on any external page. Does this mean pages outside Coppermine Gallery? Would be great  :D.
If so, may I please ask if someone can explain a bit more about what to put where, I'm not at all familiar to coding. Of course, I do understand where to change the page/folder to my own, but not where to put the files. (The zip file is explained, I'm referring to the other two codes).

If impossible to understand what I mean please ask and I will try to write it different. I'm far from good in english  :-[
Title: Re: Re: Slider animation on album list page for cpg1.5.x
Post by: Niecher on October 13, 2013, 03:16:45 pm
Examples how you might use it on every external website:

Code: (inline frame) [Select]
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
Code: (PHP) [Select]
echo file_get_contents('http://yoursite.com/gallery_directory/index.php?file=slider/fetch');

Hello tooold

If you want to display the slider, in an external page html, use the first code.
If you want to display the slider, in an external page php, use the second code.

Put these codes, in an appropriate line of your html or php document, right where you want to display the slider. Depending on the design of your website and in which position in your document you want.

Regards.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Niecher on October 13, 2013, 03:36:22 pm
Does this mean pages outside Coppermine Gallery? Would be great  :D.

I forgot to say, Yes

Regards.
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: tooold on October 14, 2013, 08:49:29 pm
Works great  :D :D
Thank you so much, Andre for telling about this briljant spolution and Niecher for explaining it perfect and in such an easy way. I feel shame for not understanding that it was two options to choose from.

I use it in a (test) SMF bridged with Coppermine, after not being able to make cmpfetch work like it did about a year ago.

Once again, Andre and Niecher: Thank you!
Title: Re: Slider animation on album list page for cpg1.5.x
Post by: Cmaniac on March 18, 2014, 10:08:49 am
I was wondering whether a replacement for ORDER by RAND() in line 100 could be deployed.

ORDER BY RAND() is inefficient (but easy to use) and as my galleries grow, it causes a big hog. Right now the query in line 100

Code: [Select]
  $slider_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' $slider_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $sliderlimit";

takes more than 300ms to finish (4700+ pics), and, considering my gallery loading times (homepage loads in about 2.00s), this is a good waste of time for one DB query..

Not asking, just wondering..