vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Moderators Functions - Show User History On Infraction Form And Postbits (https://vborg.vbsupport.ru/showthread.php?t=318633)

MarkFL 05-10-2015 09:00 PM

Show User History On Infraction Form And Postbits
 
1 Attachment(s)
This product will allow those with the ability to issue warnings/infractions to see a user's user notes and infraction history on the infraction form for easy reference. A new data block is displayed below the "User Infraction" block containg the user's relevant history.

On the forum I help administrate, we have devised a system where if a user breaks a forum rule for the first time, we simply send a friendly PM advisory of the rule rather than going to the infraction system. Many users, especially new users, are taken aback to receive a formal warning or infraction for breaking a rule they likely didn't realize is in place. Let's face it, the vast majority of users just don't read the rules.

So, when we see that a user has broken a rule, we need to check to see if a PM advisory has previously been sent, and we record this information in the usernotes. Then if we find that an advisory has been sent, we have to check that user's infraction history to see if they have been formally warned or given an infraction so that we know the most appropriate action to take for this new violation.

With this product, you can simply click the "Add Infraction" button on the postbit, and have all the needed history available on the generated form so that you can decide what action is most appropriate. If you find that no relevant usernote data exists, there is a button below the data block element that will take you to that user's usernote page.

I wish to extend a special thanks to BrettC Frontier for many great suggestions and error reporting that has really helped make this add-on much better. :cool:

Update: version 1.1
  • Option to display user history in postbits.
  • Option to set which usergroups will have their history displayed in postbits. Both data include links to the relevant pages.
  • Option to set which usergroups will see the user history in postbits.

Update: version 2.0
  • Shortened product title so it won't be truncated in AdminCP ► Plugins & Products ► Manage Products.
  • Fixed text color on usergroup checkbox elements in product settings to be dark.
  • If usernote title is empty, displays "N/A" within user history block on infraction form.
  • Fixed infraction reason to either use chosen or custom reason, whichever applies.
  • Infractions show date/time of expiry.
  • Infractions show link to post that caused warning/infraction to be issued, using thread title.
  • Infractions are shown in descending order, sorted by time issued.
  • Background color of user history block fixed to white.
  • If no "Administrative Note" is given for an infraction, then "N/A" is displayed.
  • Execution order of postbit plugin increased to help ensure it gets run.
  • Usernames of usernote authors and infraction issuers link to user profiles.

Update: version 2.1
  • Fixed bug regarding infraction not being associated with a post and causing and SQL
    error.
  • Changed usergroup selection from checkboxes to select elements.

Update: version 2.2
  • Added the display of active infraction points on infraction form.
  • Added the ability to customize the color of the active points based on value.

Update: version 2.3
  • Added the display of active infraction points on user postbits, where the number is colored as defined.

Update: version 2.4
  • Corrected typo preventing templates from being cached.


Installation:

Download and extract the attached .zip file.

Follow:

AdminCP ► Plugins & Products ► Manage Products ► Add/Import Product.

Click on "Choose File" and browse to the product xml file that was packaged in the .zip file.

Click "Import"

You MUST set your settings to enable the product.

Support for this product can be found here:

Alan_SP 05-11-2015 05:39 PM

Thanks, this certainly looks very useful. :up:

My Hattiesburg 05-11-2015 05:40 PM

This looks like another great mod from you, I've been wanting something like this for a long time.

MarkFL 05-13-2015 12:45 AM

I have just updated the product to include the ability to display usernote and infraction data in user postbits. You can select which groups will have this data included in their postbits and which groups will be able to see this data. Both data include links to the relevan pages for ease of navigation. :D

Alan_SP 05-14-2015 01:00 PM

It's useful, can help with moderating problematic users, as we can see right away in one glance their history.

bosanci28 05-16-2015 11:17 PM

Useful ! Thanks.

Elixar 05-19-2015 04:29 PM

Not showing up for me, I'm using the older horizontal format for threads.

MarkFL 05-19-2015 04:35 PM

Quote:

Originally Posted by Elixar (Post 2545875)
Not showing up for me, I'm using the older horizontal format for threads.

Can you give me a link to your site so I can see what you mean by horizontal format?

Elixar 05-19-2015 04:38 PM

Quote:

Originally Posted by MarkFL (Post 2545876)
Can you give me a link to your site so I can see what you mean by horizontal format?

I'm using the legacy format.

MarkFL 05-19-2015 04:49 PM

Without a link to your site, I can't be of much help. Legacy format means down the left side not across the top, which is what I use on my dev and live sites as well.

Did you set the product as active?

Elixar 05-19-2015 04:52 PM

Quote:

Originally Posted by MarkFL (Post 2545879)
Without a link to your site, I can't be of much help. Legacy format means down the left side not across the top, which is what I use on my dev and live sites as well.

Did you set the product as active?

Sorry, I'm using the old format, got confused.

MarkFL 05-19-2015 04:56 PM

Quote:

Originally Posted by Elixar (Post 2545880)
Sorry, I'm using the old format, got confused.

http://christianityhaven.com/

I see no posts to look at...also are you sure you have set the product as active?

Elixar 05-19-2015 04:59 PM

Quote:

Originally Posted by MarkFL (Post 2545883)
I see no posts to look at...also are you sure you have set the product as active?

Yes it's active. And I added a post in a public forum. :)

MarkFL 05-19-2015 05:08 PM

Okay, two things I would ask for you to check:

1.) Are you in a usergroup you have defined as being able to view the history information in postbits and is the user whose post you are viewing in a usergroup who has been defined to show the history in the postbit?

2.) In the postbit template you are using, see if the hook labeled "postbit_userinfo_right_after_posts" exists.

Elixar 05-19-2015 05:36 PM

Quote:

Originally Posted by MarkFL (Post 2545887)
Okay, two things I would ask for you to check:

1.) Are you in a usergroup you have defined as being able to view the history information in postbits and is the user whose post you are viewing in a usergroup who has been defined to show the history in the postbit?

2.) In the postbit template you are using, see if the hook labeled "postbit_userinfo_right_after_posts" exists.

1. Yes.
2. No.

MarkFL 05-19-2015 05:43 PM

It appears you are now using a legacy postbit style...since you say the hook is not present in your postbit template (I assume it has been removed), try going to your "postbit_legacy" template, and locate the code:

HTML Code:

                                        <dt>{vb:rawphrase posts}</dt> <dd><div>{vb:raw post.posts}</div></dd>
And beneath it add:

HTML Code:

                                        {vb:raw template_hook.postbit_userinfo_right_after_posts}
Does this fix the issue?

Elixar 05-19-2015 06:43 PM

Weird, it's in there.

MarkFL 05-19-2015 09:14 PM

Quote:

Originally Posted by Elixar (Post 2545899)
Weird, it's in there.

Okay...I think the most efficient and expedient way to get to the bottom of this is for you to PM the login credentials of an admin account to me. :)

Elixar 05-20-2015 04:33 PM

Sent. :)

MarkFL 05-21-2015 10:22 AM

Quote:

Originally Posted by Elixar (Post 2545976)
Sent. :)

I gather by now that you have not read my return PM, but the login credentials you sent are invalid.

Elixar 05-23-2015 02:56 AM

Replied, sorry for the delay!

MarkFL 05-23-2015 03:12 PM

Quote:

Originally Posted by Elixar (Post 2546242)
Replied, sorry for the delay!

I was able to log in and fix the issue. Because of other mods you have installed, I had to increase the execution order of my plugin. :D

Please verify that everything (including the other mods) is working as you desire.

Elixar 05-23-2015 08:43 PM

Works great! Any chance to have them work as links to the user notes and infractions? :D

MarkFL 05-23-2015 09:04 PM

Quote:

Originally Posted by Elixar (Post 2546278)
Works great! Any chance to have them work as links to the user notes and infractions? :D

They do...I just double-checked to verify. :D

Elixar 05-23-2015 09:16 PM

Oops, was looking for the normal link color. :D

MarkFL 05-23-2015 09:30 PM

Quote:

Originally Posted by Elixar (Post 2546280)
Oops, was looking for the normal link color. :D

I coded them to have the same color as the other data in postbits, but I can change it on your site to whatever color you want. :D

Elixar 05-23-2015 09:46 PM

Quote:

Originally Posted by MarkFL (Post 2546281)
I coded them to have the same color as the other data in postbits, but I can change it on your site to whatever color you want. :D

Sure, if you wanna do hyperlink blue. :D

Also, I'm getting this error when I give a test infraction, not sure why.

https://vborg.vbsupport.ru/external/2015/05/7.png

MarkFL 05-23-2015 11:16 PM

Quote:

Originally Posted by Elixar (Post 2546282)
Sure, if you wanna do hyperlink blue. :D

Also, I'm getting this error when I give a test infraction, not sure why.

https://vborg.vbsupport.ru/external/2015/05/7.png

Okay, the links are bold and blue. :)

This add-on does not call the trim() function, but I gave a test infraction on both my dev sites to be sure (vB 4.2.1 and 4.2.2 PL4) and did not get any errors.

I don't want to give any infractions (test or otherwise) on your site, so try disabling my add-on and try giving a test infraction again and see if you get that error.

biftek 05-28-2015 04:29 AM

doesn't work for me either , the hooks are in place

MarkFL 05-28-2015 04:40 AM

Quote:

Originally Posted by biftek (Post 2546597)
doesn't work for me either , the hooks are in place

Okay, let's first try what I did to fix it on Elixar's site...follow:

AdminCP ► Plugins & Products ► Plugin Manager

Locate the plugin titled "Usernote Information In Postbits" and change the Execution Order to 200.

Does this fix the issue on your site?

To receive further support, please mark this product as "Installed." :)

biftek 05-28-2015 07:09 AM

sort of fixed the issue , now the problem i got was the warning/infraction/usernote doubled with each post
first post had it once , second post had it twice , 3rd three times etc etc ,

(each post from different users)

MarkFL 05-28-2015 12:22 PM

Would you mind posting a screenshot of this? :D

biftek 05-31-2015 09:52 AM

i uninstalled your addon

thanks anyway , it looked like a good idea

Elixar 05-31-2015 06:20 PM

Quote:

Originally Posted by biftek (Post 2546829)
i uninstalled your addon

thanks anyway , it looked like a good idea

You couldn't have waited to see if he could help you lol?

biftek 06-01-2015 09:52 AM

Quote:

Originally Posted by Elixar (Post 2546856)
You couldn't have waited to see if he could help you lol?

nope i couldn't have , because it made the forum look untidy , eg: a thread with 50 pages , it would blow right out due to the multiply factor that was happening ,

the warning/infraction/usernote doubled with each post
first post had it once , second post had it twice , 3rd three times etc etc ... so say by the 50th post , it would've blown right out to a hundred or so warning/infraction/usernote doubled in just one postbit

MarkFL 06-01-2015 10:04 AM

Quote:

Originally Posted by biftek (Post 2546890)
nope i couldn't have , because it made the forum look untidy , eg: a thread with 50 pages , it would blow right out due to the multiply factor that was happening ,

the warning/infraction/usernote doubled with each post
first post had it once , second post had it twice , 3rd three times etc etc ... so say by the 50th post , it would've blown right out to a hundred or so warning/infraction/usernote doubled in just one postbit

If you wish to PM login credentials to me for an admin account at your site, I would be glad to try to troubleshoot the issue. Unfortunately, I cannot replicate the issue on my dev site.

Elixar 06-01-2015 03:24 PM

Quote:

Originally Posted by biftek (Post 2546890)
nope i couldn't have , because it made the forum look untidy , eg: a thread with 50 pages , it would blow right out due to the multiply factor that was happening ,

the warning/infraction/usernote doubled with each post
first post had it once , second post had it twice , 3rd three times etc etc ... so say by the 50th post , it would've blown right out to a hundred or so warning/infraction/usernote doubled in just one postbit

So disable it and he'll help you. Mark has been a huge help to me on my forum I'm working on.

MarkFL 06-02-2015 05:59 PM

Quote:

Originally Posted by biftek (Post 2546890)
nope i couldn't have , because it made the forum look untidy , eg: a thread with 50 pages , it would blow right out due to the multiply factor that was happening ,

the warning/infraction/usernote doubled with each post
first post had it once , second post had it twice , 3rd three times etc etc ... so say by the 50th post , it would've blown right out to a hundred or so warning/infraction/usernote doubled in just one postbit

I just finished helping another user with a strikingly similar issue with someone else's add-on, and so you might want to see if you have any plugins hooked to one of the postbit locations which use:

PHP Code:

global $template_hook

If so, try commenting out that line, to read:

PHP Code:

//global $template_hook; 

This may fix the issue for you. :D

biftek 06-03-2015 06:48 AM

those hooks weren't present in my postbit , never mind thanks anyway

it seemed like a good addon

Black Snow 06-03-2015 07:02 AM

Quote:

Originally Posted by biftek (Post 2547041)
those hooks weren't present in my postbit , never mind thanks anyway

it seemed like a good addon

I would install this: https://vborg.vbsupport.ru/showthread.php?t=265976 then run a search for global $template_hook; using the new search feature in your admincp. Then comment out the line as MarkFL suggested.


All times are GMT. The time now is 09:15 AM.

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.01412 seconds
  • Memory Usage 1,843KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (20)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