![]() |
|
Mod Options |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||
Use User Profile Fields in AdminCP Emails
![]() Developer Last Online: Dec 2017 ![]() ![]() ![]() This modification is in the archives.
This is a very quick mod. This is my first release, so I appologize if I've missed any normal verbage or protocols.
I tried to make this simple, but I'm not the best at explaining things. Let me know if you have any questions and I'll do my best to help you out. This was requested here: http://www.vbulletin.org/forum/showthread.php?t=150947 This mod will allow you to insert your custom User Profile Fields into emails sent via AdminCP. I have not tested it, but this might work for other mods that use the email.php script in admincp. See below for the modification. You can also download the attached txt file if you wish. ** This mod requires that you edit a core file. If you upgrade, you will need to re-edit the file. ** In the following examples, I have created a field, field12, that holds 'Game Version'. This mod works best for text fields and single drop-down lists. Step 1: Noting Your Fields Go to your User Profile Fields and make note of which fields you want to use in your emails. Also make note of the field Name, seen to the left of Display Order (i.e. field12). Step 2: Editing File Open admin/email.php - make a backup just in case! Step 3: Pulling fields from database Around line 130, find
After add
Add additional ones if you have multiple fields you want to use in your emails. Your lines should look something like this:
Step 4: Naming the Variables In this step you will name the variables that you use in your email. Just like $username inserts the member's username, you will want to choose something easy to remember and short. I've chosen $gameversion. Around line 163, find
After '$userid' add the variable you want to use, including the dollar sign.
Your line 163 should look something like this:
Step 5: Linking field and variable Around line 164, find
After $user['userid'] add in $user['X'] where X is the field's name.
Your line 164 should look like this:
Step 6: Testing You DID make a backup copy, right? Good! Now, save and upload the email.php file, and send an email to yourself via AdminCP using your spiffy new variable!
Download Now Only licensed members can download files, Click Here for more information. Show Your Support
No members have liked this post.
|
Comments |
#2
|
|||
|
|||
Will be great if this was done via plugins...
No members have liked this post.
|
#3
|
|||
|
|||
Sorry, I don't know how to do that
![]() No members have liked this post.
|
#4
|
||||
|
||||
agree with you...................
No members have liked this post.
|
#5
|
||||
|
||||
This is a great idea.
![]()
__________________
No members have liked this post.
|
#6
|
|||
|
|||
Feel free to take a stab at it
![]() No members have liked this post.
|
#7
|
|||
|
|||
This mod still works for 3.7, although I haven't figured out how to add it to that section
![]() If you have upgraded and use this mod, please remember to re-edit your files! No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 06:52.