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: Reusable database...  (Read 2878 times)

0 Members and 1 Guest are viewing this topic.

Ciupy

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Reusable database...
« on: May 04, 2005, 07:59:47 am »

Hi guys...

I have a quick question for you all here. I am new to all this Coppermine thing, but I ended up loving it in just a little bit more than a month...

The thing is that I've created an on-line photo gallery for me, but I want it in 2 languages, in English and another language... When I say 2 languages, I mean everything, not just the menus... I want even the titles of the albums, my comments, everything... So far I don't know how to do that... I think it's not possible, right? Anyway, I'm willing even to install Coppermine in another directory on the server and start all over again with creating the albums, but it would be way easier if I could just translate the database I've got so far and REUSE it again. Here is my question: Can I do that? Can I also use the same pictures I'm using for the present gallery, or I have to upload them again for the new gallery? Please help me... One way or another I'm gonna do it, but I don't want to "waste" my time all over again if it can be done way easiear like I said... Is there any chance for me?

Thank you in advance...
Ciupy.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Reusable database...
« Reply #1 on: May 04, 2005, 08:31:25 am »

Create two separate installs on one database (they have to differ in the db prefix you choose during install). The wording is kept in the tables yourPrefix_albums, yourPrefix_categories, yourPrefix_comments, yourPrefix_pictures. You would have to edit the section
Code: [Select]
$CONFIG['TABLE_PICTURES']        = $CONFIG['TABLE_PREFIX']."pictures";
$CONFIG['TABLE_ALBUMS']                = $CONFIG['TABLE_PREFIX']."albums";
$CONFIG['TABLE_COMMENTS']        = $CONFIG['TABLE_PREFIX']."comments";
$CONFIG['TABLE_CATEGORIES']        = $CONFIG['TABLE_PREFIX']."categories";
$CONFIG['TABLE_CONFIG']                = $CONFIG['TABLE_PREFIX']."config";
$CONFIG['TABLE_USERGROUPS']        = $CONFIG['TABLE_PREFIX']."usergroups";
$CONFIG['TABLE_VOTES']                = $CONFIG['TABLE_PREFIX']."votes";
$CONFIG['TABLE_USERS']                = $CONFIG['TABLE_PREFIX']."users";
$CONFIG['TABLE_BANNED']                = $CONFIG['TABLE_PREFIX']."banned";
$CONFIG['TABLE_EXIF']                = $CONFIG['TABLE_PREFIX']."exif";
$CONFIG['TABLE_FILETYPES']          = $CONFIG['TABLE_PREFIX']."filetypes";
$CONFIG['TABLE_ECARDS']          = $CONFIG['TABLE_PREFIX']."ecards";
$CONFIG['TABLE_TEMPDATA']        = $CONFIG['TABLE_PREFIX']."temp_data";
$CONFIG['TABLE_FAVPICS']        = $CONFIG['TABLE_PREFIX']."favpics";
$CONFIG['TABLE_BRIDGE']        = $CONFIG['TABLE_PREFIX']."bridge";
$CONFIG['TABLE_VOTE_STATS']        = $CONFIG['TABLE_PREFIX']."vote_stats";
$CONFIG['TABLE_HIT_STATS'] = $CONFIG['TABLE_PREFIX']."hit_stats";
in your second install's include/init.inc.php file to make the tables that are meant to be shared between the two installs point to the first install's tables. This way, you'd have the same user base. The drawback is that you wuld have to upload the pics twice (to each individual install). If you want to accomplish a closer integration (or if you allow your users to upload files as well), you'll have to share the pictures table as well between the two installs, but then you'll have to find a workaround for pic title and description being only in one language.
Setting the gallery up in the manner described above is very tricky and requires double admin work, you should be aware of that. A thorough bilingual approach would be to add columns to the database instead and go through coppermine's core code and make the proper changes there, with the drawback of this being much work, requiring coding skills and losing upgrade possibility. In other words: not recommended either. Coppermine hasn't been created with full multi-language features in mind unless you sacrifice some options. As a workaround, I'd label everything in tow languages instead, with the two languages being visible at all times.
However, there's no easy way...
Logged
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.