Reputation For New Threads and Posts
This modification is in the archives.
Hi.
First of all I'm not a coder. So this hack for a professionals might looks like total disaster but it works and that what is important for me... Like I said before I'm not a code therefore I don't give any support cause I barely know how this hack works This is simple version of this hack: Give Reputation For New Posts & Threads It should (?) be compatible with 3.6.x as well. In specified below forums system will give X reputation points for any new thread and it will send PM to the poster with informatin about it. Code is clearly described. Take a closer look at places marked by CHANGE IT !. Have fun in includes/functions_newpost.php find: Code:
if ($type == 'thread') { $vbulletin->url = 'forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$foruminfo[forumid]"; eval(print_standard_redirect('redirect_duplicatethread', true, true)); } else { $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t=$prevpostthreadid"; eval(print_standard_redirect('redirect_duplicatepost', true, true)); } } Code:
if ($foruminfo[forumid]>37 AND $foruminfo[forumid]<41)//works only in forums with id between 37 and 41 (so 38,39 and 40 only) CHANGE IT ! { $result = $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC"); $punkty=$result['reputation']+20;//incrase reputation by 20 CHANGE IT ! $vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']); $senderpermissions=2; $registry =& $vbulletin; // create the DM to do error checking and insert the new PM $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT); $pmdm->set('fromuserid', 592); //change to admin ID number CHANGE IT ! $pmdm->set('fromusername', 'Sir_Yaro'); //change to admin name CHANGE IT ! $pmdm->set('title', 'Otrzymales(as) 20 pkt reputacji ');//title CHANGE IT ! $pmdm->set('message', "Otrzymales(as) 20 pkt reputacji za umieszczenie urzadzenia na liscie HCL\nDziekujemy bardzo i prosimy o dalsze wpisy :)"); //message CHANGE IT ! $pmdm->set_recipients($vbulletin->userinfo['username'], $senderpermissions); $pmdm->set('dateline', TIMENOW); $pmdm->save(); } Code:
if ($foruminfo[forumid]>37 AND $foruminfo[forumid]<41 AND $postinfo['postid'] == 0)//works only in forums with id between 37 and 41 (so 38,39 and 40 only) CHANGE IT ! { $result = $vbulletin->db->query_first("SELECT reputation FROM user WHERE userid =".$vbulletin->userinfo['userid']." ORDER BY userid ASC"); $punkty=$result['reputation']+20;//incrase reputation by 20 CHANGE IT ! $vbulletin->db->query_write("UPDATE user SET reputation=".$punkty." WHERE userid=".$vbulletin->userinfo['userid']); $senderpermissions=2; $registry =& $vbulletin; // create the DM to do error checking and insert the new PM $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT); $pmdm->set('fromuserid', 592); //change to admin ID number CHANGE IT ! $pmdm->set('fromusername', 'Sir_Yaro'); //change to admin name CHANGE IT ! $pmdm->set('title', 'Otrzymales(as) 20 pkt reputacji ');//title CHANGE IT ! $pmdm->set('message', "Otrzymales(as) 20 pkt reputacji za umieszczenie urzadzenia na liscie HCL\nDziekujemy bardzo i prosimy o dalsze wpisy :)"); //message CHANGE IT ! $pmdm->set_recipients($vbulletin->userinfo['username'], $senderpermissions); $pmdm->set('dateline', TIMENOW); $pmdm->save(); } Code:
$foruminfo[forumid]==37 OR $foruminfo[forumid]==41 OR $foruminfo[forumid]==11 Download This modification is archived and cannot be downloaded. |
Similar Mods
Give Reputation For New Posts & Threads | vBulletin 3.0 Full Releases |
BLS - vB Karma 1.11: give X reputation for new posts in specified threads | vBulletin 3.0 Full Releases |