vForums Support > System Improvements :: Suggestions :: > Profile Field Positions

Profile Field Positions - Posted By ashkir (ashkir) on 24th Mar 11 at 9:13pm
I love profile fields here. But, for some longer ones such as text areas, etc. I'd like a way to exclude some fields from the miniprofile.

I think this can be done with a simple yes/no dropdown or radio choice for "Include in miniprofile?" and have the default be yes.

This is a bit annoying as you can see here:
Image

Re: Profile Field Positions - Posted By Marc (cr0w) on 25th Mar 11 at 12:51am
I believe this can already be done using the Custom Templates feature. {Smile}

Re: Profile Field Positions - Posted By ashkir (ashkir) on 26th Mar 11 at 5:44pm
How would I be able to do that Marc? I want to keep galleons, etc, but not that large textarea.

Re: Profile Field Positions - Posted By Marc (cr0w) on 26th Mar 11 at 8:49pm
 
How would I be able to do that Marc? I want to keep galleons, etc, but not that large textarea.


On the page where you edit the template, on the right side there should be a list of possible variables; scroll down until you see "Custom Profile Fields".

Find Galleons, Sickles, Knuts, etc. (all the ones you want to keep), then replace the line {additional_info} with the following:

Code:
 
  1. {custom_name_#}: {custom_value_#}<br />
  2. {custom_name_#}: {custom_value_#}<br />
  3. {custom_name_#}: {custom_value_#}<br />
 


Just remember to replace # with the ID of each field. {Smile}

Re: Profile Field Positions - Posted By ashkir (ashkir) on 26th Mar 11 at 9:13pm
Awesome! Thank you Marc! I'll try this out now! {Cheesy}

Re: Profile Field Positions - Posted By Marc (cr0w) on 26th Mar 11 at 9:38pm
 
Awesome! Thank you Marc! I'll try this out now! {Cheesy}


No worries, let me know how it goes. {Smile}

Re: Profile Field Positions - Posted By ashkir (ashkir) on 26th Mar 11 at 9:47pm
Posting the original code here so I don't lose it

Code:
 
  1. {foreach:custom_fields}
  2.         {custom_name}:<br />  {custom_value}<br />
 

Re: Profile Field Positions - Posted By ashkir (ashkir) on 26th Mar 11 at 9:54pm
Thanks Marc! It worked!!!

Re: Profile Field Positions - Posted By Marc (cr0w) on 27th Mar 11 at 12:08am
 
Thanks Marc! It worked!!!


No problem. {Smile}

Re: Profile Field Positions - Posted By ashkir (ashkir) on 1st Apr 11 at 7:01am
Hey Marc.

How about if I want to have a display field that's optional like this. My value is {custom_value_12}

I'd want to display this:

<b>Graduate of</b> {custom_value_12}


However, if it's not filled in, I don't want the "Graduate of blank" be here. How would I do that?

Re: Profile Field Positions - Posted By Ross (admin) on 1st Apr 11 at 8:54am
Should be:

{if:custom_value_12}
<b>Graduate of</b> {custom_value_12}
{/if}

Re: Profile Field Positions - Posted By ashkir (ashkir) on 2nd Apr 11 at 1:42am
Hi Ross.

Why on only one page: http://starsinsilence.com/profile/jake

Do the links show up as http://starsinsilence.com/profile/0 I even got this: http://starsinsilence.com/profile/%7Bcustom_value_12%7D

When I left the field blank? :|

My template code

Code:
 
  1. <font size="2">
  2.     <center>
  3.         {display_name}
  4.         <br />
  5.         <span title="{rank_name}">{rank_image}</span>
  6.  
  7.         {if:custom_value_14}<font size="1"><b>Graduate of</b> {custom_value_14}</font>{/if}
  8.         {if:warning}<br />{warning}{/if:warning}
  9.         {if:custom_title}<br />{custom_title}<br />{/if:custom_title}
  10.     </center>
  11.     {if:avatar}<center><br />{avatar}</center>{/if:avatar}
  12.     {if:personal_text}<center><br />{personal_text}</center>{/if:personal_text}
  13.     <br />
  14.     Posts: {posts}
  15.     <br />
  16.     {if:online}
  17.         Status: <b>Online</b>
  18.     {/if:online}
  19.     {ifnot:online}
  20.         Status: Offline
  21.     {/ifnot:online}
  22.     {if:gender}<br />Gender: {gender}{/if:gender}
  23.     {if:location}<br />Location: {location}{/if:location}
  24.     <br />
  25.     Joined: {joined}
  26.     <br />
  27.     <!-- custom fields -->
  28.     <table align="center" width="97%" class="desc"><tr><td align="left" width="100%"><center><b>MONEY</b></center><br />
  29.     {custom_name_7}: {custom_value_7}<br />
  30.     {custom_name_8}: {custom_value_8}<br />
  31.     {custom_name_9}: {custom_value_9}<br />
  32.     </td></tr></table>
  33.     <!-- end custom fields -->
  34.     <br />
  35.     <table cellpadding="0" cellspacing="0">
  36.         <tr>
  37.             <td colspan="2"><font size="2">Reputation: {reputation}  </font></td>
  38.         </tr>
  39.         <tr>
  40.             <td rowspan="2">
  41.                 <div style="clear: both;">
  42.     {foreach:reputation}
  43.                     <div style="height: 8px; width: 8px; background-color: #009900; float: left; margin: 3px;"></div>
  44.     {/foreach:reputation}
  45.     {foreach:negative_reputation}
  46.                     <div style="height: 8px; width: 8px; background-color: #CC0000; float: left; margin: 3px;"></div>
  47.     {/foreach:negative_reputation}
  48.                     <br style="clear: both;">
  49.                 </div>
  50.             </td>
  51.             <td align="center"><font size="1">{reputation_give}</font></td>
  52.         </tr>
  53.             <tr>
  54.             <td align="center"><font size="1">{reputation_take}</font></td>
  55.         </tr>
  56.     </table>
  57.     <br />
  58.     <center>
  59.     {foreach:contact}
  60.         <a href="{url}" class="mp_{id}"><span class="mp_contact">{id}</span></a>
  61.     {/foreach}<br />
  62. {if:custom_value_11}
  63. <a href="{custom_value_11}" class="mp_{id}"><span class="mp_contact" title="biography">bio</span></a>
  64. {/if}{if:custom_value_12}
  65. <a href="{custom_value_12}" class="mp_{id}"><span class="mp_contact" title="plot thread">plot</span></a>
  66. {/if}{if:custom_value_13}
  67. <a href="{custom_value_13}" class="mp_{id}"><span class="mp_contact" title="journal">journal</span></a>
  68. {/if}
  69.     </center>
  70. </font>
 


Edit: Since I couldn't get them to disappear by entering text, and then removing it. I jsut added this "javascript:alert('Not yet made');" to make an alert then. But sadly it has to be manually done.

Re: Profile Field Positions - Posted By ashkir (ashkir) on 2nd Apr 11 at 5:18am
I changed the code

Code:
 
  1. <font size="2">
  2.     <center>
  3.         {display_name}
  4.         <br />
  5.         <span title="{rank_name}">{rank_image}</span>
  6.  
  7.         {if:custom_value_14}<font size="1"><b>Graduate of</b> {custom_value_14}</font>{/if}
  8.         {if:warning}<br />{warning}{/if:warning}
  9.         {if:custom_title}<br />{custom_title}<br />{/if:custom_title}
  10.     </center>
  11.     {if:avatar}<center><br />{avatar}</center>{/if:avatar}
  12.     {if:personal_text}<center><br />{personal_text}</center>{/if:personal_text}
  13.     <br />
  14.     Posts: {posts}
  15.     <br />
  16.     {if:online}
  17.         Status: <b>Online</b>
  18.     {/if:online}
  19.     {ifnot:online}
  20.         Status: Offline
  21.     {/ifnot:online}
  22.     {if:gender}<br />Gender: {gender}{/if:gender}
  23.     {if:location}<br />Location: {location}{/if:location}
  24.     <br />
  25.     Joined: {joined}
  26.     <br />
  27.     <!-- custom fields -->
  28.     <table align="center" width="97%" class="desc"><tr><td align="left" width="100%"><center><b>MONEY</b></center><br />
  29.     {custom_name_7}: {custom_value_7}<br />
  30.     {custom_name_8}: {custom_value_8}<br />
  31.     {custom_name_9}: {custom_value_9}<br />
  32.     </td></tr></table>
  33.     <!-- end custom fields -->
  34.     <br />
  35.     <table cellpadding="0" cellspacing="0">
  36.         <tr>
  37.             <td colspan="2"><font size="2">Reputation: {reputation}  </font></td>
  38.         </tr>
  39.         <tr>
  40.             <td rowspan="2">
  41.                 <div style="clear: both;">
  42.     {foreach:reputation}
  43.                     <div style="height: 8px; width: 8px; background-color: #009900; float: left; margin: 3px;"></div>
  44.     {/foreach:reputation}
  45.     {foreach:negative_reputation}
  46.                     <div style="height: 8px; width: 8px; background-color: #CC0000; float: left; margin: 3px;"></div>
  47.     {/foreach:negative_reputation}
  48.                     <br style="clear: both;">
  49.                 </div>
  50.             </td>
  51.             <td align="center"><font size="1">{reputation_give}</font></td>
  52.         </tr>
  53.             <tr>
  54.             <td align="center"><font size="1">{reputation_take}</font></td>
  55.         </tr>
  56.     </table>
  57.     <br />
  58.     <center>
  59.     {foreach:contact}
  60.         <a href="{url}" class="mp_{id}"><span class="mp_contact">{id}</span></a>
  61.     {/foreach}<br />
  62. {if:custom_value_11}
  63. <a href="{custom_value_11}" class="mp_{id}"><span class="mp_contact" title="biography">bio</span></a>
  64. {/if}{ifnot:custom_value_11}{/ifnot:custom_value_11}{if:custom_value_12}
  65. <a href="{custom_value_12}" class="mp_{id}"><span class="mp_contact" title="plot thread">plot</span></a>
  66. {/if}{ifnot:custom_value_12}{/ifnot:custom_value_12}{if:custom_value_13}
  67. <a href="{custom_value_13}" class="mp_{id}"><span class="mp_contact" title="journal">journal</span></a>{/if}{ifnot:custom_value_13}{/ifnot:custom_value_13}
  68.     </center>
  69. </font>
 


And tried to remove the text from the field. It still automatically puts a "0" in it. And I cannot seem to remove it to make the entry disappear. bug?