Go Back   NuHIT - SEO, Wiki, Forums > NuRatings Forums > NuRatings - Installation and Support
Reply
 
Thread Tools
 
#1
Old 11-23-2007, 03:51 PM
 
kafi
Premium Member
 
Join Date: Feb 2007
Posts: 365
kafi is offline  

howto tie nurating and post thank you


I am using post thank you add-on on my board, but not for "Thank you" button but for "I agree" button.
It is very popular and therefor nearly nobody is voting UP button from NuRatings.

My board is mostly about solving problems, advising solutions, that is why "I agree" button is very popular...
I want "I agree" button to trigger UP botton alongside which will be quite good solution for my needs and will popularize using nurating posts. So far it is mostly used only with DOWN button.

Can anybody advise how to tie these "I agree" button with NuRating UP botton (to increment plus points?). I do not need tie who voted feature, because it is already in place with "Post thank you - I agree" addon...

Thank you!!!
Reply With Quote

#2
Old 11-25-2007, 03:18 AM
 
hmmm I will look into this when I do some of my custom modification. It's a great idea, I'll let you know how it goes. As I stated in my other thread, any mods by myself, won't be ready till sometime december. I have finals in 1 week, so I need to get that out of the way first.
freshfroot
Premium Member
 
freshfroot's Avatar
 
Join Date: Aug 2007
Location: Canada
Posts: 167
Send a message via MSN to freshfroot
freshfroot is offline  
Reply With Quote

#3
Old 11-25-2007, 02:13 PM
 
ElfMage
nuHIT Team
 
ElfMage's Avatar
 
Join Date: Aug 2006
Posts: 3,603
ElfMage is offline  
Hi Kafi,

Do you want to use this to rate posts or threads?... I'll include the code for both, just in case:

To rate threads, assuming $threadid contains the id for the thread you'd want to vote on:

PHP Code:
global $vbulletin;
$vote 1;
$message '';
nr_rate_thread$vbulletin->userinfo['userid'], $threadid$vote$message 
To rate posts, assuming $postid contains the id for the post you'd want to vote on:
PHP Code:
global $vbulletin;
$vote 1;
$message '';
nr_rate_post$vbulletin->userinfo['userid'], $postid$vote$message ); 
Now, as to where to place this code, it should go in the same plage where the "Thank You" code triggers. But I am not familiar with this add-on.
__________________
Server Status Update
Reply With Quote

#4
Old 11-25-2007, 04:02 PM
 
Thank you ElfMage,

thank you button is for posts...

Meaning of:
Quote:
it should go in the same plage where the "Thank You" code triggers
is plugin?

Last edited by kafi : 11-25-2007 at 04:36 PM.
kafi
Premium Member
 
Join Date: Feb 2007
Posts: 365
kafi is offline  
Reply With Quote

#5
Old 12-08-2007, 02:09 PM
 
kafi
Premium Member
 
Join Date: Feb 2007
Posts: 365
kafi is offline  
This is plugin in postbit_display_start
Do you think it should go there? Where exactelly?

Thank you!
PHP Code:
global $post_thanks_cash$post_thanks_done$db$ids

if (empty(
$post_thanks_done)) 

    if (
$ids
    { 
        
$post_ids "0$ids"
    } 
    else 
    { 
        
$post_ids $post['postid']; 
    } 
    if (
$post_ids
    { 
        
$post_thanks_cache $db->query("SELECT * FROM " .TABLE_PREFIX"post_thanks WHERE postid IN (" $post_ids ") ORDER BY username ASC"); 
    } 

    
$act 1

    while (
$thanks $db->fetch_array($post_thanks_cache)) 
    { 
        
$post_thanks_cash[$act][userid] = "$thanks[userid]"
        
$post_thanks_cash[$act][username] = "$thanks[username]"
        
$post_thanks_cash[$act][date] = "$thanks[date]"
        
$post_thanks_cash[$act][postid] = "$thanks[postid]"
        
$act ++; 
    } 

    
$post_thanks_done true


$post_thanks_off '0'
$post_thanks_date '0'
$post_thanks_ban '0'
$post_thanks_user '0'

if (
$this->registry->options['post_thanks_on_off'] == '0'

    
$post_thanks_off++; 


if (!empty(
$this->registry->options['post_thanks_forum_off'])) 

    
$post_thanks_forums1_off explode("|",$this->registry->options['post_thanks_forum_off']); 

    foreach (
$post_thanks_forums1_off AS $post_thanks_forums2_off
    { 
        if (
$post_thanks_forums2_off == $this->thread['forumid']) 
        { 
            
$post_thanks_off++; 
        } 
    } 


if (
$this->registry->options['post_thanks_forum_first_all'] == '1' && $thread['firstpostid'] != $post['postid']) 

    
$post_thanks_off++; 


if (!(
THIS_SCRIPT == showthread || THIS_SCRIPT == showpost)) 

    
$post_thanks_off++; 


if (!empty(
$this->registry->options['post_thanks_forum_first']) && $post['postcount'] != 1

    
$post_thanks_forums1_first explode("|",$this->registry->options['post_thanks_forum_first']); 

    foreach (
$post_thanks_forums1_first AS $post_thanks_forums2_first
    { 
        if (
$post_thanks_forums2_first == $this->thread['forumid']) 
        { 
            
$post_thanks_off++; 
        } 
    } 


if (
$this->registry->options['post_thanks_date_all'] == '0'

    
$post_thanks_date++; 


if (!empty(
$this->registry->options['post_thanks_date_forum'])) 

    
$post_thanks_date1_forums explode("|",$this->registry->options['post_thanks_date_forum']); 

    foreach (
$post_thanks_date1_forums AS $post_thanks_date2_forums
    { 
        if (
$post_thanks_date2_forums == $this->thread['forumid']) 
        { 
            
$post_thanks_date++; 
        } 
    } 


if (!empty(
$this->registry->options['post_thanks_usergroup_using'])) 

    
$post_thanks_usergroups1_using explode("|",$this->registry->options['post_thanks_usergroup_using']); 

    foreach (
$post_thanks_usergroups1_using AS $post_thanks_usergroups2_using
    { 
        if (
$post_thanks_usergroups2_using == $this->registry->userinfo['usergroupid']) 
        { 
            
$post_thanks_ban++; 
        } 
    } 


if (!empty(
$this->registry->options['post_thanks_user_useing'])) 

    
$post_thanks_users1_useing explode("|",$this->registry->options['post_thanks_user_useing']); 

    foreach (
$post_thanks_users1_useing AS $post_thanks_users2_using
    { 
        if (
$post_thanks_users2_using == $this->registry->userinfo['userid']) 
        { 
            
$post_thanks_ban++; 
        } 
    } 


if (!(
$this->registry->options['post_thanks_poster_button']) AND ($this->registry->userinfo['userid'] == $post['userid'])) 

    
$post_thanks_ban++; 


if (
$post_thanks_cash

    foreach (
$post_thanks_cash AS $thanks
    { 
        if (
$thanks['userid'] == $this->registry->userinfo[userid] AND $thanks['postid'] == $post['postid']) 
        { 
            
$post_thanks_user++; 
        } 
    } 


$display_image 'none'

if (
$post_thanks_off == AND $post_thanks_ban == AND $post_thanks_user == AND $this->registry->userinfo['userid']!=AND $thread['isdeleted'] == 0

    
$display_image ''


if (
$post_thanks_off == 0

    eval(
'$post_thanks_button = " ' fetch_template('post_thanks_button') . '";'); 


if (
$post['post_thanks_amount'] > AND $post_thanks_off == AND $thread['isdeleted'] == 0

    
$number_rows 0

    foreach (
$post_thanks_cash AS $thanks
    { 
        if (
$thanks['postid'] == $post['postid']) 
        { 
            
$number_rows++; 
        } 
    } 

    
$cmpt=1

    foreach (
$post_thanks_cash AS $thank
    { 
        if (
$thank['postid'] == $post['postid']) 
        { 
            if (
$cmpt<$number_rows
            { 
                
$virg=","
            } 
            else 
            { 
                
$virg=""
            } 

            if (
$post_thanks_date == 0
            { 
                
$date_thank vbdate($this->registry->options['dateformat'], $thank['date'], true); 
            } 
            eval(
'$liste_user .= " ' fetch_template('post_thanks_box_bit') . '";'); 
            
$cmpt++; 
        } 
    } 

    
$this->post['post_thanks_amount'] = vb_number_format($this->post['post_thanks_amount']); 

    if (
$this->registry->options['legacypostbit']) 
    { 
        eval(
'$post_thanks_box = " ' fetch_template('post_thanks_postbit_legacy') . '";'); 
    } 
    else 
    { 
        eval(
'$post_thanks_box = " ' fetch_template('post_thanks_postbit') . '";'); 
    } 


if (
$post_thanks_off == 0

    eval(
'$post_thanks = " ' fetch_template('post_thanks_box') . '";'); 

Reply With Quote

#6
Old 02-05-2008, 02:25 PM
 
Kafi,
Did you ever figure out where to add the code to make the "Thank you" button count? i would like to add that same functionality, but need to know where to add the code Elfmage suggested.
Thanks,
KF
baz_kingfish
Premium Member
 
Join Date: Feb 2008
Posts: 2
baz_kingfish is offline  
Reply With Quote

#7
Old 02-05-2008, 06:11 PM
 
kafi
Premium Member
 
Join Date: Feb 2007
Posts: 365
kafi is offline  
unfortunatelly I didnt
Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NuWiki possible for second post? kafi NuWiki - Feature Requests 38 11-28-2007 07:20 PM
New post notification towermatt NuWiki - Installation and Support 2 10-10-2007 12:25 PM
second post blocks discussion? beduino NuWiki - Installation and Support 1 06-15-2007 05:57 PM
NuRating now working... soultrader NuRatings - Installation and Support 8 05-26-2007 09:53 PM


All times are GMT -4. The time now is 11:37 PM.