forum.coppermine-gallery.net
Support => cpg1.5 plugins => cpg1.5.x Support => cpg1.5 plugin contributions => Topic started by: Gene-2008 on January 07, 2010, 07:34:09 pm
-
/**************************************************
Coppermine 1.5.x Plugin - Slideshowit
*************************************************
Copyright (c) 2010 Gene F. Young (www.genefyoung.com)
*************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
If you use this plugin please post a link to your site on the
announcement thread. So others can see it in more uses.
***************************************************/
What it does:
-------------
Uses a JavaScript to display a slideshow on front page. The images are scaled up/down to fit the
available Browser window. Controls are provided to play in forward/reverse direction, to play/pause,
to pause and go to previous or next image. Clicking on the image can be configured to go directly
to the image or to the album containing the image.
This plugin has been created for cpg1.5.x.
=========================================================================
How to install:
---------------
* Unzip
* Upload folder 'SlideShowIt' into Coppermine's plugins folder
* Go to plugin manager page and install it
* Go to SlideShowIt Manager on the admin menu and make your selections
How to enable:
--------------
* To enable this plugin, you'll have to add "SlideShowIt" 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/SlideShowIt"
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 'SlideShowIt Manager' in admin menu.
Options you can select:
Use meta albums from list on the next line ---> yes or no
Choose a Meta album for use as SlideShowIt display ---> Random, Last Upload, Most Viewed, Top Rated.
Or if not using a meta album choose an album to display ---> If not using meta albums the choose any other Visible Album
Number of pictures in the Slideshow ---> (4-60)
Slideshow speed in ~seconds ---> (1-10)
How should SlideShow be aligned ---> Left, Center, Right
Select whether Controls are Vertical or Horizontal ---> Vertical or Horizontal
Select where Controls are located ---> Left if vertical or Top if Horizontal
---> Right if vertical or Bottom if Horizontal
Skip portait mode pictures ---> yes or no
Enable hover text when mouse over slides? ---> yes or no
Enable User SlideShow Album Selection ---> yes or no
Click goes directly to Image vs. going to Image Album ---> yes or no
Show Album Description as Title above slideshow ---> yes or no
Enable Image transitions for Browsers that support it? ---> yes or no
Location of list allowing user to select SlideShow album. ---> yes or no
=========================================================================
Browser Compatibility:
----------------------
The JavaScript slider is tested and works perfectly in these browsers:
- IE 6/7/8
- Firefox
It probably works fine in many other browsers, too.
=========================================================================
Credits:
--------
This plugin is written by Gene F. Young. I looked at "slider" by Timos-Welt as a model to start with.
Don't try to contact the plugin author for support - post on the board publicly instead.
=========================================================================
Change log:
-----------
v1.0 (2010/01/07)
-----------------
* initial release
I have test this on Classic theme and others.
You can see a DEMO for now at the development 1.5.x test site
http://gfyoung.homeip.net/cpg15x/index.php?theme=classic (http://gfyoung.homeip.net/cpg15x/index.php?theme=classic)
Download: http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/cpg1.5.x_plugin_slideshowit_v1.4.zip/download
Since I probably in the future will take the 1.5.x development site offline I have
attached two screen captures showing the slideshow and slideshow Admin.
I only speak english so I only attached the english.php but the plugin does use language files
so any contributions will be added to next releases.
I have a version for 1.4.25 that I can release if requested.
Comments and suggestions are welcomed,
Gene
-
Very promising.
Please let me give you some suggestions for improval (don't get me wrong, I'm not trying to bash you, but I'm trying to improve the plugin).
- Don't use capitalization in folder or file names; naming your plugin folder "SlideShowIt" is not an option - name it "slide_show_it" instead - see Developer documentation -> Plugin Writing for Coppermine -> Preparations -> Choose a name (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_plugins.htm#plugin_writing_preparation_name) and Developer documentation -> Plugin Writing for Coppermine -> Naming conventions -> Folders (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_plugins.htm#plugin_writing_naming_conventions_folders)
- For "the content of the main page", you should not request "SlideShowIt" to be filled in, but request users to fill in "slideshowit" instead
- For "the content of the main page" you could show the setting on the plugin's config screen as well and make the user aware of the need to add "slideshowit" to the field's content
- Using radio buttons for yes/no toggles is a bad idea in terms of usability - see Developer documentation -> Coding guidelines -> Usability -> Forms (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_coding.htm#dev_coding_usability_forms)
- Adding even more icons to a pluginis not a bright idea imo if similar icons already exist. You should use the icons that come with a theme if you can. If a theme doesn't have icons, use the default icons instead. Take a look at the plugin LightBox Slideshow jquery v1.0 (aka Lightbox NotesFor.net) (http://forum.coppermine-gallery.net/index.php/topic,62905.0.html) to get an idea how this works
- Adding a link to the plugin manager from your plugin's config panel isn't necessary imo
-
Very promising.
Please let me give you some suggestions for improval (don't get me wrong, I'm not trying to bash you, but I'm trying to improve the plugin).
- Don't use capitalization in folder or file names; naming your plugin folder "SlideShowIt" is not an option - name it "slide_show_it" instead - see Developer documentation -> Plugin Writing for Coppermine -> Preparations -> Choose a name (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_plugins.htm#plugin_writing_preparation_name) and Developer documentation -> Plugin Writing for Coppermine -> Naming conventions -> Folders (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_plugins.htm#plugin_writing_naming_conventions_folders)
Ok I have corrected this and will submit in next version.
- For "the content of the main page", you should not request "SlideShowIt" to be filled in, but request users to fill in "slideshowit" instead
Ok I have corrected this and will submit in next version. The code is actually doing a strtolower anyway but I changed as suggested.
- For "the content of the main page" you could show the setting on the plugin's config screen as well and make the user aware of the need to add "slideshowit" to the field's content
Ok I have added text to the config page detailing this and will submit in next version.
- Using radio buttons for yes/no toggles is a bad idea in terms of usability - see Developer documentation -> Coding guidelines -> Usability -> Forms (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/docs/en/dev_coding.htm#dev_coding_usability_forms)
I will add this in a future version. However, the yes/no change is still only one click.... ;)
- Adding even more icons to a pluginis not a bright idea imo if similar icons already exist. You should use the icons that come with a theme if you can. If a theme doesn't have icons, use the default icons instead. Take a look at the plugin LightBox Slideshow jquery v1.0 (aka Lightbox NotesFor.net) (http://forum.coppermine-gallery.net/index.php/topic,62905.0.html) to get an idea how this works
I understand about not adding icons and even better that it would be good to use the ones from a theme if available.
I don't understand the example you pointed to above though. It does not, at least to me, appear to be using the icons from either the theme OR the default ones from the 1.5.x images. Could you please say a little more here about what you are suggesting. ???
- Adding a link to the plugin manager from your plugin's config panel isn't necessary imo
Ok I have removed and will submit in next version.
Thanks for the suggestions,
Gene
-
@ Gene-2008,
Look in codebase.php (LightBox) - find:
set_js_var('plugin_lightbox_nfn_image_btnprev', $theme_navbar_folder . 'images/navbar/left.png');
Change to:
set_js_var('plugin_lightbox_nfn_image_btnprev', $theme_navbar_folder . 'images/icons/left.png');
Along with the lines below it too.
You will then see the effect that Joachim describes.
-
Maybe I am blind...but I don't see the code you are talking about at all.
I looked in this zip:
cpg1.5x_plugin_lightbox-notes-for-net_v1.0.zip
cpg1.5x_plugin_lightbox_v1.0.zip
I finally found something like what you describe in:
cpg1.5.x_plugin_lightbox-notes-for-net_v2.2.zip
So what version are you talking about and which one should I be looking at?
Thanks for the reply,
Gene
-
Sorry about that. This is the link to the version I was referring to. It is a different version of that
plugin. At the bottom of the page you can download the package - "Download GNU tarball"
http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/lightbox_notes_for_net/
-
Please note the version at the start of this thread is now 1.1.
It has all the suggested fixes except the elimination of the yes/no and use theme icons for buttons.
I could not find in the CPG1.5.x images the necessary buttons to have them be used.
I needed reverse, back one, pause, play, forward one, forward, and up. And the hover states for those.
If I assign as follows:- << as reverse
- < as back one
- > as forward one
- >> as forward
- and the thumbnails.png as up
Which is how they are intended by coppermine to be used, then I don't have anything for play and pause.
The plugin does have a style.css that the user can use to add any icons that their theme uses.
Suggestions welcomed,
Gene
-
Gene, if you can please try to get familiar with the subversion repository (see corresponding section in documentation (http://documentation.coppermine-gallery.net/en/dev_subversion.htm)), because that's what we use for collaborative development. Once you got a grip on that, it's agreat tool.
I have added your plugin to the subversion repository. Web SVN access: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/slideshowit/
Why on earth did you build your plugin on the initial enlargeit plugin (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/enlargeit/)? All the things I corrected in that plugin turn up once more in your plugin, so there's a lot of work ahead for me once more. Let me give you an example: it's not a good idea if you want to store 15 settings for your plugin to create a separate table with 15 columns and then store one record inside that table (15 columns wide). Instead, you create a table with two columns (name/value) and add 15 records (i.e. rows) to that table, or (even better) use coppermine's existing config table to accomplish that - see http://documentation.coppermine-gallery.net/en/dev_plugins.htm#plugin_writing_database_config .
Anyway, please understand that I'm not trying to bash you - in the end, you experience the same thing other plugin authors experience: the functionality of a plugin is comparatively easy to create, but the config section is hard to create and takes a lot of work. This needs to be improved in cpg1.6.x, but for now we have to come up with a good solution for cpg1.5.x: I have created a scheme for plugin config pages that should fit most needs - all that is left to do is come up with documentation that explains this for all plugin authors, so I will use your plugin as an example to show how to build a config screen from scratch. Please stand by ;).
-
Gene, if you can please try to get familiar with the subversion repository (see corresponding section in documentation (http://documentation.coppermine-gallery.net/en/dev_subversion.htm)), because that's what we use for collaborative development. Once you got a grip on that, it's agreat tool.
Actually I do use the SVN...for cpg1.5.x.
I have added your plugin to the subversion repository. Web SVN access: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/slideshowit/
Thanks I will use it for future changes.
Why on earth did you build your plugin on the initial enlargeit plugin (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/enlargeit/)?
I did not start with EnlargeIt... ??? I started as I said in the credits with slider by Timos-Welt.
All the things I corrected in that plugin turn up once more in your plugin, so there's a lot of work ahead for me once more. Let me give you an example: it's not a good idea if you want to store 15 settings for your plugin to create a separate table with 15 columns and then store one record inside that table (15 columns wide). Instead, you create a table with two columns (name/value) and add 15 records (i.e. rows) to that table, or (even better) use coppermine's existing config table to accomplish that - see http://documentation.coppermine-gallery.net/en/dev_plugins.htm#plugin_writing_database_config .
Not debating just asking: why is it not a good idea? Is there a performance impact, space impact or what?
Anyway, please understand that I'm not trying to bash you - in the end, you experience the same thing other plugin authors experience: the functionality of a plugin is comparatively easy to create, but the config section is hard to create and takes a lot of work. This needs to be improved in cpg1.6.x, but for now we have to come up with a good solution for cpg1.5.x: I have created a scheme for plugin config pages that should fit most needs - all that is left to do is come up with documentation that explains this for all plugin authors, so I will use your plugin as an example to show how to build a config screen from scratch. Please stand by ;).
Thanks for you effort...I will look forward to it,
Gene
-
I did not start with EnlargeIt... ??? I started as I said in the credits with slider by Timos-Welt.
Both plugins are Timo's work, so there might be the same 'mistakes' in both plugins ;)
-
Not debating just asking: why is it not a good idea? Is there a performance impact, space impact or what?
Performance impact and best practise are the reason. To store 15 config settings you simply don't have to create a table with 15 columns. If you're inviting 15 friends to your house you don't buy 15 cases of beer with only 1 bottle inside each case. You buy one case instead with (at least) 15 bottles in it (well, not the best analogy if I think about it twice: when I invite 15 friends I have to buy 5 cases of beer at least... ;D). In other words: you just don't code that way efficiently.
Joachim
-
If you store your values in the cpg config table, you can easily access that values later via $CONFIG['your_value'].
-
When I hit the "Submit" button after the configuration, a blank page appears with a "Fatal error" text. :o
-
Are you using on 1.5.x?
Did it work with default values?
Have you tried with Classic theme?
What values did you put in the fields?
I have not tried this on 1.5.8. Notice this was release on Jan 12.
I will update and try asap.
Gene
-
Fixed an issue with the input button in the Config section.
Please post back success or failure.
Gene
-
Hi Gene,
can I download / install the slideshow-plugin via admin panel in my gallery?
-
Normal process download the one just uploaded I.e. my post before this one.
Unzip, copy to website plugins directory and install via plugin manager.
Gene
-
At the pakage-icon there is not the green-symbol and when I click on it, a warning appears, that the version is not compatibel with my gallery-version and a installation can crash my gallery.
Should I install it? ???
-
Ok...I haven't mess with this in a while. ::)
Use this version. The other is safe but this one should not give you the warning.
Gene
-
Now the submit-button works, thanks Gene. ;D
-
Would be nice to see it in action on your site...
Care to post a link?
You are welcome,
Gene
-
I found another slider, so I deinstall yours (maybe for the first). However, thanks again for the great support. ;)
http://resident-evil-virus.de/gallery/index.php
-
When I hit the "Submit" button after the configuration, a blank page appears with a "Fatal error" text. :o
I am having this same experience - fatal error. Using 1.4 and also tried to download the zip file you suggested in your reply to nemesis13.
Thank you.
-
hello all sorry for my English but I am Italian,
I have a problem, I installed this plungin, configure the options and then when I confirm my return error "Fatal error" and in fact I do not keep the changes you know that I chose to give me a hand? thanks
-
I am having this same experience - fatal error. Using 1.4 and also tried to download the zip file you suggested in your reply to nemesis13.
Thank you.
Do you mean Coppermine 1.4? If so this plugin will not work.
Gene
-
hello all sorry for my English but I am Italian,
I have a problem, I installed this plungin, configure the options and then when I confirm my return error "Fatal error" and in fact I do not keep the changes you know that I chose to give me a hand? thanks
Did you use the one at the beginning of the thread or the one I fixed that is post further down in the thread?
Gene
-
I tried with all versions of this post, the first gives me error saying "fatal error" another tells me not for my version and should not continue, I howl from a number of coding errors ???
-
Please enable debug mode and post the real error message.
-
I'm sorry but has suffered another problem with the gallery, I have to solve x first, do not appear more 'classes, just solve this problem with this plungin try again.
thanks for now
-
I have installed it. Very Cool! Thanks.
http://www.youmeimei.tk - Edit by André: Link not safe for work!
-
not safe link? Why?
-
not safe link? Why?
Beautiful and sexy girls' pictures
Read the board rules.
8. Post links
When posting a support request, it's helpfull for supporters in most cases to see what the actual page looks like, that's why it's mandatory that you always post a link to your coppermine gallery page when asking for support. If your site contains adult content, make sure to post a warning together with your link!
Supporters might get into issues if they accidentally visit a page that interferes with their employer's internet policy. If your site contains adult content (even mild nudity even falls into this category), post the words "not safe for work" next to the link.
-
8. Post links
When posting a support request, it's helpfull for supporters in most cases to see what the actual page looks like, that's why it's mandatory that you always post a link to your coppermine gallery page when asking for support. If your site contains adult content, make sure to post a warning together with your link!
Supporters might get into issues if they accidentally visit a page that interferes with their employer's internet policy. If your site contains adult content (even mild nudity even falls into this category), post the words "not safe for work" next to the link.
I see. Thank you for your help!
-
Gene-2008, I'm Impressed by your Demo and love the ability of the picture size changing with the browser window size. I'm having difficulty getting the plugin
to work, I'm using Coppermine V 1.5.8 I install the Plugin as any other, set the Content of the Main Page to:
slideshowit/breadcrumb/catlist/alblist
And I End Up with this on the Main Page:
\n"; } else if ($slideshowit_control_dir == 1 && $slideshowit_control_loc == 1) { //11 = vertical left echo "\n"; echo $controls_vert_placeholder;
//controls are a column echo "\n"; echo $control_title; } else if ($slideshowit_control_dir == 1 && $slideshowit_control_loc == 0 ) { //10 vertical right
echo "" . $controls_vert; // end picture area and start new colum for controls echo "\n"; echo $control_title; } else if ($slideshowit_control_dir == 0 &
& $slideshowit_control_loc == 0 ) { //00 horiz bottom echo "\n"; echo $control_caption; //Caption below the title echo $controls_horiz; //controls are a row
at bottom after picture } if ($slideshowit_User_Selection && !$slideshowit_usemeta && $slideshowit_User_List_Loc) { echo ''; } ?>
' . '
' . $lang_plugin_slideshowit['album'] . "" . '' . "\n" . '' . "\n" . '' . "\n" . '
This has me confused to what the cause is for I tried Joe Carvers IScroll Plugin and it works ok.
The link to the website is: www.fishermansidealsupplyhouse.com/photogallery
Any help or insight would be appreciated. Thanks
-
Sorry there is a problem with the code and newer php versions.
I will fix the uploaded version asap but until then edit the codebase.php file and replace all occurrences of <? with <?php
Look around lines 236 and 242.
Gene
-
Thanks Gene, as you said the range it was line 238 that had to be fixed.
Now Another problem/bug "How Should The Slide Show Be Aligned" "Left, Center, Right" ? No matter what setting the alignment stays at left.
-
Sorry Gene, I found one more "<?" 5 Lines Before The Last One
Andy
-
Glad it is working.
BTW you can hide the Random title via an option in the config.
Also were are y'all located?
Gene
-
Hye, Gene
I'm Located In Saint Petersburg, Florida where I work and run this website for, and live in Largo, FL a few miles away.
Thanks Again for your Help
Andy
-
I have been fighting with the plugin, and finally found the "debug" information which indded pointed me to the source of the problem.
The problem: when configuring SSI and saving, I was getting a blank page with just "fatal error". A look at the logs gave me some clue, but I doubly checked with the debug info..
Error message:
While executing query 'UPDATE `cpg_mod_SlideShowIt` SET slideshowit_albumid=('16')' in plugins/slideshowit/codebase.php on line 34
mySQL error: Table 'guideloc_cpg667.cpg_mod_SlideShowIt' doesn't exist
And indeed line 34 in codebase.php did say
$s="UPDATE `{$CONFIG['TABLE_PREFIX']}mod_SlideShowIt` SET slideshowit_albumid=('$slideshowit_albumid')";
which I did change to
$s="UPDATE `{$CONFIG['TABLE_PREFIX']}mod_slideshowit` SET slideshowit_albumid=('$slideshowit_albumid')";
However, there is probably some cache-ing mechanism, since my change do not seem to have effect and the error message does persists (I will update this info later)
Probable cause of the error: the program did presumaby test fine on Windows, where upper/lower case do not matter, ie the files Slide and slide are the same, while in Linux they are 2 different animals.
-
(Some days later) The (PHP) cache was still present on my site the next day (so update did not work) but has been updated as of now, several days later.
So the suggested edit is the one to go... with some patience waiting for cache update: your mileage will vary!
-
i have a problem
when i.m loggin in as a admin or registered user - evr looks Ok
when i'm login out
a have
"Critical error
There was an error while processing a database query"
albums list makes the same error database
Album list - Critical error There was an error while processing a database query" "link to www.mywebsite/index.php?cat=0 is error ?? when cat=1 or 2 i see pictures and slideshowit works Ok
Last uploads - ok
Last comments - ok
Most viewed - ok
Top rated - ok
My Favorites Search - ok
some albums are public some "only for registered users"
where is the problem - please help :)
-
I am getting database error for my site http://standrewumc.com/photos (http://standrewumc.com/photos):
While executing query 'UPDATE `cpg_mod_SlideShowIt` SET slideshowit_albumid=('30')' in plugins/slideshowit/codebase.php on line 34
mySQL error: Table 'standrew_copp1.cpg_mod_SlideShowIt' doesn't exist
Debug file attached.
-
Try the fix from earlier in this thread
Find and Edit line 34 in codebase.php
$s="UPDATE `{$CONFIG['TABLE_PREFIX']}mod_SlideShowIt` SET slideshowit_albumid=('$slideshowit_albumid')";
NOTE The change in caps...
$s="UPDATE `{$CONFIG['TABLE_PREFIX']}mod_slideshowit` SET slideshowit_albumid=('$slideshowit_albumid')";
Gene