Post by jellobby on Mar 20, 2017 6:50:19 GMT -8
Howdy,
Let me preface this with I have no experience with javascript whatsoever. What I have managed to figure out has come from me just playing around with what was already there.I know, I'm great at setting myself up for failure x3
My question is regarding miniprofiles. I'm trying my hand at customizing one. You can find it here (general site link) or more specifically here (specific thread).
I've figured out how to add custom profile fields as demonstrated by the "APP," "PC," and "PLOT" links in the jello account's miniprofile.
What I'd like to do with the fourth little rectangle is to make it customizable for the members. Allow them to enter their own link and enter their own label, and that's will show up. For example, for the jello account, I currently have in it's custom fields "SHOP" for the label and then just a general link for the link itself. However... it's not showing up.
What I'm wondering is if that is even possible? I thought I could maybe achieve it by nesting {foreach} statements but it didn't work.
For reference, here are my codes:
html:
css:
and I just double-checked, I do have "Your Choice Link" and "Your Choice Name" in custom profile fields (in that order), and they are filled in with "http://" and "Shop" respectively.
Thank you in advance!
Let me preface this with I have no experience with javascript whatsoever. What I have managed to figure out has come from me just playing around with what was already there.
My question is regarding miniprofiles. I'm trying my hand at customizing one. You can find it here (general site link) or more specifically here (specific thread).
I've figured out how to add custom profile fields as demonstrated by the "APP," "PC," and "PLOT" links in the jello account's miniprofile.
What I'd like to do with the fourth little rectangle is to make it customizable for the members. Allow them to enter their own link and enter their own label, and that's will show up. For example, for the jello account, I currently have in it's custom fields "SHOP" for the label and then just a general link for the link itself. However... it's not showing up.
What I'm wondering is if that is even possible? I thought I could maybe achieve it by nesting {foreach} statements but it didn't work.
For reference, here are my codes:
html:
<div class="$[miniprofile_class]">
<div class="tfminimain">
{if $[user.avatar]}
<div class="tfminiavatar">$[user.avatar]</div><br />
{/if}
{if $[user.is_member]}
<div>played by
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "OOC Name"}
<span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.value]</span>
{/if}
{/foreach}
</div>
{if $[user.is_online]}
<span class="tfminionline">member is online</span>
{else}$[user.last_online]
{/if}
<div class="tfminiboxes">
<div class="tfminibox">
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "Application"}
<span class="$[user.mini_custom_field.content_class]"><a href="$[user.mini_custom_field.value]">APP</a></span>
{/if}
{/foreach}
</div>
<div class="tfminibox">
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "PC"}
<span class="$[user.mini_custom_field.content_class]"><a href="$[user.mini_custom_field.value]">PC</a></span>
{/if}
{/foreach}
</div>
<div class="tfminibox">
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "Plotter"}
<span class="$[user.mini_custom_field.content_class]"><a href="$[user.mini_custom_field.value]">PLOT</a></span>
{/if}
{/foreach}
</div>
<div class="tfminibox">
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "Your Choice Link"}
<span class="$[user.mini_custom_field.content_class]">
<a href="$[user.mini_custom_field.value]">
{foreach $[user.mini_custom_field]}
{if $[user.mini_custom_field.name] == "Your Choice Name"}
<span class="$[user.mini_custom_field.content_class]">$[user.mini_custom_field.value]"></span>
{/if}
{/foreach}
</a>
</span>
{/if}
{/foreach}
</div>
</div>
<br />$[user.posts] posts and <span class="money_symbol"></span><span class="money_amount"></span><span class="money_text" style="display:none;"></span>
{/if}
</div>
<div class="tfmininamebox">
$[user]<br />
{if $[user.is_guest]}Guest<br />{/if}
{if $[user.group]}
• $[user.group.name] •<br />
{/if}
</div>
</div>
css:
/* MINI PROFILE */
.tfminimain {
height: 300px;
text-align: center;
color: #FFFFD2;
}
.tfminiavatar {
margin: 0 auto;
width: 100px;
height: 100px;
padding-top: 10px;
padding-bottom: 5px;
}
.tfminiavatar img {
border: 5px solid #7F8186;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
max-width: 100px;
max-height: 100px;
}
.tfminionline {
font-style: italic;
font-size: 10px;
}
.tfminiboxes {
position: relative;
top: 5px;
}
.tfminibox {
background-color: #7F8186;
padding: 4px;
width: 100px;
border-radius: 2px;
margin: 0 auto;
margin-top: 3px;
height: 16px;
}
.tfminibox a:hover {
color: #FFFFD2 !important;
}
.tfmininamebox {
background-color: #7F8186;
height: 80px;
width: 190px;
text-align: center;
padding: 30px 5px 0px 5px;
color: #FFFFD2;
text-transform: uppercase;
font-size: 10px;
}
.tfmininamebox a {
font-size: 16px;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
text-shadow: 2px 2px 2px #000;
}
and I just double-checked, I do have "Your Choice Link" and "Your Choice Name" in custom profile fields (in that order), and they are filled in with "http://" and "Shop" respectively.
Thank you in advance!