We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24935
    • 160 Posts
    This plugin automatically adds   to French quotes and other punctuation.

    <?php
    switch($modx->event->name) {
        case 'OnDocFormSave':
          $replacements=array(
            ' :' => ' :', 
            ' ;' => ' ;', 
            ' !' => ' !', 
            ' ?' => ' ?', 
            '« ' => '« ', 
            ' »' => ' »', 
            '‹ ' => '‹ ',
            ' ›' => ' ›',
            ' $' => ' $', 
            ' €' => ' €', 
          );
          $resource->set('introtext', strtr($resource->get('introtext'), $replacements));
          if($resource->get('class_key')=='modDocument') {
            $resource->setContent(strtr($resource->get('content'), $replacements));
          }
          $resource->save();
        break;
      }
    
    • Much thanks for sharing that handy nice work smiley