Ladycharm: trOid, уберите Вашу строку //if ($itname=='') else print '<title>Новости СРО</title>'; - она там логически не на месте, + в ней ошибка, на которую указал nchdel.
if ($id>0) {
$text=trim(dbstructure($id,"text"));
if (strlen($text)<3) {
$text=' ';
}
if (dbstructure($id,"view")=="items" || dbstructure($id,"view")=="photobank") {
$parentmy=0;
$i=1;
$itname='';
while ($i<count($ruriArray)) {
$cres=mysql_query("select * from `".$siteprefix."items` where parent=".$parentmy." and part=".$id." and alias='".$ruriArray[$i]."'");
$cn=mysql_num_rows($cres);
if ($cn>0) {
$itid=mysql_result($cres,0,"id");
$ittype=mysql_result($cres,0,"itemtype");
$itname=mysql_result($cres,0,"name");
$itfullpath=mysql_result($cres,0,"fullpath");
$italias=mysql_result($cres,0,"alias");
$itparent=mysql_result($cres,0,"parent");
if ($ittype==0) {
$parentmy=$itid;
} else {
$i=count($ruriArray);
}
}
$stro.=$stro1;
$i++;
}
if ($itname<>'') {$itname=$itname.' :: ';}
print '<title>'.$itname.dbstructure($id,"name").'</title>';
} else {
$itname='';
if ((dbstructure($id,"view")=="news") or (dbstructure($id,"view")=="articles"))
{
if ($ruriArray[4]<>'') {
$creeda=floatval($ruriArray[4]);
if ($creeda>0) {
$resd=mysql_query("select * from `".$siteprefix."news` where access<=".$access." and cat=$id and vis=1 and id='".$creeda."' LIMIT 0,1;");
$n=mysql_numrows($resd);
if ($n>0) {
$itname=mysql_result($resd,0,'name');
}
}
}
if(dbstructure($id,'view')!='news') {$headname=dbstructure($id,"name").' - ';} else {$headname='';}
print '<title>'.$itname.$headname.'</title>';
//if ($itname=='') else print '<title>Новости СРО</title>';
}
дайте оценку most-wanted.ru
только ждать.
яша просто присматривается, через месяц все страницы будут в индексе.
только ждать.
яша просто присматривается, через месяц все страницы будут в индексе.
ставь виджет от яндекса или share42.com
дает увеличение трафа...а есть даже пример что дало это PR 3
исчесли из индекса на одном небольшом сайте 500 страниц, осталось 50.
думаю будет доап.
Зарегистрировался под реф ссылкой Бомж-Провинциал'a
Теперь требуется по продаже Игр для пк.
Кто подскажет хорошую стабильную партнерку?
trOid, уберите Вашу строку //if ($itname=='') else print '<title>Новости СРО</title>'; - она там логически не на месте, + в ней ошибка, на которую указал nchdel.
Просто исправьте:
if(dbstructure($id,'view')!='news') {$headname=dbstructure($id,"name").' - ';} else {$headname='Новости СРО';}print '<title>'.$itname.$headname.'</title>';
было {$headname='';}
стало {$headname='Новости СРО';} и для dbstructure($id,'view')=='news' будет вылазить Ваш тайтл.
Хотя 'по-уму' надо бы брать название самой новости из БД - оно должно автоматически быть в $itname.
да так я делал
в итоге получается при просмотре новости
при просмотре категории
а мне нужно при просмотре новости
при просмотре категории
ТС, вы мой предыдущий пост (#7) проверяли?
нет, думаете реально из за этого?
и так
title раздела не отображается.
сам принцип проверки пустоты не тот, не так надо...
if ($id>0) {
$text=trim(dbstructure($id,"text"));
if (strlen($text)<3) {
$text=' ';
}
if (dbstructure($id,"view")=="items" || dbstructure($id,"view")=="photobank") {
$parentmy=0;
$i=1;
$itname='';
while ($i<count($ruriArray)) {
$cres=mysql_query("select * from `".$siteprefix."items` where parent=".$parentmy." and part=".$id." and alias='".$ruriArray[$i]."'");
$cn=mysql_num_rows($cres);
if ($cn>0) {
$itid=mysql_result($cres,0,"id");
$ittype=mysql_result($cres,0,"itemtype");
$itname=mysql_result($cres,0,"name");
$itfullpath=mysql_result($cres,0,"fullpath");
$italias=mysql_result($cres,0,"alias");
$itparent=mysql_result($cres,0,"parent");
if ($ittype==0) {
$parentmy=$itid;
} else {
$i=count($ruriArray);
}
}
$stro.=$stro1;
$i++;
}
if ($itname<>'') {$itname=$itname.' :: ';}
print '<title>'.$itname.dbstructure($id,"name").'</title>';
} else {
$itname='';
if ((dbstructure($id,"view")=="news") or (dbstructure($id,"view")=="articles"))
{
if ($ruriArray[4]<>'') {
$creeda=floatval($ruriArray[4]);
if ($creeda>0) {
$resd=mysql_query("select * from `".$siteprefix."news` where access<=".$access." and cat=$id and vis=1 and id='".$creeda."' LIMIT 0,1;");
$n=mysql_numrows($resd);
if ($n>0) {
$itname=mysql_result($resd,0,'name');
}
}
}
if(dbstructure($id,'view')!='news') {$headname=dbstructure($id,"name").' - ';} else {$headname='';}
print '<title>'.$itname.$headname.'</title>';
//if ($itname=='') else print '<title>Новости СРО</title>';
}
else {
if ($itname<>'') {$itname=$itname.$headname.' :: ';}
if(dbstructure($id,'view')!='main') {$headname=dbstructure($id,"name").' - ';} else {$headname='';}
print '<title>'.$itname.$headname.$sitename[$lang].'</title>
';
}}
} else {
print '<title>Страница не найдена! - '.$sitename[$lang].'</title>
';
}
Вот весь скрипт
---------- Добавлено 30.08.2012 в 09:47 ----------
в таком виде все нормально работает. но лишь нет титула у раздела НОВОСТИ