Форум поддержки пользователей ZeroParking

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Форум поддержки пользователей ZeroParking » Архив тем » Восстановление статистики после того, как сдедал подразделы


Восстановление статистики после того, как сдедал подразделы

Сообщений 1 страница 6 из 6

1

Я сделал на codeforum.anihub.ru не только разделы, но и подразделы, а в них снова подразделы. Для доступа к подразделам используются темы с переадресацией. Но теперь в тех разделах, которые имеют подразделы, пропала статистика и информация о модераторах:

Отредактировано Тарас (2010-06-22 13:31:56)

0

2

. Как вернуть статистику и информацию о модераторах в этих разделах?
Верх:

Код:
<script language="JavaScript">
str=document.URL
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f3{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f40{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f42{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f43{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f53{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f54{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f55{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f56{display:none}</style>")
if(str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php")
   document.write("<style>#forum_f57{display:none}</style>")
</script>

Низ:
<script type="text/javascript">
var arr = new Array()

arr[0] = new Array("http://codeforum.anihub.ru/viewforum.php?id=10","http://codeforum.anihub.ru/viewforum.php?id=10","")
arr[1] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=24","http://codeforum.anihub.ru/viewforum.php?id=43","")
arr[2] = new Array("http://codeforum.anihub.ru/viewforum.php?id=2","http://codeforum.anihub.ru/viewforum.php?id=2","")
arr[3] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=26","http://codeforum.anihub.ru/viewforum.php?id=3","")
arr[4] = new Array("http://codeforum.anihub.ru/viewforum.php?id=11","http://codeforum.anihub.ru/viewforum.php?id=11","")
arr[5] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=27","http://codeforum.anihub.ru/viewforum.php?id=53","")
arr[6] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=28","http://codeforum.anihub.ru/viewforum.php?id=55","")
arr[7] = new Array("http://codeforum.anihub.ru/viewforum.php?id=12","http://codeforum.anihub.ru/viewforum.php?id=12","")
arr[8] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=29","http://codeforum.anihub.ru/viewforum.php?id=42","")
arr[9] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=30","http://codeforum.anihub.ru/viewforum.php?id=54","")
arr[10] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=31","http://codeforum.anihub.ru/viewforum.php?id=56","")
arr[11] = new Array("http://codeforum.anihub.ru/viewforum.php?id=44","http://codeforum.anihub.ru/viewforum.php?id=44","")
arr[12] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=32","http://codeforum.anihub.ru/viewforum.php?id=57","")
arr[13] = new Array("http://codeforum.anihub.ru/viewforum.php?id=46","http://codeforum.anihub.ru/viewforum.php?id=46","Раздел посвящён интернет-ресурсам, но не другим форумам")
arr[14] = new Array("http://codeforum.anihub.ru/viewforum.php?id=49","http://codeforum.anihub.ru/viewforum.php?id=49","Раздел посвящён приобретению доменных имён, регистраторам доменов и самой системе доменных имён, но не конкретным интернет-ресурсам, в этих доменах находящимся")

var arr2=document.getElementsByTagName("tr")
for (i=0;arr2[i]; i++) {
var str=arr2[i].innerHTML
for (j=0; arr[j]; j++)
    if(str.indexOf(arr[j][0])!=-1) {
    td=arr2[i].getElementsByTagName("td")
    td[0].innerHTML="<div class=\"tclcon\"><h3><a href="+arr[j][1]+">"+td[0].getElementsByTagName("a")[0].innerHTML+"</a></h3>"+arr[j][2]+"</div>"
    td[1].innerHTML="&nbsp;"
    td[2].innerHTML="&nbsp;"
    td[3].innerHTML="&nbsp;"
    break
    }
}
</script>
В тех же разделах пропали строчки с никами модераторов. Как их вернуть?

Отредактировано Тарас (2010-06-22 13:32:24)

0

3

Новый низ:
<script type="text/javascript">
var arr = new Array()

arr[0] = new Array("http://codeforum.anihub.ru/viewforum.php?id=10","http://codeforum.anihub.ru/viewforum.php?id=10","")
arr[1] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=24","http://codeforum.anihub.ru/viewforum.php?id=43","")
arr[2] = new Array("http://codeforum.anihub.ru/viewforum.php?id=11","http://codeforum.anihub.ru/viewforum.php?id=11","")
arr[3] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=27","http://codeforum.anihub.ru/viewforum.php?id=53","")
arr[4] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=28","http://codeforum.anihub.ru/viewforum.php?id=55","")
arr[5] = new Array("http://codeforum.anihub.ru/viewforum.php?id=12","http://codeforum.anihub.ru/viewforum.php?id=12","")
arr[6] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=29","http://codeforum.anihub.ru/viewforum.php?id=42","")
arr[7] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=30","http://codeforum.anihub.ru/viewforum.php?id=54","")
arr[8] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=31","http://codeforum.anihub.ru/viewforum.php?id=56","")
arr[9] = new Array("http://codeforum.anihub.ru/viewforum.php?id=58","http://codeforum.anihub.ru/viewforum.php?id=58","")
arr[10] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=34","http://codeforum.anihub.ru/viewforum.php?id=3","")
arr[11] = new Array("http://codeforum.anihub.ru/viewforum.php?id=44","http://codeforum.anihub.ru/viewforum.php?id=44","")
arr[12] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=32","http://codeforum.anihub.ru/viewforum.php?id=57","")

var arr2=document.getElementsByTagName("tr")
for (i=0;arr2[i]; i++) {
var str=arr2[i].innerHTML
for (j=0; arr[j]; j++)
    if(str.indexOf(arr[j][0])!=-1) {
    td=arr2[i].getElementsByTagName("td")
    td[0].innerHTML="<div class=\"tclcon\"><h3><a href="+arr[j][1]+">"+td[0].getElementsByTagName("a")[0].innerHTML+"</a></h3>"+arr[j][2]+"</div>"
    td[1].innerHTML="&nbsp;"
    td[2].innerHTML="&nbsp;"
    td[3].innerHTML="&nbsp;"
    break
    }
}
</script>
Понадобился, чтоб по быстрому подавить такой глюк: строка

Код:
arr[2] = new Array("http://codeforum.anihub.ru/viewforum.php?id=2","http://codeforum.anihub.ru/viewforum.php?id=2","")

влияла на разделы с двузначными номерами, начинающиеся с двойки. Кстати, как с ним бороться не превращая раздел в 58?

Отредактировано Тарас (2010-06-22 14:42:58)

0

4

Нашёл, как сделать, чтоб при нажатии на раздел не открывался сразу подраздел. Теперь скрип выглядит так:

Код:
<script type="text/javascript">
var arr = new Array()

arr[0] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=24","http://codeforum.anihub.ru/viewforum.php?id=43","")
arr[1] = new Array("http://codeforum.anihub.ru/viewforum.php?id=11","http://codeforum.anihub.ru/viewforum.php?id=11","")
arr[2] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=27","http://codeforum.anihub.ru/viewforum.php?id=53","")
arr[3] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=28","http://codeforum.anihub.ru/viewforum.php?id=55","")
arr[4] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=29","http://codeforum.anihub.ru/viewforum.php?id=42","")
arr[5] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=30","http://codeforum.anihub.ru/viewforum.php?id=54","")
arr[6] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=31","http://codeforum.anihub.ru/viewforum.php?id=56","")
arr[7] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=34","http://codeforum.anihub.ru/viewforum.php?id=3","")
arr[8] = new Array("http://codeforum.anihub.ru/viewtopic.php?id=32","http://codeforum.anihub.ru/viewforum.php?id=57","")

var arr2=document.getElementsByTagName("tr")
for (i=0;arr2[i]; i++)
{
 var str=arr2[i].innerHTML
 for (j=0; arr[j]; j++)
 {
  if(str.indexOf(arr[j][0])!=-1)
  {
   td=arr2[i].getElementsByTagName("td")
   if (document.URL!="http://codeforum.anihub.ru/")
   {
    td[0].innerHTML="<div class=\"tclcon\"><h3><a href="+arr[j][1]+">"+td[0].getElementsByTagName("a")[0].innerHTML+"</a></h3>"+arr[j][2]+"</div>"
    td[1].innerHTML="&nbsp;"
    td[2].innerHTML="&nbsp;"
    td[3].innerHTML="&nbsp;"
   }
   else
   {
    td[1].innerHTML="&nbsp;"
    td[2].innerHTML="&nbsp;"
    td[3].innerHTML="&nbsp;"
   }
  }
 }
}
</script>

, но всё равно нет статистики, а если убрать строки

Код:
else
   {
    td[1].innerHTML="&nbsp;"
    td[2].innerHTML="&nbsp;"
    td[3].innerHTML="&nbsp;"
   }

, тогда она есть, но не правильная, так как в неё мешаются и те темы, которые на самом деле подразделы. Как это исправить? Как вывести последнюю обновлённую тему раздела, имеющего подраздел так, чтоб если последней окажется тема, которая на самом деле подраздел, чтоб ячейка была пуста? Мне нужна статистика по таким разделам, не включающая в себя подразделы. И ещё. Раздел С++ содержит подраздел C++ для Linux:

Отредактировано Тарас (2010-06-23 06:46:02)

0

5

................................

Отредактировано Тарас (2010-06-23 06:47:18)

0

6

. Как сделать, чтоб когда открыт раздел C++, в строке C++ для Linux писалась статистика этого раздела? Пусть в этом разделе одна тема с двумя сообщениями. Тогда пусть пишется так:

0


Вы здесь » Форум поддержки пользователей ZeroParking » Архив тем » Восстановление статистики после того, как сдедал подразделы


Рейтинг форумов | Создать форум бесплатно