1. Открываем engine/modules/show.full.php находимОк а как с переменной ?)
PHP:
else $tpl->load_template( 'fullstory.tpl' );
PHP:
elseif (isset($_GET['iframe']) && intval($_GET['iframe']) == 1) {
$tpl->load_template('iframe.tpl');
$xfieldsdata = xfieldsdataload($row['xfields']);
if (count($xfieldsdata)) {
foreach ($xfields as $value) {
$preg_safe_name = preg_quote($value[0], "'");
if ($value[6] && !empty($xfieldsdata[$value[0]])) {
$temp_array = explode(',', $xfieldsdata[$value[0]]);
$value3 = [];
foreach ($temp_array as $value2) {
$value2 = trim($value2);
$value2 = str_replace("'", "'", $value2);
if ($config['allow_alt_url']) {
$value3[] = "<a href=\"" . $config['http_home_url'] . "xfsearch/" . urlencode($value2) . "/\">" . $value2 . "</a>";
} else {
$value3[] = "<a href=\"$PHP_SELF?do=xfsearch&xf=" . urlencode($value2) . "\">" . $value2 . "</a>";
}
}
$xfieldsdata[$value[0]] = implode(', ', $value3);
unset($temp_array);
unset($value2);
unset($value3);
}
if (empty($xfieldsdata[$value[0]])) {
$tpl->copy_template = preg_replace("'\\[xfgiven_{$preg_safe_name}\\](.*?)\\[/xfgiven_{$preg_safe_name}\\]'is", '', $tpl->copy_template);
$tpl->copy_template = str_replace("[xfnotgiven_{$value[0]}]", '', $tpl->copy_template);
$tpl->copy_template = str_replace("[/xfnotgiven_{$value[0]}]", '', $tpl->copy_template);
} else {
$tpl->copy_template = preg_replace("'\\[xfnotgiven_{$preg_safe_name}\\](.*?)\\[/xfnotgiven_{$preg_safe_name}\\]'is", '', $tpl->copy_template);
$tpl->copy_template = str_replace("[xfgiven_{$value[0]}]", '', $tpl->copy_template);
$tpl->copy_template = str_replace("[/xfgiven_{$value[0]}]", '', $tpl->copy_template);
}
$xfieldsdata[$value[0]] = stripslashes($xfieldsdata[$value[0]]);
$tpl->copy_template = str_replace("[xfvalue_{$value[0]}]", $xfieldsdata[$value[0]], $tpl->copy_template);
}
}
if ($config['allow_alt_url']) {
if ($config['seo_type'] == 1 || $config['seo_type'] == 2) {
if ($category_id && $config['seo_type'] == 2) {
$c_url = get_url($category_id);
$full_link = $config['http_home_url'] . $c_url . '/' . $row['id'] . '-' . $row['alt_name'] . '.html';
} else {
$full_link = $config['http_home_url'] . $row['id'] . '-' . $row['alt_name'] . '.html';
}
} else {
$full_link = $config['http_home_url'] . date('Y/m/d/', strtotime($row['date'])) . $row['alt_name'] . '.html';
}
} else {
$full_link = $config['http_home_url'] . 'index.php?newsid=' . $row['id'];
}
$tpl->set('{full-link}', $full_link);
$tpl->compile('main');
$tpl->clear();
echo $tpl->result['main'];
die();
}
PHP:
$news_seiten = explode("{PAGEBREAK}", $row['full_story']);
PHP:
$tpl->set('{iframe_link}', $short_link . $news_name . '/iframe');
2. Открываем .htaccess находим
Код:
# Сам пост
Код:
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)/iframe$ index.php?subaction=showfull&year=$1&month=$2&day=$3&news_name=$4&seourl=$4&iframe=1 [L]
RewriteRule ^([^.]+)/([0-9]+)-(.*)/iframe$ index.php?newsid=$2&seourl=$3&seocat=$1&iframe=1 [L]
RewriteRule ^([0-9]+)-(.*)/iframe$ index.php?newsid=$1&seourl=$2&iframe=1 [L]
3. Создаем iframe.tpl внутри своего шаблона в нем доступны дополнительные поля и {full-link} ссылка на основную статью.
Ссылка на iframe страницу доступна тегом {iframe-link} в fullstory.tpl



