vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Auto PM on Reputation (https://vborg.vbsupport.ru/showthread.php?t=98028)

tnguy3n 10-09-2005 10:00 PM

Auto PM on Reputation
 
Author: tnguy3n
Source: http://12.226.255.221/forums/showthread.php?t=16

This is port of my Send PM On Reputation For vB3.0

This mod allow members to enable sending PM option when a user give him/her a reputation point.

To enable sending PM upon receiving reputation point, go to User CP => Edit Profile =>
PM upon reputation option, then check the option.

Plugins: 1
Template mod: none
Installation Time: 1-2 mins

=========================

Log into AdminCP => User Profile Fields => Add New User Profile Field => Multiple-Selection Checkbox

Title: Automatic PM on Reputation Option
Description: A PM will be sent to you when a user give your a reputation point if you enable this option.
Limit Selection: 1
Boxes Per Line: 1
Options: Enable Automatic PM on Reputation
(default to other fields)

Now go to User Profile Field Manager and jot down new field id, i.e fieldXX.
---------

PLUGINS:

UPLOAD AutoPMonRep.xml plugin.

Dont forget to open Auto PM On Reputation, and adjust fieldX to your fieldid.

SnowBot 10-10-2005 08:20 AM

Great little hack, can the PM sent be altered to what you want via a phrase?

trackpads 10-10-2005 01:37 PM

Excellent!!! Thanks!!

hotrod1 10-10-2005 02:04 PM

Simple install, thanks!!!

trackpads 10-10-2005 02:34 PM

One of the old features was that the PM would come from the actual user sending the rep, is there a way to do that with this version?

Thanks!

-Jason

tnguy3n 10-10-2005 02:37 PM

Quote:

Originally Posted by trackpads
One of the old features was that the PM would come from the actual user sending the rep, is there a way to do that with this version?

Thanks!

-Jason

Open you plugin,

FIND:
PHP Code:

    $sender "Forum Bot"// rename it to whatever you like
    
$senderid 1// userid
    
$pm_title "You have been given $score rep point.";
    
$pm_content $vbulletin->userinfo['username'] . " has just given you $score reputation point for your post.\n\rKeep up good work!\n\r";

    if(
$score 0)
    {

        
$pm_content $vbulletin->userinfo['username'] . " has disagreed with your post of yours\n\rYou may need to investigate the reason.\n\r";
    } 

CHANGE TO::
PHP Code:

    $sender "$vbulletin->userinfo['username']"// rename it to whatever you like
    
$senderid $vbulletin->userinfo['userid']; // userid
    
$pm_title "You have been given $score rep point.";
    
$pm_content $vbulletin->userinfo['username'] . " has just given you $score reputation point for your post.\n\rKeep up good work!\n\r";

    if(
$score 0)
    {

        
$pm_content $vbulletin->userinfo['username'] . " has disagreed with your post of yours\n\rYou may need to investigate the reason.\n\r";
    } 

dont forget to change your pm content.

tnguy3n 10-10-2005 02:39 PM

Quote:

Originally Posted by SnowBot
Great little hack, can the PM sent be altered to what you want via a phrase?

I'm pretty sure that'll work just fine.

trackpads 10-10-2005 03:06 PM

Quote:

Originally Posted by tnguy3n
Open you plugin,

FIND:
PHP Code:

    $sender "Forum Bot"// rename it to whatever you like
    
$senderid 1// userid
    
$pm_title "You have been given $score rep point.";
    
$pm_content $vbulletin->userinfo['username'] . " has just given you $score reputation point for your post.\n\rKeep up good work!\n\r";

    if(
$score 0)
    {

        
$pm_content $vbulletin->userinfo['username'] . " has disagreed with your post of yours\n\rYou may need to investigate the reason.\n\r";
    } 

CHANGE TO::
PHP Code:

    $sender "$vbulletin->userinfo['username']"// rename it to whatever you like
    
$senderid $vbulletin->userinfo['userid']; // userid
    
$pm_title "You have been given $score rep point.";
    
$pm_content $vbulletin->userinfo['username'] . " has just given you $score reputation point for your post.\n\rKeep up good work!\n\r";

    if(
$score 0)
    {

        
$pm_content $vbulletin->userinfo['username'] . " has disagreed with your post of yours\n\rYou may need to investigate the reason.\n\r";
    } 

dont forget to change your pm content.

I get this as the username when a member gives a rep. This shows up as the sender of the pm:

Array['username']

Any idea?

trackpads 10-10-2005 03:07 PM

Ok, that is just in the PM list, when I open the actual PM it is the right user and avatar.

trackpads 10-10-2005 03:08 PM

Screenshot


All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,763KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete