0

STS テンプレート システムを調査しようとしています。

私がしなければならないことは簡単です。

OSC 管理者から追加されたバナー/ボックスを右側の列に表示したいだけです。

次の手順を実行しました。

  1. 管理バナーマネージャーからバナーを追加しました。
  2. includes/boxes ディレクトリに customBanner.php という名前でファイルを作成しました
  3. この行を column_right.php に追加しました include(DIR_WS_BOXES . 'customBanner.php');
  4. 最後に、次のコードを customBanner.php に追加します。

<?php
if ($banner = tep_banner_exists('dynamic', '170x158')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>

このコードは、基本的に STS テンプレートを使用しない OSC で使用されます。

ここで、STS テンプレートが php.html ファイルに出力を与える方法を知る必要があります<td>$specialbox</td>。この変数がstsから値を取得する方法を意味します。右の列に広告ボックスを表示するにはどうすればよいですか。

4

2 に答える 2

0

includes/modules/sts_inc/sts_user_code.php に次のコードを追加する必要があります。

$sts->start_capture();
include(DIR_WS_INCLUDES . 'boxes/customBanner.php');
$sts->stop_capture('specialbox');

独自のファイルを使用してこのコードを追加することもできますが、その名前を admin->modules-> Default -> Files for normal テンプレートに含める必要があります

于 2011-05-20T20:48:23.717 に答える
0

同じ方法で好きなだけボックスを追加できます。

$sts->start_capture();
include(DIR_WS_INCLUDES . 'boxes/customBanner.php');
$sts->stop_capture('box1');

$sts->start_capture();
include(DIR_WS_INCLUDES . 'boxes/OTHERcustomBanner.php');
$sts->stop_capture('box2');
于 2011-11-02T11:02:49.830 に答える