Login     Sign up
Moving "Custom Fields" on About Me over The Status Update Box
Thomas Ramsey (@theartistconnect)
Join date: Oct 27th 2010
Community posts: 38
View Profile
Send Message

I am looking to move the "custom fields" in about me (created in the admin CP) of the status box of a user's main profile page. JCOW 4.2 is the version I am using.

I have tried coding it but I cannot get it to work.

I need help ASAP, this is an urgent matter!

164 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

a basic example

file: includes\libs\pages.inc.php

function index

look for this line

[code]
$config['theme'] = 'themes/default/profile.tpl.php';
[/code]

add this below

[code]
// custom fields
for($i=1;$i<=7;$i++) {
$col = 'var'.$i;
$key = 'cf_var'.$i;
$key2 = 'cf_var_value'.$i;
$key3 = 'cf_var_des'.$i;
$key4 = 'cf_var_label'.$i;
$type = get_gvar($key);
$value = get_gvar($key2);
$des = get_gvar($key3);
$label = get_gvar($key4);
if ($type != 'disabled' && strlen($owner[$col])) {
$output .= '
<dt>'.$label.'</dt>
<dd>'.htmlspecialchars($owner[$col]).'</dd>
';
}
}
[/code]

below that

change
[code]
if (!$page['no_comment']) {
$output = stream_form($profile['id'],$owner['page']);
}
[/code]

to
[code]
if (!$page['no_comment']) {
$output .= stream_form($profile['id'],$owner['page']);
}
[/code]

164 months ago