Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 04-22-2005, 10:45 PM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Tieing the Thank You hack with Reputation

is it possible to where when someone hits the tahnk you button, it adds to your reputation? Im willing to pay for the hack if need be but I have to see proff that you can make it work....contact me if you can do so
Reply With Quote
  #2  
Old 04-28-2005, 06:38 PM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump...tha last coder couldnt do it
Reply With Quote
  #3  
Old 04-28-2005, 09:10 PM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by teedizz
is it possible to where when someone hits the tahnk you button, it adds to your reputation? Im willing to pay for the hack if need be but I have to see proff that you can make it work....contact me if you can do so
actually, it's very easy. althou i don't have "thank you" hack install on my board, by looking at the hack, you can add a query to insert to reputation table and update reputation field in user table when a use click on thank you button.

Of course, you must have "thank you" hack installed.

FIND: (in newreply.php)

PHP Code:
$DB_site->query("
        INSERT INTO "
TABLE_PREFIX ."thanks
        (userid, username, date, threadid)
        VALUES ('
$bbuserinfo[userid]', '" addslashes($bbuserinfo[username]) . "', " TIMENOW ", '$threadid')"); 
BELOW, ADD:
PHP Code:
$getreplevel $DB_site->query_first("
        SELECT reputationlevelid
        FROM " 
TABLE_PREFIX "reputationlevel
        WHERE 
$posts[userid] >= minimumreputation
        ORDER BY minimumreputation
        DESC LIMIT 1
    "
);
    
$replevelid intval($getreplevel['reputationlevelid']);
$DB_site->query_first("
        UPDATE " 
TABLE_PREFIX "user
        SET    reputation = reputation+1,
            reputationlevelid = 
$replevelid
        WHERE userid = 
$posts[userid]
    "
);
$DB_site->query("
        INSERT INTO "
TABLE_PREFIX ."reputation
        (postid, userid, reputation, whoadded, reason, dateline)
        VALUES ('
$posts[postid]', '$posts[userid]', '0',  '$bbuserinfo[userid]', '', " TIMENOW ")"); 
it updates 2 table, user + reputation.

note that this add-on has not been tested.
Reply With Quote
  #4  
Old 04-29-2005, 03:54 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]WHERE $posts[userid] >= minimumreputation [/sql]
I didn't have my coffee yet, but you are selecting records that have a minimumreputation less-equal then a userid?

(anyway the test should be the other way round "tablefield <= value".
Reply With Quote
  #5  
Old 04-29-2005, 07:39 AM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you tnguy3n ...i will try it out.....so when someone hits the thank you button it will add to your reputation then right? Thats what the changes you provided will do?

that hack isnt gonna work for my hack..cause my hack doesnt have the same stuff in that file
Reply With Quote
  #6  
Old 04-30-2005, 06:47 PM
teedizz teedizz is offline
 
Join Date: Jan 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:54 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05840 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete