Welcome Guest ( Log In | Register )


Check out the FREE chatroom mod for IPB 3.x

7 Pages V   1 2 3 > »   
Reply to this topicStart new topic
Thanks Mod Light - ajax
ThiagoInfo
post Sep 21 2007, 10:47 AM
Post #1


Newbie
*

Group: Members
Posts: 63
Joined: 2-June 06
Member No.: 225,821



Thanks Mod Light - ajax

Category: Topic View
Compatibility: Invision Power Board 2.2 & 2.3
Demo: http://img485.imageshack.us/img485/4590/thanksxi3.jpg


Quick Description:
It adds a button to thank other members.

Description:
It adds a button to thank other members.
1- Thanks Total - in Topics.
2- Enable or Disable Visualization thanks total.
3- Disable mod total in Admin CP.
4- Option in Admin CP buttom in topics and posts.

This mod adapted of Thanks Hack (Ajax) by meo and Thx Advanced 2.3 By ThiagoInfo.

View Modification
Go to the top of the page
 
+Quote Post
bod68
post Sep 21 2007, 12:34 PM
Post #2


Advanced Member
***

Group: Members
Posts: 456
Joined: 24-May 04
From: Alpes Maritime, France
Member No.: 110,288
IPB Version: 2.3.x



I have Thanks Advanced on my site working great. Do I need to upgrade or install this?!?
Go to the top of the page
 
+Quote Post
ThiagoInfo
post Sep 21 2007, 01:03 PM
Post #3


Newbie
*

Group: Members
Posts: 63
Joined: 2-June 06
Member No.: 225,821



QUOTE(bod68 @ Sep 21 2007, 06:34 PM) *
I have Thanks Advanced on my site working great. Do I need to upgrade or install this?!?

not,

they are different and independent modifications.
E this here not work with the unreal hide hack.

http://www.invisionmodding.com/index.php?showtopic=21516
Go to the top of the page
 
+Quote Post
SMaRt_CaT
post Sep 21 2007, 11:23 PM
Post #4


Newbie
*

Group: Members
Posts: 13
Joined: 7-May 04
Member No.: 105,852
IPB Version: Not Applicable



Could you please make this mod compatible with IBF version 2.1.x ? I'm using IBF 2.1.x and your "Thank mod light" really impressed me.

Thank you in advance.
Go to the top of the page
 
+Quote Post
trancehed
post Sep 23 2007, 07:16 PM
Post #5


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



I'm using 2.3.1 I have uploaded the files and successfully run the install. I am trying to modify the index.php, but I am not finding

"reg" => array( "register" , 'register' , array('profilefields') ),

or anything that sounds like it. Help.

This post has been edited by trancehed: Sep 23 2007, 07:26 PM
Go to the top of the page
 
+Quote Post
ThiagoInfo
post Sep 24 2007, 09:51 AM
Post #6


Newbie
*

Group: Members
Posts: 63
Joined: 2-June 06
Member No.: 225,821



QUOTE(SMaRt_CaT @ Sep 22 2007, 05:23 AM) *
Could you please make this mod compatible with IBF version 2.1.x ? I'm using IBF 2.1.x and your "Thank mod light" really impressed me.

Thank you in advance.

http://deadconnect.net/forum/showthread.php?tid=81

QUOTE(trancehed @ Sep 24 2007, 01:16 AM) *
I'm using 2.3.1 I have uploaded the files and successfully run the install. I am trying to modify the index.php, but I am not finding

"reg" => array( "register" , 'register' , array('profilefields') ),

or anything that sounds like it. Help.


Find:
CODE
                 "online"     => array( "online"             , 'online'       , array() ),


Add Above:
CODE
                 "thanks"     => array( "thanks"             , 'thanks'       , array() ),

Go to the top of the page
 
+Quote Post
trancehed
post Sep 24 2007, 11:58 AM
Post #7


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



QUOTE
Find:
CODE
                 "online"     => array( "online"             , 'online'       , array() ),


Add Above:
CODE
                 "thanks"     => array( "thanks"             , 'thanks'       , array() ),

not finding that either..

actually i think i was looking at the wrong index page. Sorry nm.
Go to the top of the page
 
+Quote Post
trancehed
post Sep 24 2007, 12:13 PM
Post #8


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



ok it seems to be working, but the thanks button looks totally different from the rest of the buttons. What's the easiest way of getting it to match my skin?

This post has been edited by trancehed: Sep 24 2007, 12:14 PM
Go to the top of the page
 
+Quote Post
trancehed
post Sep 24 2007, 12:35 PM
Post #9


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



I am able to make a button that will match but I'm not sure how to make that button show instead of the default one..
Go to the top of the page
 
+Quote Post
ThiagoInfo
post Sep 24 2007, 01:30 PM
Post #10


Newbie
*

Group: Members
Posts: 63
Joined: 2-June 06
Member No.: 225,821



QUOTE(trancehed @ Sep 24 2007, 06:13 PM) *
ok it seems to be working, but the thanks button looks totally different from the rest of the buttons. What's the easiest way of getting it to match my skin?



QUOTE(trancehed @ Sep 24 2007, 06:35 PM) *
I am able to make a button that will match but I'm not sure how to make that button show instead of the default one..

Sorry,

I am not good in designer and I will not be able to make a button pra each skin.
You to move for whom you to make, is enough to substitute the p_thanks.gif image
Go to the top of the page
 
+Quote Post
Assistran
post Sep 24 2007, 01:56 PM
Post #11


Newbie
*

Group: Members
Posts: 23
Joined: 23-January 06
From: Recife,Pernambuco - Brazil
Member No.: 199,772
IPB Version: Not Applicable



QUOTE(trancehed @ Sep 24 2007, 03:13 PM) *
ok it seems to be working, but the thanks button looks totally different from the rest of the buttons. What's the easiest way of getting it to match my skin?


Open: sources/action_public/topics.php:

Just add after the code style_images/ this tag <#IMG_DIR#>/ this tag is to skin in use...


Like bellow:


CODE
        // 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=\"Thanks\" title=\"Thanks\" /></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=\"Thanks\" title=\"Thanks\" /></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


This post has been edited by Assistran: Sep 24 2007, 02:03 PM
Go to the top of the page
 
+Quote Post
trancehed
post Sep 24 2007, 02:20 PM
Post #12


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



QUOTE(Assistran @ Sep 24 2007, 12:56 PM) *
QUOTE(trancehed @ Sep 24 2007, 03:13 PM) *
ok it seems to be working, but the thanks button looks totally different from the rest of the buttons. What's the easiest way of getting it to match my skin?


Open: sources/action_public/topics.php:

Just add after the code style_images/ this tag <#IMG_DIR#>/ this tag is to skin in use...


Like bellow:


CODE
        // 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=\"Thanks\" title=\"Thanks\" /></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=\"Thanks\" title=\"Thanks\" /></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


thanks.. will this allow me to have a different button for each skin I use?
Go to the top of the page
 
+Quote Post
trancehed
post Sep 24 2007, 03:57 PM
Post #13


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



sorry I'm kinda lost..
Go to the top of the page
 
+Quote Post
trancehed
post Sep 25 2007, 05:01 PM
Post #14


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



Seems kinda retarded to have a mod that only works properly with the default skin. If i can't get help with this I guess I will have to uninstall it.
Go to the top of the page
 
+Quote Post
trancehed
post Sep 25 2007, 05:59 PM
Post #15


Newbie
*

Group: Members
Posts: 9
Joined: 15-September 07
From: San Diego
Member No.: 301,980
IPB Version: 2.3.x



yeah i tried the suggestion above and it works in that it changes the button but it only matches one of my skins.
Go to the top of the page
 
+Quote Post

7 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2010 - 09:04 AM

Search Engine Keywords
Invision Skins · IPB Skins