View Single Post
  #1  
Old 05-16-2006, 05:17 PM
|oR|Greg |oR|Greg is offline
 
Join Date: May 2003
Location: AMACNY.COM
Posts: 418
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default PM on Promtion...

I want this in the worst way and I want it to be done in the cleanest manner possible, so, here are my thoughts/wish list.
  • Inside each UserGroup an editbox that accepts HTML/BB Code. This box is where you write your "Welcome to: $UserGroupID" information. The purpose, is that each usergroup gets it's own FAQ via PM if you will, that an Admin sets based on what permissions and special "features", access levels, etc, etc a user gets being in this group.
  • Based on the code in ./includes/cron/promotion.php, when a new promotion passes, a PM is generated to the promoted user with the promoted usergroup information stored in the usergroup promotion field. If the field is left blank, then no PM is sent.

From my limited knowledge of scripting in Windows, and coding some with vB, this all seems completely possible. I've found various bits of code in the how-to's, but I'm completely baffled on where to start because I'm unfamiliar with the language that vB is written in. The logic eludes me.

It seems like this needs a custom hook to run, however, I read the how-to on custom hooks and it doesn't really apply because the promotion.php is run from a scheduled task, not a plugin. I'm not really sure how to add additional fields to a usergroup and then how to set them up to be unique. It seems like this would require adding an extra field or table to the database for storing the multiple PM's that could be sent, and again, I'm clueless how to do that. A select/case seems to be needed somewhere in the PHP I'm guessing because the promotion.php runs every minute, so if a new user is promoted then this hack needs to check to which usergroup, and as such, check the new field/table to make sure it's not empty, and if it isn't empty, to pull the custom PM info, and then send the PM to the user.

So far all I've found is how to automate sending a PM based on an existing hook. I'm pretty sure I'm over my head here... any help would be greatly appreciated.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01148 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete