PDA

View Full Version : no line break with a profilefield


GregorS
05-22-2004, 10:35 AM
Hi!

I adapt the template memberinfo and have a small problem with a profilefield (Biography) with the variable "userinfo[fieldX]"

i use it in a table and the variable make no line break

my code:


<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="500" align="center">
<tr>
<td class="thead" width="100">Name:</td>
<td class="custlisting">
<div align="center">$userinfo[field9]</div>
</td>
<td class="custlisting">
<div align="center">$userinfo[field10]</div>
</td>
</tr>
<tr>
<td class="thead" width="100">Beschreibung:</td>
<td width="300" colspan="2" class="custlisting">
<div align="left">$userinfo[field1]</div>
</td>
</tr>
</table>


any chance to fetch out the custom-fields with line breaks???

thaks!

SVTBlackLight01
08-12-2004, 09:50 PM
I am having the same problem. Anyone have an answer?

GregorS
08-13-2004, 02:35 PM
I am having the same problem. Anyone have an answer?

Hi!

I found the problem!

It is the "class" command!

Without you have no trouble! ;)

cu

SVTBlackLight01
08-14-2004, 05:47 AM
"class", as in: class="custlisting"

I'm using standard classes (alt1), and removing the class doesn't have an affect on the display. I don't know if it matters, but I am using custom profile fields.

GregorS
08-14-2004, 11:22 AM
"class", as is: class="custlisting"

I'm using standard classes (alt1), and removing the class doesn't have an affect on the display. I don't know if it matters, but I am using custom profile fields.

please post your code....

My code:


.....
<tr>
<td class="thead" height="100" valign="top">Beschreibung:</td>
<td bgcolor="#BBC7CE" height="100" valign="top" colspan="2">
<table cellpadding="3" border="0">
<tr>
<td>
<div align="left">$userinfo[field1]</div>
</td>
</tr>
</table>
</td>
</tr>
.....

SVTBlackLight01
08-18-2004, 10:19 PM
In this case I am using a separate table that contains all the info of the user fields.

It looks something like this:
<tr>
<td class="alt1" colspan="5">

<table border="0" cellpadding="10" cellspacing="0" width="100%">

<tr>
<td width="25%" rowspan="2" valign="top">
<if condition="$userinfo['field69']">
<strong><u>Current Modifications</u></strong><br />
$userinfo[field69]<br />
<br />
</if>

</tr>
</table>
</td>
</tr>

Here is an example of a how the fields are being displayed.

http://www.modernengineuity.com/fm/feature.html?u=38

SVTBlackLight01
08-28-2004, 02:37 PM
Anybody have any ideas on this?

GregorS
08-28-2004, 03:26 PM
Anybody have any ideas on this?


it look?s ok, what?s the problem???

filburt1
08-28-2004, 03:29 PM
If you mean the user typed a newline and it doesn't show up, that is because the \n character has no effect in HTML other than adding a space if there wasn't one there initally. Two solutions:

1. Use vB's BB code parsing functions to convert it to vB code, which interprets newline characters.
2. Use http://www.php.net/nl2br .

SVTBlackLight01
08-28-2004, 11:21 PM
filburt1,

I've tried the second method, but I must not be looking in the right file. Where would this need to be added?

SVTBlackLight01
09-21-2004, 02:45 AM
This has really got me stumped. :confused: