Показать сообщение отдельно
Старый 08.06.2006, 06:05   #2
Дылгеров Ц.В.
Senior Member
 
Регистрация: 14.11.2005
Адрес: Улан-Удэ
Сообщений: 158
Отправить сообщение для Дылгеров Ц.В. с помощью ICQ
По умолчанию "нехорошее" решение

Нашел http://forum.typo3.tros.nl/viewtopic.php?t=215 - предлагает создать лог внутри корня сайта - не решение - у кого есть еще предложения по статистике сайта? Чувствую придется редиректовый скрипт писать, который будет выделять id страницы из ссылки в логе Typo3 (там легко отделить id - два дефиса впереди).
А чтоб русские названия отображались пришлось применить грубый патч (только для windows-1251 и только в Typo3 - 3.8). Вставил руские буквы в строки в файле class.tslib_fe.php
$shortTitle = substr(ereg_replace('[^\.[:alnum:]_-ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВА ПРОЛДЖЭЯЧСМИТЬБЮ]','_',$this->page['title']),0,30);
и
$pageName = str_replace('[path]', ereg_replace('[^\.[:alnum:]\/_-ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВА ПРОЛДЖЭЯЧСМИТЬБЮ]','_',$this->sys_page->getPathFromRootline($temp,$len)).'/' ,$pageName);

Еще раз повторюсь - что это "нехорошее" решение - также скажу как формируются логи в Typo3 4.0 для русских названий папок и страниц не проверял.

Цитата:
mariella


Posted 28-04-2006 10:00 by mariella Send private message
Hi

I've just installed the Awstats extension in TYPO3 to discover that it is showing data from a logfile generated by TYPO3 and that several fields are showing information that is not entirely correct. If Awstats is attached externally it utilizes the logfile generated by the server and the information is correct.

To be more specific the logfile generated within typo3 differs from the one generated by the server in the following way:

- The URLs generated within the TYPO3 logfile are built on the TYPO3 backend tree structure whereas the urls generated by the server refer to the specific page. For example, the urls shown in the AWATS extension within typo3 read “/technical_sheet/Plan--79.html" instead of http://www.mydomain.com/abc/def/hij/lmn/index.html as generated by the server.
- The logfile within typo3 contains a single file type, HTML. There are no image, CSS or other files
- The logfile within typo3 shows a correct HTTP return code (200) 100% of the time. 301 redirects, generated by the server, and other HTTP errors (for example 404) sho up only in the externally attached version of Awstats.

I believe the logfile in TYPO3 is being generated properly and I have added the following instructions in localconf.php:
$TYPO3_CONF_VARS["FE"]["logfile_dir"] = my_logfile_dir/
and with TypoScript:
config.stat = 1
config.stat_apache = 1
config.stat_apache_logfile =mydomain.log

As an aside, we use the REALURL extension.

Could someone pls tell me if there is anyway to modify or amend the logfile utilized within the Awstats extension in TYPO3 or how to configure typo3 so as to obtain a logfile with a real file path for the URLs and all the file types as is possible if Awstats is attached externally?

Many Thanks

Mariella
Back to top

Seryl Cann


Posted 28-04-2006 11:47 by Seryl Cann Send private message Visit poster's website
Log files generated by TYPO3 are more limited than the real apache logs. I think it should be posible to configure apache to set the log file in logfile_dir and let the Awstats extension use that file to generate the stats, but I've never tried it so it might not work properly.
_________________

www.windinternet.nl

Последний раз редактировалось Дылгеров Ц.В.; 08.06.2006 в 06:45
Дылгеров Ц.В. вне форума   Ответить с цитированием