[Modification] Add Email Validation button to User Profile
Jan 16, 2021 9:54:38 GMT -8
reddragons likes this
Post by Retread on Jan 16, 2021 9:54:38 GMT -8
Caution:
Before modifying any layout template, copy and paste the existing contents to a notepad file!
Add Email Validation button to the User Profile.
What it does: Clicking the button will open a new tab to www.ipqualityscore.com/free-email-validation-test/ with the member's email address appended to the URL. This will inform you of several characteristics, including whether or not the email service is Disposable/Temporary.
Since this information should be available only on a need-to-know basis, a conditional is employed in the modification so that only members of groups with (any) access to the Admin panel will see the button.
Method 1: (starting with a Proboards-stock User Profile [Summary] layout template:
From your Admin panel, navigate:
Admin Home> Themes> Layout Templates
In the dropdown to the right of Current Theme, select the desired theme.
Click on User Profile (a new page appears).
Click on the Summary tab.
Click anywhere within the textarea, Select All, then Copy the contents to your clipboard.
Open a Notepad file and paste the contents of your clipboard there. Save the Notepad file.
Replace the current contents of the template with this:
$[form.header]
<table>
<tr>
<td id="center-column">
{if $[can.update_status]}
<div class="content-box center-col">
<table>
<tr>
<td class="status-input">
$[form.update.input]
</td>
<td class="status-submit">
$[form.submit.button]
</td>
</tr>
</table>
</div>
{/if}
{if $[user.warning.bar]}
<div class="content-box center-col">
<table><tr><td class="warning-table-td">Warning Level: </td><td>$[user.warning.bar]</td></tr></table>
</div>
{/if}
{if $[user.badges]}
<div class="content-box center-col $[user.badges_container_class]">
{foreach $[user.badges]}$[user.badges]{/foreach}
$[user.gift_link]
</div>
{/if}
<div class="content-box center-col">
<table>
<tr>
<td class="headings">Latest Status:</td>
<td>$[user.personal_text]</td>
</tr>
{if $[user.custom_title]}
<tr>
<td class="headings">Custom Title:</td>
<td>$[user.custom_title]</td>
</tr>
{/if}
{if $[user.email]}
<tr>
<td class="headings">Email:</td>
<td>$[user.email] {if $[current_user.can_admin]}<a class="button" href="https://www.ipqualityscore.com/free-email-validation-test/lookup/$[user.email]" target="_blank">Email Validation</a>{/if}</td>
</tr>
{/if}
{if $[user.website]}
<tr>
<td class="headings">Web Site:</td>
<td>$[user.website]</td>
</tr>
{/if}
{if $[user.birthday]}
<tr>
<td class="headings">Birthday:</td>
<td>$[user.birthday]</td>
</tr>
{/if}
{if $[user.age]}
<tr>
<td class="headings">Age:</td>
<td>$[user.age]</td>
</tr>
{/if}
{if $[user.gender]}
<tr>
<td class="headings">Gender:</td>
<td>$[user.gender.text]</td>
</tr>
{/if}
{if $[user.location]}
<tr>
<td class="headings">Location:</td>
<td>$[user.location]</td>
</tr>
{/if}
<tr>
<td class="headings">Posts:</td>
<td>$[user.posts]</td>
</tr>
<tr>
<td class="headings">Date Registered:</td>
<td>$[user.registered_on]</td>
</tr>
{foreach $[user.custom_field]}
<tr class="$[user.custom_field.content_class]">
<td class="headings">
$[user.custom_field.name]:
</td>
<td>
$[user.custom_field.value]
</td>
</tr>
{/foreach}
</table>
</div>
{if $[user.social_exists]}
<div class="content-box center-col">
{if $[user.social_network]}
<div class="social networks">
<h4>Social Networks</h4>
{foreach $[user.social_network]}
$[user.social_network]<br />
{/foreach}
</div>
{/if}
{if $[user.instant_messenger]}
<div class="social messengers">
<h4>Instant Messengers</h4>
{foreach $[user.instant_messenger]}
$[user.instant_messenger]<br />
{/foreach}
</div>
{/if}
</div>
{/if}
<div class="content-box center-col">
$[recent_posts_link]<br />
$[recent_threads_created_link]
</div>
{if $[user.signature]}
<div class="content-box center-col">
Signature <hr />
$[user.signature]
</div>
{/if}
</td>
<td id="right-column">
{if $[following]}
<div id="following" class="content-box right-col">
<h4>$[view_following_link]</h4>
{foreach $[following]}
<div class="mini-user">
<div class="mini-avatar">
$[following.avatar_medium]
</div>
<span class="name">
$[following]
</span>
</div>
{/foreach}
</div>
{/if}
{if $[follower]}
<div id="followers" class="content-box right-col">
<h4>$[view_followers_link]</h4>
{foreach $[follower]}
<div class="mini-user">
<div class="mini-avatar">
$[follower.avatar_medium]
</div>
<span class="name">
$[follower]
</span>
</div>
{/foreach}
</div>
{/if}
</td>
</tr>
</table>
$[form.footer]
Click the Save Changes button at the bottom of the page or the Save Theme button near the top.
Method 2: (starting with a modified User Profile [Summary] layout template:
From your Admin panel, navigate:
Admin Home> Themes> Layout Templates
In the dropdown to the right of Current Theme, select the desired theme.
Click on User Profile (a new page appears).
Click on the Summary tab.
Click anywhere within the textarea, Select All, then Copy the contents to your clipboard.
Open a Notepad file and paste the contents of your clipboard there. Save the Notepad file.
Find the line that looks exactly like this:
<td>$[user.email]</td>
Replace that line with this:
<td>$[user.email] {if $[current_user.can_admin]}<a class="button" href="https://www.ipqualityscore.com/free-email-validation-test/lookup/$[user.email]" target="_blank">Email Validation</a>{/if}</td>
Click the Save Changes button at the bottom of the page or the Save Theme button near the top.