Ау, люди...
Неужели никто не знает? Хоть скажите - вопрос сильно сложный, или наоборот ламерский, что никто не хочет отвечать...
3. Loop Template Variables
To access loop variable inside loop in php code in template use name of last loop, add "_item" to it. For example, {postrow.MESSAGE} would be $postrow_item['MESSAGE'];
For nested loops use only last loop item. For example. {catrow.forumrow.U_VIEWFORUM} would be the same as {forumrow.U_VIEWFORUM}: $forumrow_item['U_VIEWFORUM'];
Current loop iteration can be accessed as "_i". For example, for "postrow" loop it would be $postrow_i
Number of loop iterations can be accessed as "_count". For example, for "postrow" loop it would be $postrow_count.....................
$subSilver[0]['template_name'] = "subSilver";
$subSilver[0]['style_name'] = "subSilver";
$subSilver[0]['head_stylesheet'] = "subSilver.css";
$subSilver[0]['body_background'] = "background.jpg";
.....................// find all styles to install
$res = @opendir('../templates/');
$styles = array();
while(($file = readdir($res)) !== false)
{
if($file !== '.' && $file !== '..' && @file_exists('../templates/'.$file.'/theme_info.cfg') && @file_exists('../templates/'.$file.'/'.$file.'.cfg'))
{
$arr = xs_get_themeinfo($file);
for($i=0; $i<count($arr); $i++)
{
if(isset($arr[$i]['template_name']) && $arr[$i]['template_name'] === $file)
{
$arr[$i]['num'] = $i;
$style = $arr[$i]['style_name'];
$found = false;
for($j=0; $j<count($style_rowset); $j++)
{
if($style_rowset[$j]['style_name'] == $style)
{
$found = true;
}
}
if(!$found)
{
$styles[$arr[$i]['style_name']] = $arr[$i];
}
}
}
}
}
closedir($res);Вернуться в Поддержка модов для phpBB 2.0.x
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0