vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - PM notification when receiving reputation points (https://vborg.vbsupport.ru/showthread.php?t=162083)

skhms 11-05-2007 10:00 PM

PM notification when receiving reputation points
 
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

Quote:

Originally Posted by gwerzal (Post 1377842)
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:
Code:

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:
Code:

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

[high]* projectego clicks install. Great hack. :)[/high]

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

Quote:

Originally Posted by viper357 (Post 1379823)
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:
Code:

$customfields[messaging]
Above it add:
Code:

$template_hook[usercp_options_messaging]

You must also edit the dependency tag in the product-file "product-sk_repnotif.xml".
Change
Code:

minversion="3.6.8"
to
Code:

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

Quote:

Originally Posted by DoB Rhapsody (Post 1390834)
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

Quote:

Originally Posted by skhms (Post 1377982)
If you are willing to do SQL queries you can enter this at the Maintenance > Execute SQL Query Page:
Code:

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:
Code:

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

Quote:

Originally Posted by viper357 (Post 1399829)
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

Quote:

Originally Posted by skhms (Post 1399901)
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

Quote:

Originally Posted by JustAskJulie (Post 1478648)
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

Quote:

Originally Posted by skhms (Post 1478839)
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

Quote:

Originally Posted by JustAskJulie (Post 1480169)
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
PHP Code:

$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.
PHP Code:

$pmdm->set'fromuserid');
$pmdm->set'fromusername''admin' ); 

To change the name in the message
Find
PHP Code:

$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
PHP Code:

$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

Quote:

Originally Posted by JustAskJulie (Post 1480169)
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

Quote:

Originally Posted by skhms (Post 1494756)
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

Quote:

Originally Posted by MissKalunji (Post 1512936)
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

Quote:

Originally Posted by MissKalunji (Post 1512994)
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
Code:

ALTER TABLE tableprefixuser ALTER sk_repnotif_options SET DEFAULT '1'

To activate it for all current user, use this
Code:

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

Quote:

Originally Posted by Konstantinos (Post 1549718)
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?


All times are GMT. The time now is 04:59 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.01357 seconds
  • Memory Usage 1,845KB
  • 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
  • (10)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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