Hi,
I'd like to add/replace a current field with one where I can enter HTML.
When I tried it, it just displayed the code. How is it possible to get html to actually work in profile fields?
Cheers.
You cannot use html, but you can use bb code. To do this, you need to edit your profile.php, as below;
open profile.php, and find;
'group' => $user_data['group_name'],
'location' => $user_data['user_location'],
'interests' => $user_data['user_interests'],
'website' => make_clickable($user_data['user_website']),
'occupation' => $user_data['user_occupation'],
Change the field you want to use bb code like this example;
'interests' => bb_decode($user_data['user_interests']),
Tried that. It made the profile page not load up at all :( Any ideas?
Works for me. Sorry, no other ideas.
Quote from: Soong on June 30, 2004, 07:39:16 PM
Hi,
I'd like to add/replace a current field with one where I can enter HTML.
When I tried it, it just displayed the code. How is it possible to get html to actually work in profile fields?
Cheers.
What other details are you wanting to add??
It's html code to see if the person is online with Yahoo! Messenger.
Anyone got any ideas?
I tried putting that bbcode into my profiles.php page but it meant the page wouldn't load, regardless of whether anything was in the field or not.
What parts of the html code is dynamic, what is static? You could hack this easily, please post some sample html code and highlight the stuff that changes, depending on the users (the yahoo id presumably).
GauGau
Here is the code, I'm not really sure what any of it does, just that it shows an appropriate image, depending on if the user is online or not.
<image src="http://opi.yahoo.com/online?u=NAME">
<a href="http://edit.yahoo.com/config/send_webmesg?.target=NAME&.src=pg"><img border="0" src="http://opi.yahoo.com/online?u=NAME&m=g&t=2"></a>
you should get a yahoo account to be able to test this...
GauGau
Yep, have done. The name's can_anybody_fly_this_thing on Yahoo! Messenger.
It works if I just put that html in a page and publish it, no problems there.
It's just when I try enabling BBCode on profile pages that I get trouble. The profile pages themselves won't load up at all, just a blank screen.
can't test this, as I'm not at my desk at the moment, but you could edit profile.php, find case 'text' :
if ($form_data[$element[1]] == '') break;
echo <<<EOT
<tr>
<td width="40%" class="tableb" height="25">
{$element[2]}
</td>
<td width="60%" class="tableb">
{$form_data[$element[1]]}
</td>
</tr>
EOT;
and add a switch (if/then) before the echo statement that will make a difference if e.g. the "occupation" filed is being displayed, if yes, add the surounding html code as a wrapper around {$form_data[$element[1]]}.
GauGau
Sorry, I'm not too hot when it comes to html/php to be honest.
You lost me at "add a switch"
:(