• Resolved Gunu

    (@grafcom)


    @opajaap

    From the abandoned qTranslate X to MultilingualPress for Multisite.

    I have followed all directions from here to use one – global – WPPA system on different sites. Also Moving an existing installation to a new site/server.

    Everything worked fine and the existing photo albums are displayed correctly in the various sites under Multisite. Awesome! (Ging toch sneller als ik gedacht had.) ??

    Because it is one installation to prevent all images having to be uploaded multiple times the translation possibilities in WP Photo Album Plus have now expired.

    Because this is about short titles and short descriptions, I do not mind that and place them next to each other.

    However, due to qTranslate X codes they all look like this: [:en]Soul from Zeeland[:nl]Zeeuwse Ziel etc.

    Is there a way to search and replace this to: Soul from Zeeland – Zeeuwse Ziel ?

    These strings only appear in tables wp_wppa_albums en wp_wppa_photos

    A solution would be welcome.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    This is quite simple using the technique as described here: https://wppa.nl/docs-by-subject/advanced-topics/custom-code/
    I will provide the code for your issue tomorrow if you like.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Assuptions i made:
    – only :en and :nl language codes
    – they appear only in names and descriptions.

    Copy/paste in Table VIII-B98:

    
    <?php
    if ( strpos( $album['name'], '[:' ) !== false ||
    	strpos( $album['description'], '[:' ) !== false ) {
    		$newdata['id'] = $album['id'];
    		$newdata['name'] = str_replace( array( '[:]', '[:nl]', '[:en]' ), ' - ', $album['name'] );
    		$newdata['name'] = trim( $newdata['name'], ' -' );
    		$newdata['description'] = str_replace( array( '[:]', '[:nl]', '[:en]' ), ' - ', $album['description'] );
    		$newdata['description'] = trim( $newdata['description'], ' -' );
    		wppa_update_album( $newdata );
    	}
    

    Press the Start! button

    Copy/paste in Table VIII-B99:

    
    <?php
    if ( strpos( $photo['name'], '[:' ) !== false ||
    	strpos( $photo['description'], '[:' ) !== false ) {
    		$newdata['id'] = $photo['id'];
    		$newdata['name'] = str_replace( array( '[:]', '[:nl]', '[:en]' ), ' - ', $photo['name'] );
    		$newdata['name'] = trim( $newdata['name'], ' -' );
    		$newdata['description'] = str_replace( array( '[:]', '[:nl]', '[:en]' ), ' - ', $photo['description'] );
    		$newdata['description'] = trim( $newdata['description'], ' -' );
    		wppa_update_photo( $newdata );
    	}
    

    Press the Start! button

    Ignore the alert box when you entered this, unless it reports an error.

    Thread Starter Gunu

    (@grafcom)

    Your codes executed and no problems!!

    Totally wonderful, everything now completely transferred.

    @opajaap, thank you for this help

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Transfer to Multisite’ is closed to new replies.