inherit
163839
0
May 25, 2017 20:48:34 GMT -8
Maiden
1,020
February 2011
dreamaiden
|
Post by Maiden on Apr 30, 2013 8:41:27 GMT -8
Is this possible? It'd be great if members could put a second image in their profiles if they wanted to. So we're a RP site and people are putting pictures of the human character as their avatar, but it'd be neat if they could have their wing/craft/hold badge or dragon or pet as a second image. Ideally it would go above posts/gender and other custom profile fields. And the size would need to be restricted, especially width. Thanks for any help! solariaweyr.proboards.com
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 1, 2013 7:49:22 GMT -8
You can add a custom text field, restrict it to URL(Plain Text), add that field into the appropriate templates, and set the CSS to give it a max-height and max-width.
|
|
inherit
163839
0
May 25, 2017 20:48:34 GMT -8
Maiden
1,020
February 2011
dreamaiden
|
Post by Maiden on May 1, 2013 8:20:54 GMT -8
Hi Tim Camara, I put the direct link to the image in there and that just displayed the link for me? I hadn't tried adding the max-height and width yet.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 1, 2013 9:19:38 GMT -8
When you put it in the template, wrap it in an image tag, something like this:
<img src="$[CUSTOM_FIELD_TEMPLATE_VAR]" class="SOMETHING_TO_TARGET_FROM_CSS_LATER" />
|
|
inherit
163839
0
May 25, 2017 20:48:34 GMT -8
Maiden
1,020
February 2011
dreamaiden
|
Post by Maiden on May 1, 2013 10:27:34 GMT -8
So we're getting there solariaweyr.proboards.com/thread/7645/Look at the post by 'Niru' I have this {foreach $[user.mini_custom_field]} <span class="$[user.mini_custom_field.content_class]"><img src=$[user.mini_custom_field.value] class="secondimage"></span> {/foreach}
in my layout templates. I couldn't get it to work without the foreach bit but clearly I only want it for the test custom field and then conversly further down only for the writer custom field (or all custom fields except test) Any help with that? Thanks Tim Camara!
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 1, 2013 11:23:04 GMT -8
Wrap the line with the span in an if block checking for the right custom field name. Something like this:
{if $[user.mini_custom_field.name] == CUSTOM_FIELD_NAME_GOES_HERE}<span>.........</span>{/if}
You can also use elseif and else if you want to add more options in the same loop.
|
|
inherit
163839
0
May 25, 2017 20:48:34 GMT -8
Maiden
1,020
February 2011
dreamaiden
|
Post by Maiden on May 1, 2013 11:43:04 GMT -8
eeeeh wonderful! Thank you sooooo much! Tim Camara not only did this get done but I feel I've learnt more about those variables which can only help me in the future EDIT: Is there a way to do not equal too? I think I've asked this before but couldn't find it again :s
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on May 1, 2013 12:54:51 GMT -8
Happy to help
|
|