[Помощь] Вывод цвета групп сказавших "Спасибо" в моде "Благодарности(AJAX)"

Статус
В этой теме нельзя размещать новые ответы.

boltuk

Писатель
Регистрация
4 Июл 2009
Сообщения
3
Реакции
0
Добрый вечер.
Подскажите пожалуйста, как сделать в моде "Благодарности(AJAX)" вывод цвета групп сказавших "Спасибо"?

Спасибо!
 

Вложения

  • 555.JPG
    555.JPG
    9,9 KB · Просмотры: 28
IPB 2.3.6

Как я понял за это отвечают строки в sources/action_public/topics.php

PHP:
// Thanks Ajax Adaptex By ThiagoInfo - Start
                if ($this->ipsclass->vars['thanks_mod_enable'])
                {
                        $thank_pid = $row['pid'];
                                if ($this->ipsclass->vars['thx_topics_replies'])
                                {
                                        $row['thanks_button'] = "<a style=\"cursor:pointer;\" id=\"thank_".$thank_pid."b\" onclick=\"thanks_add('thanks', '{$thank_pid}', '{$row['author_name']}','{$row['author_id']}')\"><img src=\"style_images/<#IMG_DIR#>/p_thanks.gif\" alt=\"Спасибо\" title=\"Спасибо\" /></a>";
                                }
                                if ($row['pid'] == $this->topic['topic_firstpost'])
                                {
                                        $row['thanks_button'] = "<a style=\"cursor:pointer;\" id=\"thank_".$thank_pid."b\" onclick=\"thanks_add('thanks', '{$thank_pid}', '{$row['author_name']}','{$row['author_id']}')\"><img src=\"style_images/<#IMG_DIR#>/p_thanks.gif\" alt=\"Спасибо\" title=\"Спасибо\" /></a>";
                                }
                                if ($this->ipsclass->member['id'] == $row['author_id'] || !$this->ipsclass->member['id'])
                                {
                                        $row['thanks_button'] = "";
                                }


                        $thank_text = "";
                        $thank_text1 = "";
                        $tquery = $this->ipsclass->DB->query("SELECT * FROM ibf_post_thanks WHERE postid = '$thank_pid' ORDER BY username ASC");
                        $thank_tot =  $this->ipsclass->DB->get_num_rows($tquery);

                        if ($thank_tot)
                        {
                                $thank_text1 = "<div class=\"row1\" colspan=\"2\" align=\"top\"><strong>{$this->ipsclass->lang['thx_thanks1']} {$thank_tot} {$this->ipsclass->lang['thx_thanks2']} {$row['author_name']} {$this->ipsclass->lang['thx_thanks3']}:</strong></div>";
                                while($th_row =$this->ipsclass->DB->fetch_row($tquery))
                                {
                                        if ($this->ipsclass->member['id'] == $th_row['userid'])
                                        {
                                                $row['thanks_button'] = "";
                                        }
                                        $thank_text .= "<a href=\"index.php?showuser=".$th_row['userid']."\">".$th_row['username']."</a>, ";
                                }
                        $thank_text = preg_replace( "/,\s+$/", "" , $thank_text);
                        }
                        $row['who_thanks'] = "<tr><td class=\"row2\" colspan=\"2\" align=\"top\"><div id=\"";
                        $row['who_thanks'] .= "thank_".$thank_pid."\"> \n{$thank_text1} {$thank_text}</div></td></tr>\n";
                        if ($this->ipsclass->vars['thx_member_display'])
                        {
                                $thanksquery = $this->ipsclass->DB->query("SELECT thanks_point FROM ibf_members WHERE id = '{$poster['id']}'");         
                                $thanks = $this->ipsclass->DB->fetch_row($thanksquery);
                                $poster['thanks_point']  = $this->ipsclass->compiled_templates['skin_topic']->member_thanks_point( $thanks['thanks_point'] );
                        }
                }

                //Thanks Ajax Adaptex By ThiagoInfo - End
 
Может кто-то знает как это реализовать?
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху