Page 1 of 1

Frontend User Directory image and pretty url questions

Posted: Wed Sep 10, 2008 5:59 pm
by marisafal
Hi there,
I have two questions regarding the UserDirectory module.  I have very limited php/smarty knowledge, so please bear with me.

1. I have on both my summary and detail template a profile image to display if one is uploaded.  Ideally, I'd like to set it so that if there is no image uploaded, then nothing appears.  What's happening is that the image doesn't display, but my 1px border, padding and margin I set for the img does still appear.  It looks as if it's trying to place the style around a 1px wide 30px high blank image.  See attached image.  This is the code that I'm wrapping the image in on the summary page:

Code: Select all

{if $entry.properties.profile_photo != ""}
<div class="avatar"><img src="{$entry.properties.profile_photo}" /></div>
{/if}
I use the same code code elsewhere and it hides the section I want to hide just fine.  But it doesn't seem to work here.  The default code had something that looks like this for the "if" statement:

Code: Select all

{if isset($entry.properties.profile_photo)}
but that didn't work for hiding empty fields (or the image).

I was going to nix trying to figure it out because I saw that I can use a default image (notfound.jpg) in the options tab, but alas when I upload an image with that name that doesn't seem to be working either.

Could anyone point me in the right direction?


2. Is there a way I can set the module to display pretty urls? 


I am running 1.41 Spring Garden
UserDirectory 1.0

Thank you!

Re: Frontend User Directory image and pretty url questions

Posted: Wed Sep 17, 2008 5:12 pm
by marisafal
Might anyone be able to help me?  :D