Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Turned Down]: Option to save / load all categories & albums (without pictures)  (Read 5200 times)

0 Members and 1 Guest are viewing this topic.

CARST

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Hello everyone,

i would like to have an option to to save the category-album-structure to a file and load it again.

Everytime i set-up a new server i have to create all 15+ categories and about 550+ albums from scratch. Batch-adding the pictures isn't that time-consuming, but creating all the albums is a pain in the a*s.

I could imagine that the plugin/feature could write a file which would look like this:
Code: [Select]
<cat "no=1" "parent=none">Name of category 1</cat>
<subcat1 "no=1" "parent=Name of category 1">Name of sub-category 1</cat>
<album "no=1" "parent=Name of subcategory 1">Name of Album no1</album>
... more albums ...
<subcat1 "no=2" "parent=Name of category 1">Name of sub-category 2</cat>
... more albums ...
<cat "no=2" "parent=none">Name of category 2</cat>
<album "no=3" "parent=Name of category 2">Name of Album no3</album>
... more albums ...

etc....


The file should have a very easy structure so everyone could write it by hand and not having to create all cats/albums "online" at CPG.

Regards,
Carst
« Last Edit: July 06, 2009, 09:47:42 am by Joachim Müller »
Logged

Nibbler

  • Guest
Re: Option to save / load all categories & albums (without pictures)
« Reply #1 on: July 04, 2009, 09:43:27 pm »

Just export the albums and categories tables using phpMyAdmin. Then import the dumped files when needed. No need to reinvent the wheel.
Logged

CARST

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Option to save / load all categories & albums (without pictures)
« Reply #2 on: July 04, 2009, 11:07:07 pm »

I get your point Nibbler, but ...

1) I once saved the whole CPG database before moving to a new server and after importing the DB CPG went all crazy and i had to setup everything from scratch, could have been a one-time thing but nevertheless not the optimal solution...

2) The advantage of my idea is to write the file on your computer and then have the possibility to import it everytime you setup a new server, totally indepent from MySQL or CPG versions...


Rgds,
Carst
Logged

Nibbler

  • Guest
Re: Option to save / load all categories & albums (without pictures)
« Reply #3 on: July 04, 2009, 11:12:22 pm »

What you suggest would only be useful to people that need to set up multiple servers with the same cat/album structure but are unable to do simple table dumps correctly. I don't think this would be useful to enough people to be a core feature of Coppermine.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15761
Re: Option to save / load all categories & albums (without pictures)
« Reply #4 on: July 05, 2009, 05:34:44 pm »

I don't think this would be useful to enough people to be a core feature of Coppermine.
Agree. It's very easy to do this with a regular database export/import. No need to reinvent the wheel.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Option to save / load all categories & albums (without pictures)
« Reply #5 on: July 06, 2009, 09:47:24 am »

1) I once saved the whole CPG database before moving to a new server and after importing the DB CPG went all crazy and i had to setup everything from scratch, could have been a one-time thing but nevertheless not the optimal solution...
You probably haven't created the dump properly, which is sad for you, but not really a valid reason to create a complicated feature that will create a proprietary backup. In an ideal world, coppermine could create a database dump for backup purposes. That's what the existing backup plugin does. That's what might go into a future version. What will not go into future versions is your suggested special flavor of XML data that just serves as failure-prone surrogate for a real database dump.
If you have created a dump and want to make sure that it will work as expected, just attempt a restore on a temporary platform (a local testbed would be fine for that purpose, e.g. the Coppermine Live Demo), before deleting the source (or before the source get's inaccessible because you switch webhosts). That's best practise for all kinds of database-driven apps. There really is no reason to change that, as your proposed method would inherit all possible flaws that database dumps have (danger of timeouts for large dumps, problem of escaping special chars properly, collation issues etc.).
While we welcome your suggestions and want to encourage you to keep on contributing in one way or the other, we have to turn down your feature request. Marking thread accordingly. Please don't get discouraged by that: maybe you had a bad start with mySQL dumps, but they really work fine once you understand where the problems lie.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.