Jump to content
Latest News: (loading..)

Recommended Posts

As many of you will know stock osC CE uses the colorbox script by Jack Moore

for the gallery. This is a very nice script and has many features that can be used to change and improve the stock version used.

If you would like your site to be a little different from all the others then it’s worth taking time to look at making a few simple changes.

This is stock,

image.png.faf8a406a9db3d01a30c7313f03d0269.png

By tweaking a few setting you can make changes,

image.png.829a4f5781cb66d59172a8ba7351892d.png

The first thing to do is check which version of the script you have as stock ocS CE was using an old version.

Check and see if you have Version 1.6.4 – 2016/05/10

You will need to look in here ext/colorbox

If not then you can get it from here

https://github.com/jackmoore/colorbox

You will see that you will have jquery.colorbox-min.js

This is not much use to the average user as it’s imposable to see what's going on in a minified file depending on your editor it may look like this

 

image.png.e9c75c76638d7cff210ee2da84672208.png

Use the un minified version for making changes,

jquery.colorbox.js this will look like this.

image.png.94d25371ccbf89e0d4770d8d6fd9281a.png

You can go to this website to see the full list of functions

http://www.jacklmoore.com/colorbox/

You can change things like the transition type the speed of change the background color the opacity of the overlay and many other things.

You are only limited by your imagination.

You will also see that you have colorbox.css which can also be used to make changes.

As you can see it has a range of user Style settings that can be changed to make your gallery more individual.

image.png.fb24fcc7b2f885a03ce518b3f45f6724.png

Just remember to backup before making any changes.

 

 


 

Share this post


Link to post
Share on other sites

I don't think that modifying the core js file of the application is a good idea, also not start using the uncompressed file.

The file is like that for a reason and is not meant to be modified in order to change any settings

Any options can be passed to the script before it is called in your code. This is the common way for all scripts of this type.

That way you can have individual settings for each purpose keeping the core file healthy. can upgrade easily by just replacing the file without having to re-modify etc

More info about passing default parameters: http://www.jacklmoore.com/colorbox/faq/#faq-defaults

More info general: http://www.jacklmoore.com/colorbox/faq/

Share this post


Link to post
Share on other sites

Very nice. I like being able to tweak stuff in the admin. May I suggest also a way to turn off the product title/name.


The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×