ALEXIS yazdı:Sanırım bunlar yeterli, extension.inc içerisindeki bilgilere de dikkat.
db/*.*
includes/constants.php
includes/db.php
includes/functions.php (tema sınıfı atama alınabilir)
includes/sql_parse.php
includes/template.php
common.php (özellikle include'ler)
config.php
<!-- BEGIN haber -->
<HR>{BASLIK}<BR>{METIN}
<!-- END haber -->
$sql = "select * from habertablo";
$sonuc = mysql_query($sql);
$listele = array();
while($row=mysql_fetch_array($sonuc))
{
$listele[] = $row;
}
$toplamhaber = count($listele);
for($i = 0; $i < $toplamhaber; $i++)
{
$template->assign_block_vars('haber', array(
'BASLIK' => $listele[$i]['baslik'],
'METIN' => $listele[$i]['metin'])
);
}
<!-- BEGIN haber -->
{haber.BASLIK}<br />{haber.METIN}<hr />
<!-- END haber -->
//
// [+] tema ayarlama
//
// tema atama
$template_name = 'canver';
$theme = setup_style($template_name);
function setup_style($style)
{
global $db, $board_config, $template, $images, $phpbb_root_path;
$template_name = 'canver';
$template_path = 'templates/' ;
$template_name = $template_name;
$template = new Template($phpbb_root_path . $template_path . $template_name);
if ( $template )
{
$current_template_path = $template_path . $template_name;
@include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg');
if ( !defined('TEMPLATE_CONFIG') )
{
die("Could not open $template_name template config file");
}
/*
$img_lang = ( file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english';
while( list($key, $value) = @each($images) )
{
if ( !is_array($value) )
{
$images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value);
}
}
*/
}
return $row;
}
//
// [-] tema ayarlama
//
$hsql = "select * from haberkategori";
$hsonuc = mysql_query($habersql);
$listetele = array();
while($row=mysql_fetch_array($hsonuc))
{
$listele[] = $row;
}
$toplamhaberkat = count($listele);
for($i = 0; $i < $toplamhaberkat; $i++)
{
$template->assign_block_vars('haberkat', array(
'ISIM' => $listele[$i]['isim'],
'ACIKLAMA' => $haberliste[$i]['aciklama'])
);
$hid = $listele[$i]['id'];
$fsql = "select * from haber where id=$hid";
$fsonuc = mysql_query($fsql);
$flistele = array();
$flistele[] = mysql_fetch_array($fsonuc);
$toplamhaber = count($flistele);
if(!$toplamhaber==0){
for($x = 0; $x < $toplamhaber; $x++)
{
$template->assign_block_vars('haberkat.haber', array(
'BASLIK' => $flistele[$x]['baslik'],
'METIN' => $flistele[$x]['metin'],
'TARIH' => $flistele[$x]['tarih'])
);
}
}
}
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir