Search…

X3 Photo Gallery Support Forums

Search…
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

how to copy a site chapter to another site?

13 Apr 2023, 15:43

to achieve a two languages-site I doubled it (architekturfoto.de + en.architekturfoto.de), all manually done. whenever I add a new gallery I struggle with having all settings right - and then again the same for the english version. is there a way to just copy all together and only make the translations afterwards on site?
Last edited by ed_f on 14 Apr 2023, 07:01, edited 1 time in total.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

13 Apr 2023, 22:24

Of course it's never going to be super convenient to manage two languages as two separate X3 websites, but I would perhaps do it like this: Create the new page first in the primary language, and then copy the folder via FTP (or online file manager) into the secondary language website. It will inherit all uploaded images, as well as all page settings stored in page.json.

Alternatively, you would just need to duplicate the exact steps made on website1 to website2.

If there are still problems, it means you have different global settings for the two websites. This should of course be resolved really before you initially duplicate the website.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

14 Apr 2023, 07:01

"copy the folder via FTP into the secondary language website. It will inherit all uploaded images, as well as all page settings stored in page.json." that is good to hear! only that with (at least) filezilla I cannot just copy a folder, but have to download it first and upload it again. helps anyway!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

14 Apr 2023, 10:39

ed_f wrote:only that with (at least) filezilla I cannot just copy a folder, but have to download it first and upload it again. helps anyway!
That's a bit clumsy. You could upload images as normal through the panel, and just copy the page.json file from one folder into the other ... The page.json files contains all the page settings.

If you could use SSH, you could easily setup RSYNC or clone the folder directly on server via COPY command. Or if your hosting service offers a "file manager" from your hosting dashboard, you could also copy folders directly on server from there.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

14 Apr 2023, 11:08

as I am not using linux here and my hoster's froxlor doesn't offer a filemanager one last question: if I upload the images and then just copy the page.json file, will the sequence of images be included in it? thanks, karl!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

14 Apr 2023, 11:27

ed_f wrote:if I upload the images and then just copy the page.json file, will the sequence of images be included in it? thanks, karl!
You mean custom sort order? Yes.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

14 Apr 2023, 11:40

great. then that's how I go now.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

16 May 2023, 15:06

only now I tested that, but it does not work: the pictures sequence/custom sort order is not transferred.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

16 May 2023, 23:02

ed_f wrote: only now I tested that, but it does not work: the pictures sequence/custom sort order is not transferred.
Sometimes, the "sort order" is stored in the actual images, which you are re-uploading. This may happen if the images were moved to another folder after they were initially sorted ... Storing the sort order inside the images gives backup to the sort order if it's not stored in the page.json file... Why not just "copy" the files over from the X3 panel interface? This way, you keep data stored in each image also. Alternatively, you could try to re-sort images in panel before copying the page.json file, as this would make sure the sort order also gets stored in the current folders page.json data file.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

17 May 2023, 03:25

I uploaded the images from bridge which does not know about the sorting on my site.

could you maybe explain how to copy using the panel? I do not see that as it would be across different sites, the german and the english one. sorting more than 80 images identically is quite a pain ...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

17 May 2023, 10:26

ed_f wrote:could you maybe explain how to copy using the panel?
This would only work when copying files within the same X3 website unfortunately. I lost track of what exactly you were trying to do ...

Alternatively, you could have used the "Files Gallery" (bonus) included, but this does not yet support copying multiple files between folders. This will be added soon.
https://demo.photo.gallery/files/

Let me explain again what could be the issue. X3 stores sort order two ways (for redundancy): 1. Sort order index is stored inside each image (IPTC), and 2. Sort order is stored in the folders page.json file. In your case, because you are re-uploading images from desktop, they don't have the sort order stored inside them. That leaves option 2 "page.json" ... This will normally work if you copy the page.json file, but would fail if for example file names are different, or those images were moved into the folder from another folder. In which case the "page.json" does not have the order, and the order instead relies on the order index stored in each image. Complicated I know, but we need to store the order somewhere (two locations).

As noted in my previous reply, if you RE-SORT a folder before copying the page.json file, it will definitely contain the correct sort order for the images. To do that (or at least test it), you could simply go into sort mode, sort an image up then down, then SAVE. IF that doesn't work, then there is something else going on that I am not aware of.

I would only be able to test fully with panel login.
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

17 May 2023, 10:33

yes, that worked, thanks! (of course?) it also reset the translated text on that site, which I will next time only do at last ;-)

which passwords are needed for the a.m. files-app?

btw: could you tell me how to change a link on a site so that it opens up in a new tab instead of the same? gracias!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

17 May 2023, 22:20

ed_f wrote: which passwords are needed for the a.m. files-app?
That would be the same as your X3 control panel login. You could also create a non-login version that points to a folder in your X3 website.
https://www.photo.gallery/docs/plugins/files-gallery/
ed_f wrote:btw: could you tell me how to change a link on a site so that it opens up in a new tab instead of the same? gracias!
This is normally automatic, as it will open external links in new window, and internal links in the same window in X3. Where are you trying to add the link, and where is it pointing? If you are adding links in your content, you would simply use HTML target="_blank".
Code
<a href="your/link" target="_blank">link text</a>
 
ed_f
Experienced
Topic Author
Posts: 113
Joined: 20 Dec 2020, 11:24

Re: how to copy a site chapter to another site?

18 May 2023, 05:39

on "https://demo.photo.gallery/files/" my panel-passwords are not accepted. but I haven't understood the advantages of that tool anyway.

thanks for the code, which of course worked perfectly ;-)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: how to copy a site chapter to another site?

18 May 2023, 07:08

ed_f wrote: on "https://demo.photo.gallery/files/" my panel-passwords are not accepted.
The above link is our own DEMO, login guest/guest. For your own /files/ you can use your own panel login.
ed_f wrote: but I haven't understood the advantages of that tool anyway.
Have you checked it? It's just a bonus tool (for now). For example, it allows you to "filter" items based on input, and it displays all files, and has a more snappy interface for viewing and browsing folders. If you don't want to use it, then you don't need to use it.