Resource icon

Add pictures to member profile page based on user profile field selection

I've followed your method and it works great. I just can't get the correct width, even when I increase the max-width to 1000px it remains the same? I've set the max-height to 144px. Any ideas what I'm doing wrong? The width changes if I increase the height, but then I don't want the height to be more bigger than the size of my display pic. Can it be set so it auto changes to remain align with the display pic? As portrait pics will be longer.


View attachment 40239
I'm assuming the image you're using is actually just that wide (as displayed)
You'll need to set a min-width: 1000px; this will stretch it. max-width is only telling it how far it is allowed to go in the event a user enters an image that's about 3000px long.
FYI this will distort images. I personally suggest centering it or something else.

Oxy, did you manage to get the user upload function working?
Yes and no. I haven't gone back to I'm still not that great of a developer. I kind of pushed it aside. I set up a new table in the mysql database. Created a form with a page node that uploaded the user image to the database/chosen directory for these images, and from there the user would enter that URL into the field. THAT is the same as using an add-on like XFR albums... and just copy and pasting the URL.

What I intended to do but got discouraged was to have an upload options via the profile options somewhere and once they uploaded the image it replaces the profile banner... much like an avatar function. It's possible but I got put out after realizing just using the original author's method or an album would almost achieve the same result? *I also got lazy*

THEN there is the issue of what to do with unused images stocking up in the database. I have to have it overwrite the old files....
 
The image displays fine on my laptop using Chrome and Safari but when I browse my profile using a desktop or iPhone, the image goes off the page maybe by around 50px.

Is there a solution to this issue ? I know it's the screen resolutions which cause the image to go off.

Thanks.
 
The image displays fine on my laptop using Chrome and Safari but when I browse my profile using a desktop or iPhone, the image goes off the page maybe by around 50px.

Is there a solution to this issue ? I know it's the screen resolutions which cause the image to go off.

Thanks.
I disable it for mobile themes. I'm not sure what theme you're using.
 
Hello
Thank you for the tweak.

I am facing this issue
I might have done something wrong because the link to the pic is wrong and displayed like that :
http://www.domain.com/www/img/.jpg

Here is my config :

index.webp

index2.webp


Code used :


<xen:if is="{$user.customFields.header_pic}">
<img src="/www/img/{$user.customFields.header_pic}.jpg" />
</xen:if>

Thank you
 
Thank you

Try this:
Code:
<xen:if is="{$user.customFields.header_pic}">
<img src="www.domain.com/img/{$user.customFields.header_pic}.jpg" />
</xen:if>

You have to ensure that the path to your images is showing correctly. In the 'fix' I posted, it assumes that you have your domain and then a directory named "img" and then the image saved within that "img" directory.
 
Hello ArnyVee, thanks

same isssue, the image links to : (the name of the image does not appear)

http://www.domain.com/www/www.domain.com/www/img/.jpg

images path are correct
when i call : http://www.domain.com/www/img/image.jpg
image displays ok

looks like the system is not able to read {$user.customFields.header_pic} as a pic name



use the " http:// " to avoid the repetition

Code:
<xen:if is="{$user.customFields.header_pic}">
   <img src="http://domain.com/www/img/{$user.customFields.header_pic}.jpg" />
</xen:if>

for me i make the users enter there own header by putting the URL =)
 
Top Bottom