Posted By

jsegars on 05/30/08


Tagged

typo3


Versions (?)

Extracting Data from a T3D File


 / Published in: PHP
 

This snippet grabs the metadata from a single T3D file for display on a frontend page.

  1. global $TYPO3_CONF_VARS;
  2.  
  3. require_once(t3lib_extMgm::extPath('impexp').'class.tx_impexp.php');
  4.  
  5. $import = t3lib_div::makeInstance('tx_impexp');
  6. $import->init(0,'import');
  7. $import->enableLogging = TRUE;
  8.  
  9. if (@is_file($filename) && $import->loadFile($filename,0)) {
  10. $data = $import->dat;
  11.  
  12. $title = $data['header']['meta']['title'];
  13. $description = $data['header']['meta']['description'];
  14. $notes = $data['header']['meta']['notes'];
  15. $packager_username = $data['header']['meta']['packager_username'];
  16. $packager_name = $data['header']['meta']['packager_name'];
  17. $packager_email = $data['header']['meta']['packager_email'];
  18. }

Report this snippet  

You need to login to post a comment.