Page 1 of 1

Gallery for you all [FREE]

Posted: Sat Feb 26, 2011 3:38 am
by nullbesign
Dear friends, i wan to show you a ez way to add a gallery to your opencart
this based on a jquery
first create a new information page

www.yourdomainname.com/admin
------------------------------------------catalog -> information -> insert (create a new page there)

once you are done with that then you do is download this file. http://www.easy-share.com/1913994863/gallery.zip
then upload it to your server
--make sure to create a new folder within your opencart
ie. http://www.yourdomainname.com/gallery *** make sure you are linking the file folders correctly, if you plan to change the gallery or want to rename it****

insert this code **make sure to change the names of the images and etc as you need** into your newly created gallery information page.

Code: Select all

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
	<script>
		!window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
	</script>
	<script type="text/javascript" src="http://www.yourdomainname.com/gallery/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
	<script type="text/javascript" src="http://www.yourdomainname.com/gallery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
	<link rel="stylesheet" type="text/css" href="http://www.yourdomainname.com/gallery/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
 	<link rel="stylesheet" href="style.css" />
	<script type="text/javascript">
		$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a#example1").fancybox();

			$("a#example2").fancybox({
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'	
			});

			$("a#example4").fancybox({
				'opacity'		: true,
				'overlayShow'	: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'none'
			});

			$("a#example5").fancybox();

			$("a#example6").fancybox({
				'titlePosition'		: 'outside',
				'overlayColor'		: '#000',
				'overlayOpacity'	: 0.9
			});

			$("a#example7").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example8").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=example_group]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});

			/*
			*   Examples - various
			*/

			$("#various1").fancybox({
				'titlePosition'		: 'inside',
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});

			$("#various2").fancybox();

			$("#various3").fancybox({
				'width'				: '75%',
				'height'			: '75%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});

			$("#various4").fancybox({
				'padding'			: 0,
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none'
			});
		});
	</script>
</head>
<body>
<div id="content">
	<h1>&nbsp;</h1>



	<p><br />

		<a id="example1" href="http://www.yourdomainname.com/gallery/example/1_b.jpg"><img alt="example1" src="http://www.yourdomainname.com/gallery/example/1_s.jpg" /></a>

		<a id="example2" href="http://www.yourdomainname.com/gallery/example/2_b.jpg"><img alt="example2" src="http://www.yourdomainname.com/gallery/example/2_s.jpg" /></a>

		<a id="example3" href="http://www.yourdomainname.com/gallery/example/3_b.jpg"><img alt="example3" src="http://www.yourdomainname.com/gallery/example/3_s.jpg" /></a>
		
		<a id="example4" href="http://www.yourdomainname.com/gallery/example/4_b.jpg"><img class="last" alt="example4" src="http://www.yourdomainname.com/gallery/example/4_s.jpg" /></a>
	</p>

	
</div>

</div>
</body>
</html>


if you have any issues please let me know...

Re: Gallery for you all [FREE]

Posted: Sat Feb 26, 2011 7:23 am
by philbydevil
Have you got a demo we can see?

Re: Gallery for you all [FREE]

Posted: Sat Feb 26, 2011 8:18 am
by SXGuy
its a good starting point, but if im honest, people would prefer the gallery to be intergrated into opencart. That means that the gallery controller is part of the opencart framwork, and one major issue is that the images should be able to be inputed from the admin side.

People will not want to edit a file everytime they have a new gallery image to add.

Sorry but true.

Re: Gallery for you all [FREE]

Posted: Sat Feb 26, 2011 10:28 am
by openmycart.com
agree, it seem not as a gallery to me...

Re: Gallery for you all [FREE]

Posted: Fri Jun 17, 2011 12:41 am
by djeeke
Not A bad idea at all...

I will probably use this concept...

I understand this means there is no config thru the opencart interface so I selected an album that requires zero configuration...

If I need another pic, I just add it to the gallery folder... If I need separate galleries, I add subdirectories to the galley folder...

I will use EasyPhpAlbum Lite as gallery tool... no config required, adding pics and/or subalbums through ftp (or any other tool)...

Maybe not fancy but good enough for me...

If I need more tweaking I guess I can look at EasyPhpAlbum... One time config and done... Again the rest is transferring the files to the correct folders...

Re: Gallery for you all [FREE]

Posted: Fri Jun 17, 2011 1:20 am
by djeeke
Inserting an iframe in the information page seems to do the trick...

Code: Select all

<iframe allowtransparency="true" frameborder="0" height="600" marginheight="0" marginwidth="0" scrolling="yes" src="http://www.yourshop.biz/path_to_gallery/index.php" width="100%"></iframe>
any hints/improvements etc... keep us posted, we all want to learn :crazy:

:clown: