Jump to content

DrMath

Clients
  • Posts

    11
  • Joined

  • Last visited

Reputation Activity

  1. Like
    DrMath got a reaction from Michael.J in Auto Welcome Support   
    I have validated that this is working.
  2. Like
    DrMath got a reaction from Michael.J in Auto Welcome Support   
    In your IPS root, go into "applications/autowelcome/sources/Alerts/". In it is a file called "Alerts.php" Edit this file.
    Find 
    protected static function returnTagValues( $member=NULL, $topic=NULL ) In this, you will see the current values you can used defined. Before the "Topic tag" section, add your own values. This requires some knowledge of the $member functionality which you can find here: https://invisionpower.com/4docs/advanced-usage/development/working-with-members-r179/
    If you have custom profile fields, you will need to use the $member->profileFields() getter. This creates an array of all of your custom profile fields. An easy way to get see how yours is structured is to create a page and display this for yourself. Create a page using as an HTML page then use the following code to see the array:
    {{ $member = \IPS\Member::loggedIn(); }} {{ var_dump($member->profileFields()); exit; }} Each "section" you have defined with have its own array, so to get these you will have to define variables as a multidimensional array. An example of mine are below:
    /* Get Profile Fields for Custom Tags */ $profile_fields = $member->profileFields(); /* Custom Tags */ $tags['%region%'] = $profile_fields['core_pfieldgroups_1']['core_pfield_11']; $tags['%discord_un%'] = $profile_fields['core_pfieldgroups_1']['core_pfield_38']; $tags['%main_game%'] = $profile_fields['core_pfieldgroups_3']['core_pfield_12']; $tags['%battle_tag%'] = $profile_fields['core_pfieldgroups_4']['core_pfield_4']; These will not show up in the list in the ACP, but you will be able to then use them in your welcome messages and code.  If the author does not want this posted, I will remove it upon request. Hope this helps some people!
    Side question, @Mike John, is it possible to change when the messages are sent? For example, we have two-step registration, email confirmation then admin approval. We'd like to send the message/post the thread before the admin approves if possible. Thanks!
×
×
  • Create New...