Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2021-05-26 08:23:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: Challenging upgrade and redesign issues 😳

Hi John, You’ve got mail. My method helps with Number 4 in your list and obviates the need for language url parameters, and the rest is more or less as you describe. I’ve not moved from MLP to this method so I can’t say for sure how you can bring across content with just some SQL statements but there must be a way of getting at the information you already have.
Sometimes when working with disparate data in different formats I export to csv, then sandwich together different csv files via matching columns to create a csv of a “textpattern” table to reimport. It can be a bit laborious but less tedious than cutting and pasting.

You might also want to investigate Christian’s take on multi-lingual sites: he’s written a tutorial that’s linked to in this post and also a helpful “duplicate and link up articles” plugin for making second language versions.


TXP Builders – finely-crafted code, design and txp

Offline

#26 2021-12-01 09:10:41

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Challenging upgrade and redesign issues 😳

Confusion about jcr_langprefix_url & jcr_section_custom plugins

I have finally finished redesigning my site, and redoing all the images, and am now working on making the site multilingual (en/ja) again.

But I am confounded…

I have installed and activated:

  1. jcr_langprefix_url (adjusted the languages)
  2. jcr_section_custom (not configured anything yet)

All the links on the site now show mysite.com/dev/en/ instead of an actual link to the article…

What are the next steps that I need to do?


• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#27 2021-12-01 11:10:29

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: Challenging upgrade and redesign issues 😳

Kjeld wrote #332067:

Confusion about jcr_langprefix_url & jcr_section_custom plugins

I have finally finished redesigning my site, and redoing all the images, and am now working on making the site multilingual (en/ja) again.

But I am confounded…

I have installed and activated:

  1. jcr_langprefix_url (adjusted the languages)
  2. jcr_section_custom (not configured anything yet)

All the links on the site now show mysite.com/dev/en/ instead of an actual link to the article…

What are the next steps that I need to do?

Hi Kjeld,

If you’re defining your own permlinks, it’s probably better to switch off the custom_url_function. Go into the plugin text and // comment out line 8 (there’s a note just above that line explaining that). Then construct your own permlinks.

As noted before, the plugin doesn’t do any special other handling. It just strips out the first /en/ or /ja/ from the url, stores it and provides a tag so that you can use it elsewhere in your code, and passes on the rest of the url to Textpattern to handle as before.

You can then use the language prefix in your code to show different text, show different forms, check if it matches a language code you add with a section_custom_field to a section, and so on.

PS: Do you have v0.1 or v.01.1? The latter added support for installations in subdirectories like the /dev/ you have in your url (the code contains a section with $subpath).


TXP Builders – finely-crafted code, design and txp

Offline

#28 2021-12-01 12:50:09

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Challenging upgrade and redesign issues 😳

jakob wrote #332068:

Hi Kjeld,

If you’re defining your own permlinks, it’s probably better to switch off the custom_url_function. Go into the plugin text and // comment out line 8 (there’s a note just above that line explaining that). Then construct your own permlinks.

As noted before, the plugin doesn’t do any special other handling. It just strips out the first /en/ or /ja/ from the url, stores it and provides a tag so that you can use it elsewhere in your code, and passes on the rest of the url to Textpattern to handle as before.

You can then use the language prefix in your code to show different text, show different forms, check if it matches a language code you add with a section_custom_field to a section, and so on.

PS: Do you have v0.1 or v.01.1? The latter added support for installations in subdirectories like the /dev/ you have in your url (the code contains a section with $subpath).

Thanks.

I have jcr_langprefix_url v0.1 …

Where can I get the latest version?

So, instead of using <txp:permlink>, I should use <txp:site_url /><txp:custom_field name="language" />/<txp:section />/<txp:article_id />/<txp:article_url_title />?


• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#29 2021-12-08 13:00:14

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Challenging upgrade and redesign issues 😳

jakob wrote #328674:

I’m sure I can explain it better if you have more detailed questions. And it may not all be necessary depending on how you have your site setup and how much of MLP you were using.

Given your extensive image catalog and the need to keep article + image IDs intact, you may find that some careful manual offsite preparation of the images and the corresponding txp_image table may be much quicker than re-uploading and making things match. It feels a bit messy and requires working carefully and diligently, but it’s a one-off exercise and from then on you can add new images as required.

This is what the modified jcr_image_custom outputs:

In your image, your custom caption input has the same size as the regular caption input. How do you do that?

EDIT: So, how to change one of the image custom fields from an input to a textarea?

Last edited by Kjeld (2021-12-08 14:12:37)


• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#30 2021-12-08 14:20:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: Challenging upgrade and redesign issues 😳

Kjeld wrote #332132:

In your image, your custom caption input has the same size as the regular caption input. How do you do that?

EDIT: So, how to change one of the image custom fields from an input to a textarea?

That was a custom adaptation of the plugin for another Textpattern user and simply set the fields to alternate. I have it at home and can look this evening. More via email.


TXP Builders – finely-crafted code, design and txp

Offline

#31 2021-12-08 14:23:00

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: Challenging upgrade and redesign issues 😳

jakob wrote #332133:

That was a custom adaptation of the plugin for another Textpattern user and simply set the fields to alternate. I have it at home and can look this evening. More via email.

Oh, wonderful. Thanks!


• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

Board footer

Powered by FluxBB