| Feature Request | Migration from chevereto to Netphotographics

A forum for discussing possible new features or changes to netPhotoGraphics. But NOTE, only a formal request via the GitHub repository ticket system is tracked or responded to.
Post Reply
Youssef
Posts: 9
Joined: Sat Sep 29, 2018 5:48 pm
Location: Nice
Contact:

| Feature Request | Migration from chevereto to Netphotographics

Post by Youssef »

Hi Stephen ,
I have a friend who owns a site create 4 years ago on the Chevereto script and he wants to migrate to Netphotographics. Is this possible and can this be developed in the next update?

cordially
stephenbillard
Site Admin
Posts: 85
Joined: Tue Aug 14, 2018 6:33 pm
Location: Huntington Beach, CA, USA

Re: | Feature Request | Migration from chevereto to Netphotographics

Post by stephenbillard »

I am not at all familiar with Chevereto, but migration should be possible with the help of someone who is familiar with the script. The things to consider are:

How does Chevereto store the images? netPhotoGraphics is file system based, so the images would need to be collected into appropriate folders (albums) and FTP uploaded to the new site.

How does Chevereto manage metadata about the images (and albums?) While these are stored in the netPhotoGraphics database, NPG has the ability to harvest image metadata stored within the image. The trick will be finding how to export the data from the Chevereto site, mapping the "column" names from Chevereto and then populating the netPhotoGraphics database. Maybe the Chevereto database table(s) can be exported to a comma separated values (CSV) file with a header of the column names. Then the column names would be edited to match those of netPhotoGraphics and the CSV file imported into the NPG table(s). The table name matching may be self evident. Otherwise I would be happy to help make the mapping.

The look and feel of the site could be more of an issue. If one of the available NPG themes works then he is home free. Otherwise there would need to be some custom theme development done.
-Stephen
Youssef
Posts: 9
Joined: Sat Sep 29, 2018 5:48 pm
Location: Nice
Contact:

Re: | Feature Request | Migration from chevereto to Netphotographics

Post by Youssef »

Chevereto stores the images in date folders for example if an image is uploaded Monday, June 17 it will put it in 17/06/19.

Here is the structure of the chevereto database :

Albums

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%albums`;
CREATE TABLE `%table_prefix%albums` (
  `album_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `album_name` varchar(100) NOT NULL,
  `album_user_id` bigint(32) DEFAULT NULL,
  `album_date` datetime NOT NULL,
  `album_date_gmt` datetime NOT NULL,
  `album_creation_ip` varchar(255) NOT NULL,
  `album_privacy` enum('public','password','private','private_but_link','custom') DEFAULT 'public',
  `album_privacy_extra` mediumtext,
  `album_password` mediumtext,
  `album_image_count` bigint(32) NOT NULL DEFAULT '0',
  `album_description` mediumtext,
  `album_likes` bigint(32) NOT NULL DEFAULT '0',
  `album_views` bigint(32) NOT NULL DEFAULT '0',
  PRIMARY KEY (`album_id`),
  KEY `album_name` (`album_name`),
  KEY `album_user_id` (`album_user_id`),
  KEY `album_date_gmt` (`album_date_gmt`),
  KEY `album_privacy` (`album_privacy`),
  KEY `album_image_count` (`album_image_count`),
  KEY `album_creation_ip` (`album_creation_ip`),
  FULLTEXT KEY `searchindex` (`album_name`,`album_description`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
Categories

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%categories`;
CREATE TABLE `%table_prefix%categories` (
  `category_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(32) NOT NULL,
  `category_url_key` varchar(32) NOT NULL,
  `category_description` mediumtext,
  PRIMARY KEY (`category_id`),
  UNIQUE KEY `url_key` (`category_url_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
confirmations

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%confirmations`;
CREATE TABLE `%table_prefix%confirmations` (
  `confirmation_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `confirmation_user_id` bigint(32) NOT NULL,
  `confirmation_type` enum('account-activate','account-change-email','account-password-forgot') NOT NULL,
  `confirmation_date` datetime NOT NULL,
  `confirmation_date_gmt` datetime NOT NULL,
  `confirmation_token_hash` varchar(255) NOT NULL,
  `confirmation_status` enum('active','valid','invalid') NOT NULL,
  `confirmation_extra` mediumtext,
  PRIMARY KEY (`confirmation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
deletions

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%deletions`;
CREATE TABLE `%table_prefix%deletions` (
  `deleted_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `deleted_date_gmt` datetime NOT NULL,
  `deleted_content_id` bigint(32) NOT NULL,
  `deleted_content_date_gmt` datetime NOT NULL,
  `deleted_content_user_id` bigint(32) DEFAULT NULL,
  `deleted_content_ip` varchar(255) NOT NULL,
  `deleted_content_md5` varchar(32) DEFAULT NULL,
  `deleted_content_original_filename` varchar(255) DEFAULT NULL,
  `deleted_content_views` bigint(32) NOT NULL DEFAULT '0',
  `deleted_content_likes` bigint(32) NOT NULL DEFAULT '0',
  PRIMARY KEY (`deleted_id`),
  KEY `deleted_content_id` (`deleted_content_id`),
  KEY `deleted_content_user_id` (`deleted_content_user_id`),
  KEY `deleted_content_ip` (`deleted_content_ip`),
  KEY `deleted_content_md5` (`deleted_content_md5`),
  KEY `deleted_content_views` (`deleted_content_views`),
  KEY `deleted_content_likes` (`deleted_content_likes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
follows

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%follows`;
CREATE TABLE `%table_prefix%follows` (
  `follow_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `follow_date` datetime NOT NULL,
  `follow_date_gmt` datetime NOT NULL,
  `follow_user_id` bigint(32) NOT NULL,
  `follow_followed_user_id` bigint(32) NOT NULL,
  `follow_ip` varchar(255) NOT NULL,
  PRIMARY KEY (`follow_id`),
  KEY `follow_user_id` (`follow_user_id`),
  KEY `follow_followed_user_id` (`follow_followed_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
images

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%images`;
CREATE TABLE `%table_prefix%images` (
  `image_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `image_name` varchar(255) NOT NULL,
  `image_extension` varchar(255) NOT NULL,
  `image_size` int(11) NOT NULL,
  `image_width` int(11) NOT NULL,
  `image_height` int(11) NOT NULL,
  `image_date` datetime NOT NULL,
  `image_date_gmt` datetime NOT NULL,
  `image_title` varchar(100) DEFAULT NULL,
  `image_description` mediumtext,
  `image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
  `image_user_id` bigint(32) DEFAULT NULL,
  `image_album_id` bigint(32) DEFAULT NULL,
  `image_uploader_ip` varchar(255) NOT NULL,
  `image_storage_mode` enum('datefolder','direct','old','path') NOT NULL DEFAULT 'datefolder',
  `image_path` varchar(4096) DEFAULT NULL,
  `image_storage_id` bigint(32) DEFAULT NULL,
  `image_md5` varchar(32) NOT NULL,
  `image_source_md5` varchar(32) DEFAULT NULL,
  `image_original_filename` varchar(255) NOT NULL,
  `image_original_exifdata` longtext,
  `image_views` bigint(32) NOT NULL DEFAULT '0',
  `image_category_id` bigint(32) DEFAULT NULL,
  `image_chain` tinyint(128) NOT NULL,
  `image_thumb_size` int(11) NOT NULL,
  `image_medium_size` int(11) NOT NULL DEFAULT '0',
  `image_expiration_date_gmt` datetime DEFAULT NULL,
  `image_likes` bigint(32) NOT NULL DEFAULT '0',
  `image_is_animated` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`image_id`),
  KEY `image_name` (`image_name`),
  KEY `image_extension` (`image_extension`),
  KEY `image_size` (`image_size`),
  KEY `image_width` (`image_width`),
  KEY `image_height` (`image_height`),
  KEY `image_date_gmt` (`image_date_gmt`),
  KEY `image_nsfw` (`image_nsfw`),
  KEY `image_user_id` (`image_user_id`),
  KEY `image_album_id` (`image_album_id`),
  KEY `image_uploader_ip` (`image_uploader_ip`),
  KEY `image_storage_mode` (`image_storage_mode`),
  KEY `image_path` (`image_path`(255)),
  KEY `image_storage_id` (`image_storage_id`),
  KEY `image_md5` (`image_md5`),
  KEY `image_source_md5` (`image_source_md5`),
  KEY `image_views` (`image_views`),
  KEY `image_category_id` (`image_category_id`),
  KEY `image_chain` (`image_chain`),
  KEY `image_expiration_date_gmt` (`image_expiration_date_gmt`),
  KEY `image_likes` (`image_likes`),
  KEY `image_is_animated` (`image_is_animated`),
  KEY `image_album_id_image_id` (`image_album_id`, `image_id`),
  FULLTEXT KEY `searchindex` (`image_name`,`image_title`,`image_description`,`image_original_filename`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
users

Code: Select all

DROP TABLE IF EXISTS `%table_prefix%users`;
CREATE TABLE `%table_prefix%users` (
  `user_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(255) DEFAULT NULL,
  `user_username` varchar(191) NOT NULL,
  `user_date` datetime NOT NULL,
  `user_date_gmt` datetime NOT NULL,
  `user_email` varchar(191) DEFAULT NULL,
  `user_avatar_filename` varchar(255) DEFAULT NULL,
  `user_facebook_username` varchar(255) DEFAULT NULL,
  `user_twitter_username` varchar(255) DEFAULT NULL,
  `user_website` varchar(255) DEFAULT NULL,
  `user_background_filename` varchar(255) DEFAULT NULL,
  `user_bio` varchar(255) DEFAULT NULL,
  `user_timezone` varchar(255) NOT NULL,
  `user_language` varchar(255) DEFAULT NULL,
  `user_status` enum('valid','awaiting-confirmation','awaiting-email','banned') NOT NULL,
  `user_is_admin` tinyint(1) NOT NULL DEFAULT '0',
  `user_is_manager` tinyint(1) NOT NULL DEFAULT '0',
  `user_is_private` tinyint(1) NOT NULL DEFAULT '0',
  `user_newsletter_subscribe` tinyint(1) NOT NULL DEFAULT '1',
  `user_show_nsfw_listings` tinyint(1) NOT NULL DEFAULT '0',
  `user_image_count` bigint(32) NOT NULL DEFAULT '0',
  `user_album_count` bigint(32) NOT NULL DEFAULT '0',
  `user_image_keep_exif` tinyint(1) NOT NULL DEFAULT '1',
  `user_image_expiration` varchar(191) DEFAULT NULL,
  `user_registration_ip` varchar(191) NOT NULL,
  `user_likes` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made to content owned by this user',
  `user_liked` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made by this user',
  `user_following` bigint(32) NOT NULL DEFAULT '0',
  `user_followers` bigint(32) NOT NULL DEFAULT '0',
  `user_content_views` bigint(32) NOT NULL DEFAULT '0',
  `user_notifications_unread` bigint(32) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`user_username`) USING BTREE,
  UNIQUE KEY `email` (`user_email`) USING BTREE,
  KEY `user_date_gmt` (`user_date_gmt`),
  KEY `user_status` (`user_status`),
  KEY `user_is_admin` (`user_is_admin`),
  KEY `user_is_manager` (`user_is_manager`),
  KEY `user_is_private` (`user_is_private`),
  KEY `user_newsletter_subscribe` (`user_newsletter_subscribe`),
  KEY `user_show_nsfw_listings` (`user_show_nsfw_listings`),
  KEY `user_image_count` (`user_image_count`),
  KEY `user_album_count` (`user_album_count`),
  KEY `user_image_keep_exif` (`user_image_keep_exif`),
  KEY `user_image_expiration` (`user_image_expiration`),
  KEY `user_registration_ip` (`user_registration_ip`),
  KEY `user_likes` (`user_likes`),
  KEY `user_following` (`user_following`),
  KEY `user_followers` (`user_followers`),
  KEY `user_liked` (`user_liked`),
  KEY `user_content_views` (`user_content_views`),
  FULLTEXT KEY `searchindex` (`user_name`,`user_username`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;
you can find all the data on github here:
https://github.com/Chevereto/Chevereto- ... nstall/sql

Can we start creating the plugin ?
stephenbillard
Site Admin
Posts: 85
Joined: Tue Aug 14, 2018 6:33 pm
Location: Huntington Beach, CA, USA

Re: | Feature Request | Migration from chevereto to Netphotographics

Post by stephenbillard »

I an afraid that the database structure is not sufficient to go forward. But I have some observations for consideration.

First, and most problematic, the image is not stored in the database. Rather there are some alternative locations defined by the field

Code: Select all

image_storage_mode` enum('datefolder','direct','old','path') NOT NULL DEFAULT 'datefolder'
Unfortunately this tells us nothing about either the actual location of the image or how it is stored--both needed to recover the image into a standard format.

The image table has an entry for the EXIF data of the image, but of course it does not describe the content format (it is simply a string.)

The user table does not contain a password field (which may be a good thing.) Maybe users have to log on with their Facebook accounts? NetPhotoGraphics does allow Facebook logins. At any rate (if Cheverto is at all secure) we would not be able to preserve the user password if we knew where it was stored.

There is a disconnect between the features of the two softwares. There seem (from the database fields) to be some social media kinds of features in chevereto--following, liking, etc. There are categories which seem to be attached to images. Maybe they would correspond to Tags in netPhotoGraphics, with out good knowledge of the cheverto product one cannot say for sure.

So, I think we are back to square one. We would need someone who is either familiar with how the Chevereto code works or who can take the time to learn how it does.
-Stephen
Youssef
Posts: 9
Joined: Sat Sep 29, 2018 5:48 pm
Location: Nice
Contact:

Re: | Feature Request | Migration from chevereto to Netphotographics

Post by Youssef »

Hi, i just got in touch with the developer chevereto and he asked me that you can contact him directly on the chevereto forum.
stephenbillard
Site Admin
Posts: 85
Joined: Tue Aug 14, 2018 6:33 pm
Location: Huntington Beach, CA, USA

Re: | Feature Request | Migration from chevereto to Netphotographics

Post by stephenbillard »

I don't think I will do that. So far there is just your request for this migration. A one-off migration does not warrant any development work.
-Stephen
Post Reply