vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   PM on Promtion... (https://vborg.vbsupport.ru/showthread.php?t=115775)

|oR|Greg 05-16-2006 05:17 PM

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.

Marco van Herwaarden 05-17-2006 11:29 AM

Moved to Modification Questions.

There are no hooks available on includes/cron/promotion.php.

This means that you will either need to edit that file to add sendig the PM.
It might also be possible to use an existing hook in the user-datamanager to handle change of usergroups.


All times are GMT. The time now is 01:19 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.00893 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete