Foto DNG, from WordPress to InDesign: 2 News

1

description

Process for export posts content from WordPress site (Foto DNG magazine site) to InDesing for magazine creation.

Transcript of Foto DNG, from WordPress to InDesign: 2 News

Page 1: Foto DNG, from WordPress to InDesign: 2 News

Foto DNG, from WordPress to InDesign

Second Part, New Products & News/Events

Page 2: Foto DNG, from WordPress to InDesign: 2 News

Process new Foto DNG magazineEvery portfolio and tutorial in Foto DNG magazine are layered “by hand”, from scratch, without automation, but there is tree sections benefiting totally or partially from automation● Foto DNG Group in Flickr (previous slides)● New Products (this slides)● News & Events (this slides)

Page 3: Foto DNG, from WordPress to InDesign: 2 News

New Products and News/Events

Page 4: Foto DNG, from WordPress to InDesign: 2 News

New Products and News/Events● Process is made in Foto DNG server with a custom made

plug-in for WordPress that also has all functions for the magazine.

● All Press Releases are published in category Novedades (News Products) in Foto DNG web.

● Novedades has a custom field with name nombre_marca with brand name in his value.

● This field is used for sort Novedades by brand name.

Page 5: Foto DNG, from WordPress to InDesign: 2 News

New Products and News/Events● News and Events are published in category

Noticias/Eventos in Foto DNG web.● Without custom field, Noticias/Eventos will be sort by

published date.● Every post published in WordPress will be sent to Social

Media since option Sharing with WordPress JetPack plug-in.

● We create a schedule with different hours (readers from Europe, America ...) in Buffer.

Page 6: Foto DNG, from WordPress to InDesign: 2 News

New Products and News/Events● We create a task in Zappier for every Buffer account

(four), this task check Foto DNG RSS and if found new entries, send it to Buffer (that publish it in scheduled hours).

● We don’t use IFTTT because Buffer option in IFTTT only permit use one account.

● Next (published or programmed in Novedades & Noticias/Eventos) we proceed to export from WordPress to InDesign, with our plug-in.

Page 7: Foto DNG, from WordPress to InDesign: 2 News

New Products and News/Events● In plug-in we select category to export and date range (by

default from first month day in current month to last month day).

● Once exported text file (InDesign Tagged Text) from WordPress, in InDesign we go to text box in correct section and import tagged text.

● In Novedades section, then add images.● And process ended with sections Novedades and

Noticias/Eventos formatedd.

Page 8: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

Publish or program new post, in Novedades

category we add custom field with his value (brand

name)

Page 9: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

When is published, will be sent to Social Media with

Sharing option by JetPack

Page 10: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

In Buffer we configure

Social Media Accounts and

Publication Schedules

Page 11: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

We create Zapier tasks for every Buffer account,

that will find new RSS entries and will be send to

Buffer

Page 12: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

From WordPress plug-in we select category and date range and then generate

tagged text file

Page 13: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

From InDesign select exported tagged text file to

import

Page 14: Foto DNG, from WordPress to InDesign: 2 News

Export from WordPress to InDesign

And in InDesign we obtain formatted text with

Paragraph and Character Styles, then we add images

and review section

Page 15: Foto DNG, from WordPress to InDesign: 2 News

Plug-in for WordPress export

● We create a form with drop down select for sections and two date fields (type="date" for show us a calendar): $dia_desde='01'; $mes_desde=date('m'); $anhio_desde=date('Y'); $bisiesto=date('L'); $dia_hasta=date('t') + $bisiesto; $mes_hasta=date('m'); $anhio_hasta=date('Y');

● This plug-in create a Paragraph and Character definition style predefined in InDesign template.

● We make a query to WordPress database with selected parameters, and we receive published and programmed posts in selected date range and category, ordered by custom field.

Page 16: Foto DNG, from WordPress to InDesign: 2 News

Plug-in for WordPress export

$args = array(

'order' => 'ASC', 'orderby' => 'meta_value', 'meta_key' => 'nombre_marca',

'date_query'=> array(

array(

'after' => array('year' => $anhio_desde, 'month' => $mes_desde, 'day' => $dia_desde,),

'before'=> array('year' => $anhio_hasta, 'month' => $mes_hasta, 'day' => $dia_hasta,),

'inclusive' => true,

),

),

'cat' => $cat,

'post_status' => array('publish', 'future'),

'posts_per_page' => $n_post_volcar,

);

query_posts( $args );//We make the query to DB

Page 17: Foto DNG, from WordPress to InDesign: 2 News

Plug-in for WordPress export

Walk through result posts (while ( have_posts() ) : the_post();) and process:● Obtain title with get_the_title, content with get_the_content and

post link with get_permalink.● We delete shortcodes with strip_shortcodes● We replace double carriage return to <p></p> with wpautop● We delete HTML tags with wp_kses except allowed tags defined

in a array.● We change to Smart Quotes with wptexturize.● We delete empty spaces, empty paragraphs and clean texts.

Page 18: Foto DNG, from WordPress to InDesign: 2 News

Plug-in for WordPress export

● We change characters for his UNICODE equivalents for InDesign ® to <0x00AE> or ñ to <0x00F1> (array with 53 equivalences at this moment).

● We change HTML tags to InDesign tags and predefined estyles <b> to <cTypeface:Bold> and </b> to <cTypeface:> or <h1> to <ParaStyle:articulos\:titular>.

● We create content with title, content and link formatted.● We dump result content to a text file for import in InDesign

news_2014-02-01-to-2014-02-28.txt

Page 19: Foto DNG, from WordPress to InDesign: 2 News

Advantages obtained● Novedades and Noticias y Eventos will be published in

web and Social Media.● Export process from WordPress and import in

InDesign, is made in less than two minutes.● Final layout review and images added will be made in

less than two hours (several actions saved for images in Photoshop).

Page 20: Foto DNG, from WordPress to InDesign: 2 News

Thanks by reading this slides:

http://www.fotodng.com/foto-dng-de-wordpress-

a-indesign-parte-2-2917.html

Carlos Longarela.

Foto DNG Magzine

http://www.fotodng.com

https://twitter.com/fotodng