SMFHacks.com

SMF Gallery Pro => Support => Topic started by: lanec on October 31, 2008, 02:53:04 am

Title: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: lanec on October 31, 2008, 02:53:04 am
I want to upgrade my forum software from 1.1.4 to the latest version of 2.0 while keeping my galleries intact.

Any links to a howto for this?
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: SMFHacks on October 31, 2008, 07:52:37 am
Once you upgrade to SMF 2.0

You would download and install the Gallery for SMF 2.0 found in this topic
http://www.smfhacks.com/index.php/topic,2861.0.html
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 16, 2008, 08:58:27 am
Once you upgrade to SMF 2.0

You would download and install the Gallery for SMF 2.0 found in this topic
http://www.smfhacks.com/index.php/topic,2861.0.html

Nice topic. We're going into the same situation when SMF2 goes final. I have an test site running to test all new software. Is the table structure of SMFGallery v1 the same as SMFGallery v2? Is there a simple way to copy the 'actual' Gallery albums, images, comments and ratings) into the gallery of the test site to test?

Could it be something like this; Export the Gallery tables with PHPmyadmin from the 'actual' database and import them into the new database (without the settings)? Also copying all the images and thumbs to the test site of course....

Regards, Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: SMFHacks on November 16, 2008, 09:22:01 am
That would do it should work fine. Export the _gallery from your 1.1.x site copy them to your new site. Copy the gallery folder from 1.1.x to test site.

Also copy all the gallery settings in the smf_settings table.
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 16, 2008, 09:30:06 am
That would do it should work fine. Export the _gallery from your 1.1.x site copy them to your new site. Copy the gallery folder from 1.1.x to test site.

Also copy all the gallery settings in the smf_settings table.

Okay! Thanks. Nice work... I'll try that this week.....
The only problem which might occur will be the custom fields. We'll see what happens.

Thanks!
Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 17, 2008, 09:29:39 am
Hello SMFHacks,

I exported the tables and data and 'overwrote' the existing tables (drop if exist). I can't upload all images (I don't have 1GB space to test)  :-\ So I copied about 50 images.

There are no images displayed in the test gallery. And a error appears: 

Code: [Select]
Unknown column 'p.mature' in 'field list'
File: /shared/usr/xxxxxxxxxxxxxxx/DOMAIN/HTML/2/Sources/Load.php(1938) : eval()'d code
Line: 3103

I don't know if this happens with 'drop if exist'......? Maybe that wasn't very handy from me....  ??? I can't find 'p.mature' in the old and new database.

Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: SMFHacks on November 17, 2008, 08:55:48 pm
Which install package did you use for SMF 2.0? It should add any missing columns or tables from any previous version of the SMF Gallery script.
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 19, 2008, 03:17:02 pm
Which install package did you use for SMF 2.0? It should add any missing columns or tables from any previous version of the SMF Gallery script.

I installed a clean version of SMF2.0B4 and also installed SMFGallery2.05. But I 'killed' the database so I installed all again but now I can't import the _gallery v1.1. database into the v2.0. dattabase...

There appears a error:
Quote
SQL-query:

--
-- tabel `smf_gallery_cat`
--
INSERT INTO `smf_gallery_cat` ( `ID_CAT` , `ID_MEMBER` , `title` , `description` , `roworder` , `image` , `filename` , `ID_BOARD` , `postingsize` , `ID_PARENT` , `disablerating` , `total` , `redirect` , `locktopic` , `showpostlink` , `sortby` , `orderby` )
VALUES ( 1, 0, ' ', ' ', 1, '', NULL , 0, 0, 0, 0, 0, 1, 0, 0, 'p.ID_PICTURE', 'DESC' ) , ( 4, 0, 'Algemene galerie, layouts van gebruikers', 'Digitaal scrapbook gebruikers.', 2, '', NULL , 0, 1, 0, 0, 3748, 0, 0, 1, 'p.ID_PICTURE', 'DESC' ) ;

MySQL retourneerde: Documentatie
#1062 - Duplicate entry '1' for key 1

Maybe I'm did something wrong with the export from the database? Please take a look at the attachment for me if you want.

Thanks in advance,

Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: SMFHacks on November 19, 2008, 07:13:14 pm
Do you already have a gallery database in the new SMF 2.0 forum if so it would need to be dropped if you are trying to reimport that data gain into that database.
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 20, 2008, 12:56:25 am
Do you already have a gallery database in the new SMF 2.0 forum if so it would need to be dropped if you are trying to reimport that data gain into that database.

Yes, I have... I first installed SMF2B4, after that I installed SMFGallery2.0.5 and I didn't install any other hack.
Do I need to change the export type (right under on the attachment)? INSERT, UPDATE or REPLACE?

And the error from my previous message: #1062 - Duplicate entry '1' for key 1
SQL Reference Manual is telling about it:

Quote from: SQL Reference Manual
Error: 1062 SQLSTATE: 23000 (ER_DUP_ENTRY)

Message: Duplicate entry '%s' for key %d

I sorry if I'm doing something wrong.

Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 21, 2008, 02:31:48 am
One step forward...

I exported/imported all tables separately and all tables finished except 1; smf_gallery_cat.sql
This table caused the problem.

Hereby the table content:
Code: [Select]
-- phpMyAdmin SQL Dump
-- version 2.9.1.1-Debian-8
-- http://www.phpmyadmin.net
--
-- Host: 10.0.0.1:3306
-- Generatie Tijd: 21 Nov 2008 om 08:58
-- Server versie: 5.0.32
-- PHP Versie: 5.2.0-8+etch13
--
-- Database: `*databasename*`
--

-- --------------------------------------------------------

--
-- Tabel structuur voor tabel `smf_gallery_cat`
--

CREATE TABLE IF NOT EXISTS `smf_gallery_cat` (
  `ID_CAT` mediumint(8) NOT NULL auto_increment,
  `ID_MEMBER` mediumint(8) unsigned NOT NULL default '0',
  `title` varchar(100) NOT NULL,
  `description` varchar(255) default NULL,
  `roworder` mediumint(8) unsigned NOT NULL default '0',
  `image` varchar(255) default NULL,
  `filename` tinytext,
  `ID_BOARD` smallint(5) unsigned NOT NULL default '0',
  `postingsize` tinyint(4) NOT NULL default '0',
  `ID_PARENT` smallint(5) unsigned NOT NULL default '0',
  `disablerating` tinyint(4) NOT NULL default '0',
  `total` int(11) NOT NULL default '0',
  `redirect` tinyint(4) NOT NULL default '0',
  `locktopic` tinyint(4) NOT NULL default '0',
  `showpostlink` tinyint(4) NOT NULL default '0',
  `sortby` tinytext,
  `orderby` tinytext,
  PRIMARY KEY  (`ID_CAT`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ;

--
-- Gegevens worden uitgevoerd voor tabel `smf_gallery_cat`
--

INSERT INTO `smf_gallery_cat` (`ID_CAT`, `ID_MEMBER`, `title`, `description`, `roworder`, `image`, `filename`, `ID_BOARD`, `postingsize`, `ID_PARENT`, `disablerating`, `total`, `redirect`, `locktopic`, `showpostlink`, `sortby`, `orderby`) VALUES
(1, 0, ' ', ' ', 1, '', NULL, 0, 0, 0, 0, 0, 1, 0, 0, 'p.ID_PICTURE', 'DESC'),
(4, 0, 'Algemene galerie - layouts van gebruikers', 'Digitaal scrapbook gebruikers.', 2, '', NULL, 0, 1, 0, 0, 3756, 0, 0, 1, 'p.ID_PICTURE', 'DESC');


Maybe this will help..... It's a very imported table... for the rest there are already some pictures in the new gallery, without a category of course.

Regards,
Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 21, 2008, 02:42:09 am
For now I 'think' I solved the problem (don't know if I'm right.....)

I removed the first 'INSERT INTO VALUES': (1, 0, ' ', ' ', 1, '', NULL, 0, 0, 0, 0, 0, 1, 0, 0, 'p.ID_PICTURE', 'DESC'),
It seems to be working correct..... We didn't (and don't) use User gallery's... and I thing these values are for the user gallery?

Vincent
Title: Re: Upgrading from SMF 1.1.4 to SMF 2.0 and Upgrading Gallery
Post by: Vincent Volmer on November 21, 2008, 03:01:24 am
When I try to upload a new image to our gallery I need to fill-in some custom fields. I don't see them so I can't upload an image. We already discussed this here: http://www.smfhacks.com/index.php/topic,2871.0.html (http://www.smfhacks.com/index.php/topic,2871.0.html)

We 'need' these custom fields because of the copyright of the materials used on the images/layouts in the gallery (digital scrap layouts). But when it would not be possible I'll remove the 'Required' tag. No problem. It's the users own responsibility, to inform about the author, not ours.  ;D

And again, I'm totally 'in love' with SMF Gallery  :D
Thank you for your great work!!

Regards, Vincent.