CSS-HTML PROFILES!
HTML Enable Profiles:
Open BxBaseProfileView.php in templates/base/scripts/
In "function showBlockDescriptions( $sCaption )"
Find This:
Code:
{
$text = '<div class="discr">' .
'<div class="rss_item_header">' . process_text_output( $this -> _aProfile['Headline'] ) . '</div>' .
process_smiles( process_line_output( $this -> _aProfile['DescriptionMe'] ) ) .
'</div>';
echo DesignBoxContent( _t( $sCaption ), $text, 1 );
}
Replace it with this:
Code:
{
$text = '<div class="discr">' .
'<div class="rss_item_header">' . process_text_output( $this -> _aProfile['Headline'] ) . '</div>' .
trim (process_smiles( process_html_output( $this -> _aProfile['DescriptionMe'],255 ) ) ) .
'</div>';
echo DesignBoxContent( _t( $sCaption ), $text, 1 );
}
Now you will be able to add HTML in your Description Field on your User Profiles.
__________________________________________________ __________________________________
To add HTML in input fields
In "function showProfileFields( $aFields )" at the end of the page
Find This:
Code:
case 'c': // input box
$p_arr[$fname] = process_line_output( $p_arr[$fname] );
Replace with This:
Code:
case 'c': // input box
$p_arr[$fname] = trim (process_html_output( $p_arr[$fname],255 ));
Now the profile is html enabled. If we leave it as it is now you can
enter html and css codes in the description field but we don't want
this because some of the code used will be shown in the members
description of the members shown on the search page. So now we must
create a form field that will show users where to enter the codes.
Create your HTML Code Box:
(After you set this up you can adjust these settings).
1. Go to the admin panel and under MODS ADMIN select Profile Fields
2. Click the Add new field link
3. Under Field Type select MEMO
4. Under Add new field select At the beginning, I placed mine after Description Me...
5. Under Field Name enter HTMLCODES
6. Under Captions enter Custom HTML/CSS/Music/Video Codes
7. Under Visible to select Visitor, Member and Admin
8. Under Editable For select Admin and Member
9. Under Show on Page select View Profile Page and Edit Profile Page
10. Under Memo Rows enter 80
11. Under Memo columns enter 20
Make your new HTML field viewable in profile view:
IN file : /base/scripts/BxBaseProfileView.php
IN function : showBlockDescriptions( $sCaption )
Find This:
Code:
function showBlockDescriptions( $sCaption )
{
if( strlen( $this -> _aProfile['DescriptionMe'] ) )
{
$text = '<div class="discr">' .
'<div class="rss_item_header">' . process_text_output( $this -> _aProfile['Headline'] ) . '</div>' .
process_smiles( process_text_output( $this -> _aProfile['DescriptionMe'] ) ) .
'</div>';
echo DesignBoxContent( _t( $sCaption ), $text, 1 );
}
if( strlen( $this -> _aProfile['DescriptionYou'] ) )
{
$text = '<div class="discr">' . process_smiles( process_text_output( $this -> _aProfile['DescriptionYou'] ) ) . '</div>';
echo DesignBoxContent( _t( '_Ideal match description' ), $text, 1 );
}
Add This Afterwards:
Code:
// START ADDED CUSTOM FIELD MEMO TO SHOW IN PROFILE VIEW
if( strlen( $this -> _aProfile['HTMLCODES'] ) )
{
$text = '<div class="discr">' .trim (process_smiles( process_html_output( $this -> _aProfile['HTMLCODES'],255 ) ) ) . '</div>';
echo DesignBoxContent( _t( "Custom HTML/CSS/Music/Video Codes" ), $text, 1 );
}
// END ADDED CUSTOM FIELD MEMO TO SHOW IN PROFILE VIEW
Now you have a box in your Edit Profile, and On the Profiles themselves for the HTML/CSS Codes Enjoy..
Bookmarks