Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
Harties

Simple Photo Gallery

Recommended Posts

Good day,

I have installed and configured Simple Photo Gallery by Raju Rajpurohit - Codoffer Infotech

I believe that I have done everything according to the instructions but being a bit 'very new' to php I don'y know where to place the line:

<a href="<?php echo tep_href_link(FILENAME_PHOTO_GALLERY);?>">Photo Gallery</a>

that I assume will execute the gallery add on.

Would appreciate some help

rgs

Share this post


Link to post
Share on other sites

That line provides a link to your photo gallery. You can put it anywhere that you would like a link. Note that it must go in a file's HTML section (outside of all <?php ... ?> PHP code blocks), as it is itself HTML.

 

Somewhere in the instructions, they should have told you where to add the FILENAME_PHOTO_GALLERY define statement.

Share this post


Link to post
Share on other sites

This part of your sql does not look proper for most osC 2.3+

 

ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci

 

CREATE TABLE IF NOT EXISTS `gallery_photos` (
`gallery_photo_id` int(11) NOT NULL AUTO_INCREMENT,
`gallery_photo_title` varchar(255) COLLATE latin1_general_ci NOT NULL,
`gallery_photo` varchar(150) COLLATE latin1_general_ci NOT NULL,
`gallery_photo_order` int(3) NOT NULL DEFAULT '999',
`gallery_photo_status` tinyint(1) NOT NULL DEFAULT '0',
`gallery_photo_added` datetime NOT NULL,
PRIMARY KEY (`gallery_photo_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;


-Dave

Share this post


Link to post
Share on other sites

Would this be correct?

 

CREATE TABLE IF NOT EXISTS `gallery_photos` (
 `gallery_photo_id` int(11) NOT NULL AUTO_INCREMENT,
 `gallery_photo_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
 `gallery_photo` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
 `gallery_photo_order` int(3) NOT NULL DEFAULT '999',
 `gallery_photo_status` tinyint(1) NOT NULL DEFAULT '0',
 `gallery_photo_added` datetime NOT NULL,
 PRIMARY KEY (`gallery_photo_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;


-Dave

Share this post


Link to post
Share on other sites

Would this be correct?

 

CREATE TABLE IF NOT EXISTS `gallery_photos` (
  `gallery_photo_id` int(11) NOT NULL AUTO_INCREMENT,
  `gallery_photo_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `gallery_photo` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `gallery_photo_order` int(3) NOT NULL DEFAULT '999',
  `gallery_photo_status` tinyint(1) NOT NULL DEFAULT '0',
  `gallery_photo_added` datetime NOT NULL,
  PRIMARY KEY (`gallery_photo_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Try "ENGINE=MyISAM DEFAULT CHARSET=utf8;"

 

instead of  "ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;"

 


YaNotCook !!

Share this post


Link to post
Share on other sites

There are three or so issues here.

  1. Whether to use MyISAM or InnoDB as the database "engine". For very large databases, and certain operations, you may want to use InnoDB. However, MyISAM (the older engine) has some built-in function that may not be currently available in InnoDB. Bottom line: be aware of which DB engine you're requesting, and why.
  2. Your character encoding should be consistent with the rest of your system. Modern osC installations are UTF-8, not Latin-1. The "collate" entry may or may not be redundant, depending on your DB installation default settings.
  3. The default for a new database is for auto_increment to start at 1. Once you've started adding data, be very careful about fooling with the auto_increment setting.

Share this post


Link to post
Share on other sites

Hi Harties,

 

Did you get this to work in the end - i'm at the same stage also,

Where do you paste?

 

<a href="<?php echo tep_href_link(FILENAME_PHOTO_GALLERY);?>">Photo Gallery</a>

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
Sign in to follow this  

×