Coder Social home page Coder Social logo

silvermax / maxskitter Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 7.0 731 KB

silverstripe module for slides management and presentation with jQuery skitter plugin. Available on Packagist for simple installation using composer!

Home Page: http://www.silvermax.sk

PHP 15.90% CSS 16.08% JavaScript 67.74% Scheme 0.28%

maxskitter's Introduction

**MaxSkitter** is SilverStripe module for slides management and presentation with jQuery skitter plugin.

**Skitter** is full-featured jQuery Slideshow plugin with beautifull transitions. Is highly configurable and has good performance. Skitter website is here: http://www.thiagosf.net/projects/jquery/skitter/, github sources here: https://github.com/thiagosf/SkitterSlideshow

This module makes Skitter working with your SilverStripe installation. 

## Key features

* Almost all Skitter options editable via SS installation in 3 places: config file (global config), SiteConfig (global config) and Page (page specific config)
* Any Page can have unlimited Slides, Slides are shared between Pages. You can enable/disable any Slide on any Page.
* Any Page can have any combination of Slides, custom sort order available on per page basis too.
* Each slide can point to External or Internal URL.

## Requirements

SS 2.4:
    dataobject_manager
    uploadify
SS 3.0:
    sortablegridfield (optional)

## Installation

    Place module into root of your SS installation
    Dev/build your SS installation

## Configuration
### Skitter options

You can configure skitter options in 3 places (its up to you which one you use, but remember, that Page config will overwrite SiteConfig & staticConfig and SiteConfig will overwrite staticConfig).

**StaticConfig example (placed in mysite/_config.php):**

```php
MaxSkitterDefaults::set_staticConfig(array(
    "animation" => "cube",
    "easing_default" => "easeOutBack",
    "animateNumberActive" => "{backgroundColor:'#004581', color:'#fff'}",
    "navigation" => "false",
    "label" => "false"
));
```

**SiteConfig:**

Find Skitter tab in your SiteConfig section. Place values as on skitter homepage: http://www.thiagosf.net/projects/jquery/skitter/. So if you want cube animation, place in the field: cube, if you dont need navigation place in the field: false...

**Page config:**

Exactly same as SiteConfig, config tab available in Root.Content.SkitterConfig tab of your Page.

### Configuration of Skitter box size and Skitter images size:

If you are fine with cropped resizing of your images, you can configure dimension in you mysite/_config.php. Example:

```php
MaxSkitterImageDecorator::$SkitterSlideWidth = 850;
MaxSkitterImageDecorator::$SkitterSlideHeight = 250;
```

Default box size is 800x300px which will not suit your needs in many case. This size is defined in maxskitter/css/skitter.styles.css. You can copy this file to your theme and edit as you need, or you can just create css called skitter.custom.css in your theme and edit only what you need (this css will be called automaticly), example:

```css
.box_skitter {position:relative;width:850px;height:250px;background:#fff;}
.box_skitter .info_slide {right:15px; left: auto}
```

if you dont like used cropped resize, use your own copy of file maxskitter/code/MaxSkitterImageDecorator.php (with custom name of class and methods), enable it in your mysite/_config.php and copy  maxskitter/templates/Includes/SkitterImage.ss in your theme and change called image resizing method name.

## Adding slides

Each page has tab with Slides manager (Root.Content.SkitterSlides), which enables uploading and managing Skitter Slides. If you need reorder slides, make sure you saved current selection. Only checked (enabled) Slides are shown on the Page (because same Slides can be used on multiple Pages, you must have an option to enable/disable Slides on any Page. After you upload new slides, they are automaticly related to current Page, if you dont need them, just uncheck coresponding checkboxes. If you want to add Slide uploaded in the past to some Pages's selection, just uncheck option "Show only related items" and select from all uploaded slides.

## Showing slides in Template

Place in your desired template file (this will generate Skitter HTML if slides available and nothing if no slides defined):

```html
$SkitterSlidesRecursive
```

or (this will show your no-slide image if no slides available)

```html
<% if SkitterSlidesRecursive %>
	$SkitterSlidesRecursive
<% else %>
	<img src="$themedir/images/no-slide.jpg" alt="" />
<% end_if %>
```

## Collaboration
If you want to help out and make some improvements please fork this project and submit a pull request (see this guide on how to do this:  [Pull requests](http://help.github.com/pull-requests/)). 

## Problems / issues
There are 3 common issues with maxskitter module: 1) Slides are not showing up. Reason: slides are added via backend, but not activated by checking the checkbox.(SS 2.4 only) 2) Script doesn't work. Reason: core jquery is called twice - if you have your own core jquery already called, disable maxskitter's version by adding thins into mysite/_config.php: Requirements::block("maxskitter/javascript/jquery-1.6.3.min.js"); Same issue is possible with easing and animate-color jquery files. Block them if your own versions already called. 3) Instead of slides, black box is shown. Reason: javascript conflicts - if maxskitter is not working even 1) and 2) is fine, try to disable all your custom JS scripts if it helps.

maxskitter's People

Contributors

silverstripesk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

maxskitter's Issues

Different sizes

Hi ,

From practice side I realized there is often a need of making different size skitter for different ClassName (Pagetypes) . Could you give your advise on what would be the best way to achieve it ? As for now I cant find any easy way of doing it

Sorting / Bulk upload / Summary

HI, Enjoying your module on 2.4 , however it is missing imporant features in SS3.

Basically - would be good if you could get it working with "GridFieldBulkEditingTools" module (I tired doing this manually, but ended with error, which couldn' figure out how to fix) . Uploading image sin bulk - is VERY usefull , especially when you have to upload lets say 50 galleries with 10-15 images each

ALso - sorting the slides is VERY important for almost any project - and this is missing :( COuld you somehow enable SortableGridField as well ? (I also failed doing this manually)

and last but not least - I would suggets you could add nice custom fields to display thimbnails and info
public static $summary_fields = array(
'MaxSkitterImage.StripThumbnail' => 'Picture',
//'ID' => 'Pic ID',
'MaxSkitterImage.Name' => 'Filename',
'Name' => 'Name',
'Label'=>'Label',
'SortOrder' =>'Sort Order'
);

for the list of slides. For now it is really missing thumbnails and titles in the table.

If you could somehow do this - I would assure - hundreds of people over the world would bless you :)

maxskitter showing thumbnails in corner

I don't know what is happening exactly...but maxskitter is showing the images in the container, and then throwing a thumbnail in the top left corner. The transitions then happen in that top corner,then the picture changes....

www.coffeycountychamber.com

Any ideas?

I have disabled the 1.7.1/jquery.min.js call and tried using the 1.6.3 bundled with maxskitter. I have also tried going the other way. I have disabled all js files, with the exception of those bundled with maxskitter, and still have the same issue. Any idea what I am doing wrong?

maxskitter installation

hello,

i have download maxskitter module and skitter.
and the question is, where should i put the skitter folder? at my root site directory?

thank you

Forbidden message trying to add a New Max Skitter Slide

Whenever I try to add a new Max Skitter slide I get a black box in the CMS that says "Forbidden".

I really have no clue what is happening.

I have tried to change file permissions in all maxskitter module directory with no effect.

What could I do to debug this issue?

Slide Images

Hello,
i use this module and it is great.
But i have a lot of Sides and want to show a slideshow on every page.
When i want to add or remove an image, i have to do it on every single page.
Is it possible do configure a "masteslide" or automaticly add an image to all sides?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.