===========
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
=========================================================================
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.
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.
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
Quote from: 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
Please check which board you are one, this board is for the
not released CPG1.5 and you are using 1.4
v0.2 (2009/11/11)
-----------------
* added: correct album icon for standard table on album list page
* fixed: pics without intermediate would be displayed incorrectly
I've added this one to the SVN as well.
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
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)
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.
mrdee:
Find in codebase.php
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
starttable("100%", '',0,$lang_meta_album_names[$SLIDERSET['slider_album']]).$lang_meta_album_names[$SLIDERSET['slider_album']]);
Does this help?
Quote from: Timos-Welt on June 09, 2010, 09:45:03 AM
mrdee:
Find in codebase.php
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
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.
Quote from: Joe Carver on February 16, 2010, 04:40:34 PM
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 :(
What do you mean with "displaying any album"? Link?
Quote from: Timos-Welt on August 08, 2010, 12:58:14 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
Quote from: lamama on August 08, 2010, 03:59:12 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.
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
Quote from: 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
Open
codebase.php, find
// 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
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');
}
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.
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.
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';
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
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
Hi,
Great work. Is there possibility to automaticly resize thumbnails in Slider and show all in equal heigh.
Great plug-in. But security issue persists.
Unregistered users are able to see pics from private albums.
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
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.
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.
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
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:
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
echo file_get_contents('http://yoursite.com/gallery_directory/index.php?file=slider/fetch');
Edit 2011-07-22: updated attachment
Quote from: 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.
Well, switching JPG and PNG will just pick one or the other, but it sounds like you want both, so, change it to...
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.
Quote from: Α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:
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
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. ;)
Quote from: hobert on July 20, 2011, 07:41:21 PM
Well, switching JPG and PNG will just pick one or the other, but it sounds like you want both, so, change it to...
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. ;)
Hi,
Quote from: Α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.
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]
Quote from: wildenborch on July 23, 2011, 07:07:51 AM
Is it possible to open the slider images in a _blank page instead of opening in the same page?
Replace
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\">
with
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\" target=\"_blank\">
three times.
Quote from: wildenborch on July 23, 2011, 07:07:51 AM
Is it possible to make the slider not clickable at all?
Remove
<a href=\"{$CONFIG['ecards_more_pic_target']}displayimage.php?pid=$slider_key\">
and
</a>
completely (three times).
Super!
Thank you very much for this quick reply!.
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".
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..
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:
$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).
Quote from: Αndré on November 01, 2010, 12:14:06 PM
Open codebase.php, find
// 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
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?.
Quote from: Niecher on March 11, 2013, 01:21:24 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.
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.)
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 :-[
Quote from: Αndré on July 20, 2011, 10:49:14 AM
Examples how you might use it on every external website:
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
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.
Quote from: tooold on October 13, 2013, 12:38:20 PM
Does this mean pages outside Coppermine Gallery? Would be great :D.
I forgot to say, Yes
Regards.
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!
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
$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..
Re: Slider 0.7
« Reply #5 on: Yesterday at 09:29:58 pm »
Hi,
I used to use the following code to have the slider shown on my website.
<iframe src="http://yoursite.com/gallery_directory/index.php?file=slider/fetch" width="100%" frameborder="0" /></iframe>
I updated to php to 7.2 and update Coppermine to 1.6.05 and installed Slider 0.8 and now this fetch code is giving me the following error:
Fatal error: Uncaught Error: Call to undefined function mysql_fetch_array() in /home/accountname/public_html/fotoalbum/plugins/slider/fetch.php:62 Stack trace: #0 /home/accountname/public_html/fotoalbum/index.php(78): include_once() #1 {main} thrown in /home/accountnamet/public_html/fotoalbum/plugins/slider/fetch.php on line 62
Is there something I should change in fetch.php ???
Thanks in advance for the help!
Quote from: wildenborch on February 22, 2019, 08:12:32 AM
Is there something I should change in fetch.php ???
See the Slider plugin thread in CPG 1.6 Plugins.