vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   vBPunch v1.2 - A Quick Warning System (https://vborg.vbsupport.ru/showthread.php?t=97117)

Alan @ CIT 09-28-2005 10:00 PM

vBPunch v1.2 - A Quick Warning System
 
If Upgrading from version 1.1, upload all of the files in the Zip, making sure that they overwrite the old ones, then install the product XML.

If upgrading from version 1.0, please follow the instructions in the install guide in the Zip file.

Changelog
Version 1.2
  • Clicking "Cancel" on the extra text prompt means that the PM will not be sent
  • Adding an option to display a confirmation popup when the PM has been sent
  • Fixed a bug with usergroup permission checking (thanks Osmosis)
Version 1.1
  • Added a global on/off switch for vBPunch
  • Added the ability to add/remove reputation points when punching
  • Added usergroup permissions - you can now choose which usergroups are allowed to use vBPunch
  • Now includes 3 "Punch User" images as well as the text link
What is vBPunch?
vBPunch is a quick way of sending a warning PM to a user, based on a post they have made.
It adds a link to the postbit called "Punch User". When an admin clicks this, vBPunch pops up a textbox letting the admin type a reason (if they wish, it's optional), then it sends the user a PM.

What makes vBPunch so special then???!?
The useful thing about vBPunch is that it does it all in the backgorund using Ajax. That means, no popup windows, no page refreshes, nothing. All the admin does is click the "Punch User" link, enter a reason if needed, then continues reading the thread / post, without being interupted.

Installation
Please read install.html located in the zip file

Un-installation
Please read install.html located in the zip file. Please ensure that you delete the uploaded files, before un-installing the product in the vBulletin AdminCP, otherwise you will recieve errors when you edit a usergroup.

-----------------------------------------------------------------

Important: Unfortunately, my leased vBulletin licence has now expired, and I won't be renewing it until September which means I will be unable to reply to this thread, or update this mod until then. I'm hopeful that the great vBulletin.org community will step in to answer any questions in my absence though :) See you all in early September! :D

Hawkbizkit 09-29-2005 05:01 AM

OMG this is the best hack on the vborg Clicks install w00tage Alan-CIT you rock.

Guest190829 09-29-2005 05:02 AM

[high]* Guest190829 punches Alan @ Cit in the face
[/high]

:D

Great job, can't wait to see this AJAX-licious modification.

Alan @ CIT 09-29-2005 05:03 AM

Forgot to mention, vBPunch uses 4 phrases, all in the GLOBAL section, and all begining with vbpunch_ so they should be easy to find.

The PM message that is sent is vbpunch_warning_text if you wish to change it

Bad Bunny 09-29-2005 06:13 AM

lol This is awesome. I think my forum would actually really like to do this to each other. LOL

How would I go about making it so different usergroups can punch someone?

Azhrialilu 09-29-2005 06:46 AM

LOL funny, I like it :D

Hawkbizkit 09-29-2005 06:58 AM

yes in the plugin vBPunch : Template conditional checks change this line:
PHP Code:

 else if (can_administer()) 

To:
PHP Code:

else if (in_array($vbulletin->userinfo[usergroupid], array(5,6,7,9))) 

just add the usergroups you want to the array.

Also edit vbpunch.php on line 25:
PHP Code:

if (!can_administer()) 

With this:
PHP Code:

if (!in_array($vbulletin->userinfo[usergroupid], array(5,6,7,9))) 


Alan @ CIT 09-29-2005 07:04 AM

Good idea Hawkbizkit, I'll add usergroup permissions in the next release :)

Cyricx 09-29-2005 11:46 AM

Wow this could be a great basis for someone to use to rewrite the vbpager system with.

Using AJAX for that would be awesome too.

Nice work Alan! :), I may use this code a lil differently but it's definately extremely useful :)

memorex 09-29-2005 11:54 AM

Quote:

Originally Posted by Alan @ CIT
Good idea Hawkbizkit, I'll add usergroup permissions in the next release :)

Can't wait for the next release :banana:


All times are GMT. The time now is 02:45 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.01073 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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