Post by Tiffy-Bean on Jan 16, 2017 20:18:56 GMT -8
This is how it looks on my forum:
Layout Templates >> User Profile
Place
Add this:
For each section of cards use this line of code:
Close everything with
Add at the bottom of your User Profile template
Now for gifting it, the names of the trophy need to be added to user custom profile fields. Make them and select drop down selection. Just set it up as "gift trophy" as an option and in each user profile, you can go through and gift them which ever ones they've earned.
Layout Templates >> User Profile
Place
<a class="button" style="height:22px; margin-top:1px; margin-left:-1px;" href="/user/$[user.id]/awards" id="awards" role="button">Cards</a>
where you want the tab to appear.Add this:
<div class="extra-tab-content" style="display: none; height: relative; padding-bottom:10px; padding-top:10px; width:100%" align="center">
For each section of cards use this line of code:
{foreach $[user.custom_field]}
{if $[user.custom_field.name] == "NAME OF TROPHY"}
<p style="float: left; font-size: 9pt; text-align: center; width: 20%; margin-right: 2%; margin-bottom: 0.5em; box-shadow: 10px 10px 5px #000; border: black 2px solid;"><img src="IMAGE URL LINK" style="width: 100%;">You've collected <br><b>NAME OF CARD</b>!<br></p>
{elseif $[user.custom_field.name] == "NAME OF SECOND TROPHY"}<p style="float: left; font-size: 9pt; text-align: center; width: 20%; margin-right: 2%; margin-bottom: 0.5em; box-shadow: 10px 10px 5px #000; border: black 2px solid;"><img src="IMAGE URL LINK" style="width: 100%;">You've collected <br><b>NAME OF CARD</b>!</p>
{elseif $[user.custom_field.name] == "NAME OF THIRD TROPHY"}<p style="float: left; font-size: 9pt; text-align: center; width: 20%; margin-right: 2%; margin-bottom: 0.5em; box-shadow: 10px 10px 5px #000; border: black 2px solid;"><img src="IMAGE URL LINK" style="width: 100%;">You've collected <br><b>NAME OF CARD</b>!<br></p>
{elseif $[user.custom_field.name] == "NAME OF FOURTH TROPHY"}<p style="float: left; font-size: 9pt; text-align: center; width: 20%; margin-right: 2%; margin-bottom: 0.5em; box-shadow: 10px 10px 5px #000; border: goldenrod 2px solid;"><img src="IMAGE URL LINK" style="width: 100%;">You've collected <br><b>NAME OF CARD</b>!</p>{/if}
{/foreach} <p style="clear: both;">
Close everything with
</div>
Add at the bottom of your User Profile template
</script>
<script type="text/javascript">
if(pb.data('route').name == "user"){
if(location.pathname.match('/user/'+pb.data('page').member.id+'/awards')){
$('.original-tab-content, .extra-tab-content').toggle();
}
}
</script>
Now for gifting it, the names of the trophy need to be added to user custom profile fields. Make them and select drop down selection. Just set it up as "gift trophy" as an option and in each user profile, you can go through and gift them which ever ones they've earned.