14:47
Обновить
Автор темы на форуме - Форум
cszona-portal.net.ru
[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
Форум » Скрипты для uCoz » Форум » Автор темы на форуме
Автор темы на форуме

zver

Дата: Пятница, 06.08.2010, 22:13 | Сообщение # 1
Майор
Группа: Журналист
Сообщений: 107
« 59 »
Статус: Offline
Скрин

После $BODY$ в общий вид страниц форума:

Code
   <?if($PAGE_ID$='threadpage')?>
           <script type="text/javascript">
           /* TopicAuthor script by Vanofuture — http://alexeenko.org/ */
           url_now = location.href.split('/')[4].split('?')[0].split('#')[0].split('-');
           url_true = $('a.forumBarA:first').attr('href').split('/')[4].split('-');
           if (url_now.length == 3 && url_now[2] != url_true[2]) {
               $.get($('a.forumBarA:first').attr('href'), function(data) {
                   author = $('td.postTdTop:first a', data);
                   $('td.postTdTop a[text="' + author.text() + '"]').parent().parent().next().find('td:first').each(function() {
                       if ($(this).find('img.userAvatar').length != 0) {
                           $(this).find('img.userAvatar').after('
<b style="color: red;">Автор темы</b>');
                       } else {
                           $(this).prepend('<b style="color: red;">Автор темы</b>
');
                       }
                   });
               });
           } else {
               author = $('td.postTdTop:first a');
               $('td.postTdTop a[text="' + author.text() + '"]').parent().parent().next().find('td:first').each(function() {
                   if ($(this).find('img.userAvatar').length != 0) {
                       $(this).find('img.userAvatar').after('
<b style="color: red;">Автор темы</b>');
                   } else {
                       $(this).prepend('<b style="color: red;">Автор темы</b>
');
                   }
               });
           }
           </script>
           <?endif?>

У аватаров в постах должен быть класс userAvatar.


Форум » Скрипты для uCoz » Форум » Автор темы на форуме
  • Страница 1 из 1
  • 1
Поиск:

Вверх