Exemple #1
0
             $row['full_story'] = preg_replace("#<!--TBegin-->(.+?)<!--TEnd-->#is", "", $row['full_story']);
             $row['full_story'] = preg_replace("#<img(.+?)>#is", "", $row['full_story']);
         }
         if (!$config['allow_smart_video']) {
             $row['short_story'] = preg_replace("#<!--dle_video_begin(.+?)<!--dle_video_end-->#is", "", $row['short_story']);
             $row['short_story'] = preg_replace("#<!--dle_audio_begin(.+?)<!--dle_audio_end-->#is", "", $row['short_story']);
             $row['full_story'] = preg_replace("#<!--dle_video_begin(.+?)<!--dle_video_end-->#is", "", $row['full_story']);
             $row['full_story'] = preg_replace("#<!--dle_audio_begin(.+?)<!--dle_audio_end-->#is", "", $row['full_story']);
         }
     }
 }
 $tpl->set('{comments}', "<!--dlecomments-->");
 $tpl->set('{addcomments}', "<!--dleaddcomments-->");
 $tpl->set('{navigation}', "<!--dlenavigationcomments-->");
 $tpl->set('{short-story}', $row['short_story']);
 $tpl->set('{full-story}', $row['full_story'] . $links->return_links());
 if (preg_match("#\\{full-story limit=['\"](.+?)['\"]\\}#i", $tpl->copy_template, $matches)) {
     $count = intval($matches[1]);
     $row['full_story'] = str_replace("</p><p>", " ", $row['full_story']);
     $row['full_story'] = strip_tags($row['full_story'], "<br>");
     $row['full_story'] = trim(str_replace("<br>", " ", str_replace("<br />", " ", str_replace("\n", " ", str_replace("\r", "", $row['full_story'])))));
     if ($count and dle_strlen($row['full_story'], $config['charset']) > $count) {
         $row['full_story'] = dle_substr($row['full_story'], 0, $count, $config['charset']);
         if ($temp_dmax = dle_strrpos($row['full_story'], ' ', $config['charset'])) {
             $row['full_story'] = dle_substr($row['full_story'], 0, $temp_dmax, $config['charset']);
         }
     }
     $tpl->set($matches[0], $row['full_story']);
 }
 if (strpos($tpl->copy_template, "[xfvalue_") !== false or strpos($tpl->copy_template, "[xfgiven_") !== false) {
     $xfieldsdata = xfieldsdataload($row['xfields']);