PDA

View Full Version : Add-On Releases - PM notification when receiving reputation points


skhms
11-05-2007, 10:00 PM
SK Reputation Notification v1.1.2

Updated to v1.1.2 - 2008-06-18

Notification system for reputation comments.
This modification sends a private message (PM) to the user whenever someone gives him/her a reputation comment.
User must first enable the function on the User CP => Edit Options page. It's off by default.

Created and tested on vBulletin 3.6.8
This mod uses the template hook - $template_hook[usercp_options_messaging]. Which is new since 3.6.8.
So it won't work in earlier versions without some editing on your own.

Two step installation.
Copy 1 file. Import the product.
See instructions in the attached zip file.

Version history:
v1.1.2 - 2008-06-18
Support for option 'Can See Who Left User Ratings'.
- If user not allowed to see who left a reputation comment the sender of the notification PM will always be the specified user and not the actual user leaving a comment.
- Also a different message will be used with no name included.
v1.1.1 - 2008-04-19
Added admin options so you can specify a specifik user as the sender of the notification PM. v1.1.0 - 2007-11-06
First official release.
v1.0.0
First attempt. Not available.

/SK

nukeleo
11-06-2007, 08:35 PM
perfect mod
thanks

gwerzal
11-07-2007, 04:13 PM
Sweet.

Thank you. Just about to install

gwerzal
11-07-2007, 04:14 PM
Is there any way of making this so it is turned on by default.

stinger2
11-07-2007, 05:11 PM
woooooooooo...i had asked for this many many times.....
https://vborg.vbsupport.ru/showthread.php?t=141373

.....it is great.......unfortunatly i am still on 3.6.4

downloaded to be used after upgrade

thanks a milion

skhms
11-07-2007, 08:05 PM
Is there any way of making this so it is turned on by default.


If you are willing to do SQL queries you can enter this at the Maintenance > Execute SQL Query Page:
ALTER TABLE user ALTER sk_repnotif_options SET DEFAULT '1'
This will make the option active as default for new users.

To activate it for all current user, use this:
UPDATE user SET sk_repnotif_options = '1'
Don't forget to add in your table prefix as well.

As always, be careful and take backups before you mess with the database.

/SK

Detomah
11-07-2007, 09:42 PM
I'm surprised this isn't a vBulletin default to be honest.

Will save me work having to constantly remind people about their reputation on my site, nice one. :up:

Barakat
11-08-2007, 01:03 PM
thanks and installed............

what happend to the quick reply in the vbulletin.org ?! shalll we disable it also in our forums ??

projectego
11-08-2007, 05:16 PM
* projectego clicks install. Great hack. :)

viper357
11-10-2007, 04:23 PM
Any chance you could help me in getting this to work on 3.6.5? Please :)

skhms
11-11-2007, 09:27 PM
Any chance you could help me in getting this to work on 3.6.5? Please :)


It should work by editing the template Modify User Option Templates >> modifyoptions

Find:
$customfields[messaging]

Above it add:
$template_hook[usercp_options_messaging]


You must also edit the dependency tag in the product-file "product-sk_repnotif.xml".
Change
minversion="3.6.8"

to
minversion="3.6.5"
or whatever version you want to try. It should work on all 3.6 and probably even 3.5

/SK

donna8284
11-13-2007, 09:00 PM
Thanks - worked on 3.6.4!

GhoHan
11-28-2007, 01:37 AM
great mod. installed :)

DoB Rhapsody
11-28-2007, 04:46 AM
This doesn't seem to work for me. I'm running 3.6.7 PL1 and seems that it didn't add any SQL tables and there is no indication of any new options. No errors during install.

skhms
11-28-2007, 05:08 AM
This doesn't seem to work for me. I'm running 3.6.7 PL1 and seems that it didn't add any SQL tables and there is no indication of any new options. No errors during install.

There is no new tables, the only change is an addition to the user table.

If no new option has been added to the User CP => Edit Option page I would guess that the $template_hook[usercp_options_messaging] hasn't been added correctly.
You must do that manually on v3.6.7. See previous post.

/SK

viper357
12-12-2007, 01:12 PM
If you are willing to do SQL queries you can enter this at the Maintenance > Execute SQL Query Page:
ALTER TABLE user ALTER sk_repnotif_options SET DEFAULT '1'
This will make the option active as default for new users.

To activate it for all current user, use this:
UPDATE user SET sk_repnotif_options = '1'
Don't forget to add in your table prefix as well.

As always, be careful and take backups before you mess with the database.

/SK
This is the first time I will be executing a SQL query, can you tell me where exactly I must add my table prefix in the above code? Thanks.

skhms
12-12-2007, 03:27 PM
This is the first time I will be executing a SQL query, can you tell me where exactly I must add my table prefix in the above code? Thanks.

Add it before the table name - user

ALTER TABLE table_prefixuser ALTER sk_repnotif_options SET DEFAULT '1'

UPDATE table_prefixuser SET sk_repnotif_options = '1'

/SK

viper357
12-12-2007, 06:41 PM
Thanks for the help :)

JustAskJulie
03-30-2008, 10:46 PM
Add it before the table name - user

ALTER TABLE table_prefixuser ALTER sk_repnotif_options SET DEFAULT '1'

UPDATE table_prefixuser SET sk_repnotif_options = '1'

/SK

How do I know what my table prefix is?

skhms
03-31-2008, 04:47 AM
How do I know what my table prefix is?
Its in your config.php file (includes/config.php).
If you left it empty then you obviously don't need to add anything.

/SK

JustAskJulie
04-01-2008, 04:10 PM
Its in your config.php file (includes/config.php).
If you left it empty then you obviously don't need to add anything.

/SK

Thanks. Found it. And fixed it!

JustAskJulie
04-01-2008, 04:40 PM
how do I change it so that the PM comes from the admin rather than the user who left the reputation?

skhms
04-01-2008, 07:14 PM
how do I change it so that the PM comes from the admin rather than the user who left the reputation?

You need to edit the plugin "Send Reputation PM".

Find
$pmdm->set( 'fromuserid', $vbulletin->userinfo['userid'] );
$pmdm->set( 'fromusername', $vbulletin->userinfo['username'] );

Change $vbulletin->userinfo['userid'] and $vbulletin->userinfo['username'] to the user id and the name of your admin account, or whatever user you want to use.
$pmdm->set( 'fromuserid', 1 );
$pmdm->set( 'fromusername', 'admin' );

To change the name in the message
Find
$pmdm->set( 'message', construct_phrase($vbphrase['sk_repnotif_pm_message'], $score, $db->escape_string(fetch_censored_text($vbulletin->GPC['reason'])), $vbulletin->userinfo['username'], $vbulletin->options['bburl'] . "/showthread.php?p=" . $postid ) );

And again change $vbulletin->userinfo['username'] to whatever name you want to use
$pmdm->set( 'message', construct_phrase($vbphrase['sk_repnotif_pm_message'], $score, $db->escape_string(fetch_censored_text($vbulletin->GPC['reason'])), 'admin', $vbulletin->options['bburl'] . "/showthread.php?p=" . $postid ) );

/SK

vithorius
04-18-2008, 03:11 PM
how do I change it so that the PM comes from the admin rather than the user who left the reputation?
Man! I think this hack is a wonderful hack!

Although, I would like to know if you could put this suggestion from 'JustAskJulie' into the hack itself? (so that there would be a way that we could choose who is the sender via the AdminCP?)

Also, could the sender be an non existing member?
(I ask you this because I do not know what would happen to the Admin's 'Sent Items' folder when there will be so many PMs sent... - will the box become full? Or there will be NO messages on the 'Sent Items' folder at all?)

Please do answer!

Thank you very much!



P.S. - Sorry my bad english - I'm a native portuguese speaker.

skhms
04-18-2008, 05:21 PM
Being able to choose sender yourself is a good feature.
I will add it in a future release. No promises when I will get around and do it though.

There will be no messages in the 'Sent Items' folder, so it won't be filled.
Not sure what happens if you use a non-existens userid. I think the PM will be sent but the postbit with the senders username and avatar won't be correct.

/SK

skhms
04-19-2008, 09:23 PM
ok, it didn't take that long.
I have uploaded a new version (1.1.1) of the modification.

Only added the requested feature.
Now you can specify a specifik user in the admincp that will be the sender of the notification PM.

/SK

vithorius
04-22-2008, 01:57 PM
ok, it didn't take that long.
I have uploaded a new version (1.1.1) of the modification.

Only added the requested feature.
Now you can specify a specifik user in the admincp that will be the sender of the notification PM.
GREAT! I've just created a new user (basically my Forum's 'name') and the notifications will be sent from this 'user'.

I will edit the phrasing system of your mod, so I can inform users that the PM will not accept any kind of reply! (I disabled on this 'user' the ability to receive PMs)


EXCELLENT MOD!!! :up: :up: :up: :up: :up:

MissKalunji
05-08-2008, 06:15 PM
i take it that it doesn't work on 3.7? i tried it and no pm gets sent

skhms
05-08-2008, 07:20 PM
i take it that it doesn't work on 3.7? i tried it and no pm gets sent

Really? I haven't had any problems using it on 3.7

Are you sure that the user receiving reputation has turned on notifications? (User CP => Edit Options => Messaging & Notification )

/SK

MissKalunji
05-08-2008, 07:29 PM
oh woops i thought it was by default...

How can i make it default for everyone?

skhms
05-08-2008, 08:12 PM
oh woops i thought it was by default...

How can i make it default for everyone?

If you are willing to do SQL queries you can enter this at the Maintenance > Execute SQL Query Page:

This will make the option active as default for new users
ALTER TABLE tableprefixuser ALTER sk_repnotif_options SET DEFAULT '1'


To activate it for all current user, use this
UPDATE tableprefixuser SET sk_repnotif_options = '1'

As always, replace tableprefix with your tableprefix. Or skip it if you don't use any.

/SK

MissKalunji
05-08-2008, 09:06 PM
Perfect :) worked thanks!

Konstantinos
06-15-2008, 06:54 AM
the problem is that it shows who left reputation for usergroups which are set "can see who left rating" to no

skhms
06-15-2008, 09:20 AM
the problem is that it shows who left reputation for usergroups which are set "can see who left rating" to no

You are right. Must admit that I wasn't aware of that option.
Users in such usergroup should always have there PM's sent from the specified user.

/SK

Konstantinos
06-15-2008, 09:27 AM
i think u should fix that if u can, as a way to bypass this i deleted the username from the phrase and therefore the pm doesnt show who left the rep. so users groups who can see who left rating can see this from user cp

skhms
06-18-2008, 04:28 PM
Modification updated to v1.1.2

Support for option 'Can See Who Left User Ratings'.
If user not allowed to see who left a reputation comment the sender of the notification PM will always be the specified user and not the actual user leaving a comment.
Also a different message will be used with no name included.

Thanks Konstantinos for pointing this out.

/SK

Konstantinos
06-21-2008, 08:53 PM
thx man

Nadavy
11-26-2008, 07:43 PM
Does this come with an option for certain users to turn the mod off :D ?

TheLastSuperman
11-26-2008, 07:57 PM
I don't need this but nice and bookmarked in case I ever do :D

Good job ;)

pokesph
02-23-2009, 06:08 PM
any chance of seeing an update for 3.8.x soon?

skhms
02-23-2009, 06:37 PM
any chance of seeing an update for 3.8.x soon?

Have only giving it a quick test, but as far as I can see it works on 3.8.x as it is.

/SK

Bawtneez
03-27-2009, 02:18 PM
Have only giving it a quick test, but as far as I can see it works on 3.8.x as it is.

/SK

Sorry buddy, tried it on my 3.8.1 and for some reason, the font on my Edit Options page went white so you couldnt see anything and it gave me this at the top..
Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4080

skhms
03-27-2009, 02:51 PM
Sorry buddy, tried it on my 3.8.1 and for some reason, the font on my Edit Options page went white so you couldnt see anything and it gave me this at the top..
Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4080
Not sure about the white font. Can't duplicate that on my site.

The error message suggests that the file bitfield_sk_repnotif.xml hasn't been copied to the folder /includes/xml/ correctly though.
Please check that and reinstall the product so the bitfields get rebuilded again.

/SK

Jafo232
05-19-2009, 11:45 PM
Here is a version that defaults users to receive the PM, and lets them check the box if they want to opt out.

skhms, feel free to distribute it as your own. I had to do it for a client, so no skin off my nose. :)

lm3a.net
05-20-2009, 08:20 AM
Thank you bro

xorex
06-08-2010, 02:52 PM
Nice hack thanks but conflict with this (https://vborg.vbsupport.ru/showthread.php?t=207594) hack/

no receive PM if [tk] Post Notes is on :(

skhms
06-08-2010, 05:50 PM
Nice hack thanks but conflict with this (https://vborg.vbsupport.ru/showthread.php?t=207594) hack/

no receive PM if [tk] Post Notes is on :(
hmm, it worked for me after a quick test.

But try to change the Execution Order of the plugin with the title '[tk] Post Note: Swap in our own xml'.
Change it some higher value to make sure it runs after my plugin at the same Hook Location.

/SK

xorex
06-09-2010, 12:41 AM
hmm, it worked for me after a quick test.

But try to change the Execution Order of the plugin with the title '[tk] Post Note: Swap in our own xml'.
Change it some higher value to make sure it runs after my plugin at the same Hook Location.

/SK
BIG Thanks ! work perferct on tested 3.8.5

russian translate attached :D (UTF-8)

conflict fixed !

installed nominated

Max Taxable
06-19-2011, 09:11 AM
Installed on a 3.8.6

Works fine.

Thanks!

nacaruncr
05-16-2013, 04:30 AM
How can I change the:
"Reputation was given in this post!"
to
"Reputation was given in the thread: PM notification when receiving reputation points (http://www.miweb.com)" (as ex.)??
Any one know it??
Thanks and regards ;)

tbworld
05-16-2013, 05:00 AM
Have you tried searching for it in the phrase manager. That would be your easiest solution.

nacaruncr
05-16-2013, 05:23 AM
Lol... I never remember this XD jajajajjaa
Thanks ;)