Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-11881

ODF import: importing images' caption

    XMLWordPrintable

Details

    Description

      It would be really useful for the editors that manage hundreds of articles per week if they could add (from OpenOffice) the caption or some keyword per each image they include in the document; in this way they don't need to open the "media" section in eZ to enrich their images.
      From OOwriter, after adding an image they can specify the caption from the right-button mouse menu.

      in the file:

      modules/ezodf/ezooimport.php

      after the code:

      $imageClassIdentifier = $ooINI->variable( "ODFImport", "DefaultImportImageClass" );
      [...]
      $dataMap =& $contentObject->dataMap();
      

      I added this code:

                                          $dataMap['name']->setAttribute( 'data_text', $image_name );
                                          $dataMap['name']->store();
                                          $dataMap['caption']->setAttribute( 'data_text', '<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/" xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"><section><paragraph>'.$image_name.'</paragraph></section>');
                                          $dataMap['caption']->store();
      

      Attachments

        Activity

          People

            dl dl
            gabricocek gabricocek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: