Adding a Php Function to a Certain Mod?

Started by żεχเ๏ภ, March 10, 2011, 02:35:49 AM

Previous topic - Next topic

żεχเ๏ภ

Before: http://i54.tinypic.com/2gson74.jpg

Proposed After: http://i53.tinypic.com/260y5js.jpg

SMF Version 1.1.xx

Hello all, I am a (very) inexperienced coder, I'm just wanting to know how to call a custom php function in a mod that's already been made.
The mod? Ultimate Profiles (See screenshots). I'm trying to add a new box that displays the post-count based group, and star images, or displays the member group and related image called "profile_badges".

The below is something my friend helped write, but it does not work and gives error since I have no idea how to call a php function :P No copyright infringement intended, credit is due where credit is due, etc. I just need advice on how to make this work like in my proposed *photoshopped* screenshot.

Code (UltimateProfile.template.php) Select
<?php
// Version: 0.9.1; UltimateProfile
// This file is a part of Ultimate Profile mod
// Author: Jovan Turanjanin


global $column_layout;


/*
Here's an easy way to customize the layout of your user's profiles.
Just arange these blocks to the positions you desire: top, left, right or bottom.
You'll need the basic knowledge of PHP syntax.

The blocks you can use are: summary, user_info, other_info, contact, buddies, pictures,
about_me, interests, media, write_comment, show_comments and profile_options.

Please backup UltimateProfile.template.php before changing this array!
*/
$column_layout = array(
'top' => array(
//'summary',
),
'left' => array(
'summary',
'user_info',
'contact',
'buddies',
),
'right' => array(
   'pictures',
'pictures',
'about_me',
'interests',
//'custom_fields',
'media',
'other_info',
),
'bottom' => array(
'profile_options',
'write_comment',
'show_comments',
),
);


//  Main template function.
function template_summary2() {
global $context, $settings, $options, $scripturl, $modSettings, $txt, $db_prefix, $column_layout;

// Output user's customization code.
if ($modSettings['profile_allow_customize'] == 1)
echo '
<!-- start of user\'s customization code -->
'
,
un_htmlspecialchars(@$context['member']['options']['css'])
, '
<!-- end of user\'s customization code -->

'
;
echo '
<div class="div1"></div>

'
;

// Top block position.
if (count($column_layout['top']) > 0) {
foreach ($column_layout['top'] as $block) {
if (function_exists('up_block_' . $block)) {
$value = call_user_func('up_block_' . $block);
if ($value != false) echo '<br />';
}
}
}

echo '
<div class="div2"></div>

<table border="0" cellpadding="4" cellspacing="1" align="center" id="profile_info" width="100%">
<tr>
<td width="50%" id="profile_left" valign="top">'
;

//  Left block position.
if (count($column_layout['left']) > 0) {
foreach ($column_layout['left'] as $block) {
if (function_exists('up_block_' . $block)) {
$value = call_user_func('up_block_' . $block);
if ($value != false) echo '<br />';
}
}
}

echo '
</td>'
;


echo '
<td width="50%" id="profile_right" valign="top">'
;

// Right block position.
if (count($column_layout['right']) > 0) {
foreach ($column_layout['right'] as $block) {
if (function_exists('up_block_' . $block)) {
$value = call_user_func('up_block_' . $block);
if ($value != false) echo '<br />';
}
}
}

echo '
</td>
</tr>
</table>

<div class="div3"></div>'
;

// Bottom block position.
if (count($column_layout['bottom']) > 0) {
foreach ($column_layout['bottom'] as $block) {
if (function_exists('up_block_' . $block)) {
$value = call_user_func('up_block_' . $block);
if ($value != false) echo '<br />';
}
}
}

echo '
<div class="div4"></div>'
;

}




function
up_block_summary() {
global $context, $settings, $txt, $modSettings;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="summary">
<tr>
<td class="titlebg" height="26" align="center">
<img src="'
, $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
'
, $txt['summary'], ' - ', $context['member']['name'], '
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td width="30%" align="center">
'
, $context['member']['avatar']['image'], '<br /><br />
<i>'
, $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" align="middle" />' : $context['member']['online']['text'], $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>
</td>
<td>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><b>'
, $txt[68], ': </b></td>
<td>'
, $context['member']['name'], '</td>
</tr>'
;
if (!empty($modSettings['titlesEnable']) && $context['member']['title'] != '') {
echo '
<tr>
<td><b>'
, $txt['title1'], ': </b></td>
<td>'
, $context['member']['title'], '</td>
</tr>'
;
}

echo '
<tr>
<td colspan="2" style="padding-bottom: 1em;"><i>'
, $context['member']['blurb'], '</i></td>
</tr>
<tr>
<td><b>'
, $txt[86], ': </b></td>
<td>'
, $context['member']['posts'], ' (', $context['member']['posts_per_day'], ' ', $txt['posts_per_day'], ')</td>
</tr>
<tr>
<td><b>'
, $txt[87], ': </b></td>
<td>'
, (!empty($context['member']['group']) ? $context['member']['group'] : $context['member']['post_group']), '</td>
</tr>'
;
if (isset($context['member']['action']) && allowedTo('who_view')) {
echo '<td><b>', $txt['current_activity'], ': </b></td>
<td>'
, $context['member']['action'], '</td>
</tr><tr>'
;
}
echo '</table>
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

return true;
}


function
up_block_user_info() {
global $context, $txt, $settings;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="info1">
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td><b>'
, $txt[231], ': </b></td>
<td>'
, $context['member']['gender']['image'] ,' ', $context['member']['gender']['name'], '</td>
</tr>
<tr>
<td><b>'
, $txt[420], ':</b></td>
<td>'
, $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/bdaycake.gif" width="40" alt="" />' : ''), '</td>
</tr>
<tr>
<td><b>'
, $txt[227], ':</b></td>
<td>'
, $context['member']['location'], '</td>
</tr>
<tr>
<td><b>'
, $txt[233], ': </b></td>
<td>'
, $context['member']['registered'], '</td>
</tr>
<tr>
<td><b>'
, $txt['lastLoggedIn'], ': </b></td>
<td>'
, $context['member']['last_login'], '</td>
</tr>
</table>
</td>
</tr>
</table>'
;

return true;
}


function
up_block_contact() {
global $context, $settings, $txt, $scripturl;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="contact">
<tr>
<td class="titlebg" height="26" align="center">
'
, $txt['profile_contact'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">'
;

// Can they add this member as a buddy?
if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'] && !$context['member']['is_buddy'] )
echo '
<tr>
<td colspan="2"><img src="'
, $settings['images_url'] ,'/icons/online.gif" alt="" /> <a href="', $scripturl, '?action=buddies;sa=add;u=', $context['member']['id'], ';sesc=', $context['session_id'], '" onclick="javascript:return confirm(\'', $txt['buddy_explanation']  ,'\')">[', $txt['buddy_add'], ']</a></td>
</tr>'
;

if (!$context['user']['is_owner'] && $context['can_send_pm'])
echo '
<tr>
<td colspan="2"><img src="'
, $settings['images_url'] ,'/icons/pm_read.gif" alt="" /> <a href="', $scripturl, '?action=pm;sa=send;u=', $context['member']['id'], '">', $txt[688], '.</a></td>
</td>'
;

if ((!empty($context['can_have_buddy']) && !$context['user']['is_owner']) || (!$context['user']['is_owner'] && $context['can_send_pm']))
echo '
<tr>
<td colspan="2">&nbsp;</td>
</tr>'
;

if ($context['member']['icq']['link_text'] != '')
echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/icq.gif" alt="', $txt[513], '" /></td>
<td valign="middle">'
, $context['member']['icq']['link_text'], '</td>
</tr>'
;

if ($context['member']['aim']['link_text'] != '')
echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/aim.gif" alt="', $txt[603], '" /></td>
<td valign="middle">'
, $context['member']['aim']['link_text'], '</td>
</tr>'
;

if ($context['member']['msn']['link_text'] != '')
echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/msntalk.gif" alt="', $txt['MSN'], '" /></td>
<td valign="middle">'
, $context['member']['msn']['link_text'], '</td>
</tr>'
;

if ($context['member']['yim']['link_text'] != '')
echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/yim.gif" alt="', $txt[604], '" /></td>
<td valign="middle">'
, $context['member']['yim']['link_text'], '</td>
</tr>'
;

echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/email_sm.gif" alt="', $txt[69], '" /></td>
<td valign="middle">'
;

// Only show the email address if it's not hidden.
if ($context['member']['email_public'])
echo '
<a href="mailto:'
, $context['member']['email'], '">', $context['member']['email'], '</a>';
// ... Or if the one looking at the profile is an admin they can see it anyway.
elseif (!$context['member']['hide_email'])
echo '
<i><a href="mailto:'
, $context['member']['email'], '">', $context['member']['email'], '</a></i>';
else
echo '
<i>'
, $txt[722], '</i>';

// Some more information.
echo '
</td>
</tr>'
;

if ($context['member']['website']['url'] !== '')
echo '
<tr>
<td><img src="'
, $settings['images_url'] ,'/www.gif" alt="', $txt[96], '" /></td>
<td><a href="'
, $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a></td>
</tr>'
;

echo '
</table>
</td>
</tr>
</table>'
;

return true;
}


function
up_block_other_info() {
global $context, $txt, $modSettings, $scripturl;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="info2">
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2" height="25">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout: fixed;">
<tr>
<td style="padding-bottom: 0.5ex;"><b>'
, $txt[85], ':</b></td>
</tr>
<tr>
<td colspan="2" width="100%" class="smalltext">
<div class="signature">'
, $context['member']['signature'], '</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>'
;

// Is this member requiring activation and/or banned?
if (!empty($context['activate_message']) || !empty($context['member']['bans'])) {
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>'
;

// If the person looking at the summary has permission, and the account isn't activated, give the viewer the ability to do it themselves.
if (!empty($context['activate_message']))
echo '
<tr>
<td colspan="2">
<span style="color: red;">'
, $context['activate_message'], '</span>&nbsp;(<a href="' . $scripturl . '?action=profile2;sa=activateAccount;userID=' . $context['member']['id'] . ';sesc=' . $context['session_id'] . '" ', ($context['activate_type'] == 4 ? 'onclick="return confirm(\'' . $txt['profileConfirm'] . '\');"' : ''), '>', $context['activate_link_text'], '</a>)
</td>
</tr>'
;

// If the current member is banned, show a message and possibly a link to the ban.
if (!empty($context['member']['bans'])) {
echo '
<tr>
<td colspan="2">
<span style="color: red;">'
, $txt['user_is_banned'], '</span>&nbsp;[<a href="#" onclick="document.getElementById(\'ban_info\').style.display = document.getElementById(\'ban_info\').style.display == \'none\' ? \'\' : \'none\';return false;">' . $txt['view_ban'] . '</a>]
</td>
</tr>
<tr id="ban_info" style="display: none;">
<td colspan="2">
<b>'
, $txt['user_banned_by_following'], ':</b>';

foreach ($context['member']['bans'] as $ban)
echo '
<br /><span class="smalltext">'
, $ban['explanation'], '</span>';

echo '
</td>
</tr>'
;
}
}

// If karma enabled show the members karma.
if ($modSettings['karmaMode'] == '1')
echo '
<tr>
<td><b>'
, $modSettings['karmaLabel'], ' </b></td>
<td>
'
, ($context['member']['karma']['good'] - $context['member']['karma']['bad']), '
</td>
</tr>'
;
elseif ($modSettings['karmaMode'] == '2')
echo '
<tr>
<td><b>'
, $modSettings['karmaLabel'], ' </b></td>
<td>
+'
, $context['member']['karma']['good'], '/-', $context['member']['karma']['bad'], '
</td>
</tr>'
;

// If the person looking is allowed, they can check the members IP address and hostname.
if ($context['can_see_ip']) {
echo '
<tr>
<td width="40%"><b>'
, $txt[512], ': </b></td>
<td>
<a href="'
, $scripturl, '?action=trackip;searchip=', $context['member']['ip'], '" target="_blank">', $context['member']['ip'], '</a>
</td>
</tr>
<tr>
<td width="40%"><b>'
, $txt['hostname'], ': </b></td>
<td width="55%">
<div title="'
, $context['member']['hostname'], '" style="width: 100%; overflow: hidden; font-style: italic;">', $context['member']['hostname'], '</div>
</td>
</tr>'
;
}

if (!empty($modSettings['userLanguage']))
echo '
<tr>
<td><b>'
, $txt['smf225'], ':</b></td>
<td>'
, $context['member']['language'], '</td>
</tr>'
;

echo '
<tr>
<td><b>'
, $txt['local_time'], ':</b></td>
<td>'
, $context['member']['local_time'], '</td>
</tr>
<tr>
<td colspan="2">
<br />
<a href="'
, $scripturl ,'?action=profile;u=', $context['member']['id'], ';sa=report">', $txt['profile_report_this'] ,'</a><br />
<br />
<a href="'
, $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">', $txt[460], ' ', $txt[461], '.</a><br />
<a href="'
, $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=statPanel">', $txt['statPanel_show'], '.</a><br />
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

return true;
}


function
up_block_buddies() {
global $modSettings, $scripturl, $context, $txt, $settings;

if (isset($modSettings['enable_buddylist']) && $modSettings['enable_buddylist'] == '1') {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="buddies">
<tr>
<td class="titlebg" height="26" align="center">
<a href="'
, $scripturl ,'?action=profile;u=', $context['member']['id'], ';sa=buddies">', $txt['profile_buddies'] ,'</a>
</td>
</tr>
<tr>
<td class="windowbg">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td colspan="2">
<table width="100%">'
;

if (isset($context['member']['buddies_data'])) {
$i = 1;
foreach ($context['member']['buddies_data'] as $buddy_id => $data) {
if ($i == 1)
echo '
<tr>'
;

echo '
<td align="center">
'
, $data['avatar_image'],'<br />
<a href="'
, $scripturl , '?action=profile;u=', $data['ID_MEMBER'] , '">' , $data['realName'] , '</a><br />
<i>'
, $settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/buddy_' . ($data['is_online'] ? 'useron' : 'useroff') . '.gif' . '" alt="' . $txt[$data['is_online'] ? 'online2' : 'online3'] . '" align="middle" />' : $txt[$data['is_online'] ? 'online2' : 'online3'], $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $txt[$data['is_online'] ? 'online2' : 'online3'] . '</span>' : '', '</i>
</td>'
;

if ($i == 3)
echo '
</tr>'
;

$i++;
if ($i == 4) $i = 1;
}
} else
echo '
<tr>
<td>'
, $txt['profile_buddies_no'] ,'</td>
</tr>'
;

echo '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>'
;

return true;
} else
return false;

}


function
up_block_pictures() {
global $modSettings, $context, $scripturl, $txt;

if ($modSettings['profile_enable_pictures'] == 1 && $context['can_view_pics']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="pictures">
<tr>
<td class="titlebg" height="26" align="center">
<a href="'
, $scripturl ,'?action=profile;u=', $context['member']['id'] ,';sa=pictures">', $txt['profile_badges'] ,'</a>
</td>
</tr>
<tr>
<td class="windowbg">
<table>'
;

// Show the member's primary group (like 'Administrator') if they have one.
if (isset($message['member']['group']) && $message['member']['group'] != '')
echo '
'
, $message['member']['group'], '<br />';



// Show the post group if and only if they have no other group or the option is on, and they are in a post group.
if ((empty($settings['hide_post_group']) || $message['member']['group'] == '') && $message['member']['post_group'] != '')
echo '
'
, $message['member']['post_group'], '<br />';
echo '
'
, $message['member']['group_stars'], '<br />';


} else
echo '
<tr>
<td>'
, $txt['profile_pictures_no'] ,'</td>
</tr>'
;

echo '
</table>
</td>
</tr>
</table>'
;

return true;
} else
return false;
}


function
up_block_pictures() {
global $modSettings, $context, $scripturl, $txt;

if ($modSettings['profile_enable_pictures'] == 1 && $context['can_view_pics']) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="pictures">
<tr>
<td class="titlebg" height="26" align="center">
<a href="'
, $scripturl ,'?action=profile;u=', $context['member']['id'] ,';sa=pictures">', $txt['profile_pictures'] ,'</a>
</td>
</tr>
<tr>
<td class="windowbg">
<table>'
;

if (!empty($context['pictures'])) {
$i = 1;

foreach ($context['pictures'] as $picture) {
if ($i == 1)
echo '
<tr>'
;

echo '
<td align="center" valign="top" style="clear: both;">
<a href="'
, $picture['url'] ,'"><img src="', $picture['thumb'] ,'" alt="" title="', $picture['title'], '" border="0" /></a>
</td>'
;

if ($i == 3)
echo '
</tr>'
;

$i++;
if ($i == 4) $i = 1;
}

} else
echo '
<tr>
<td>'
, $txt['profile_pictures_no'] ,'</td>
</tr>'
;

echo '
</table>
</td>
</tr>
</table>'
;

return true;
} else
return false;
}

function
up_block_about_me() {
global $txt, $context;

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="aboutme">
<tr>
<td class="titlebg" height="26" align="center">
'
, $txt['profile_about_me'] ,'
</td>
</tr>
<tr>
<td class="windowbg">'
;

if (!empty($context['member']['options']['about']))
echo '
'
, parse_bbc($context['member']['options']['about']);
else
echo '
'
, $txt['profile_about_no'];

echo '
</td>
</tr>
</table>'
;

return true;
}


function
up_block_interests() {
global $context, $txt;

if (!empty($context['member']['options']['interests'])) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="interests">
<tr>
<td class="titlebg" height="26" align="center">
'
, $txt['profile_interests'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
'
, parse_bbc($context['member']['options']['interests']) ,'
</td>
</tr>
</table>'
;

return true;
} else
return false;
}


function
up_block_media() {
global $modSettings, $context, $txt;

if (($modSettings['profile_allow_mediabox'] == 1) && (!empty($context['member']['options']['media']))) {
echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="media">
<tr>
<td class="titlebg" height="26" align="center">
'
, $txt['profile_media'] ,'
</td>
</tr>
<tr>
<td class="windowbg">
'
, un_htmlspecialchars($context['member']['options']['media']) ,'
</td>
</tr>
</table>'
;

return true;
} else
return false;
}


function
up_block_write_comment() {
global $txt, $context, $scripturl;

if (@$context['member']['options']['comments_disable'] != 1) {
echo '
<script type="text/javascript">
function comment() {
document.getElementById("comment").style.display = "block";
}
</script>

<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="65%" id="post_comments">
<tr>
<td class="titlebg"><a href="javascript:void(0);" onclick="comment()">'
, $txt['profile_comment_add'] ,'</a></td>
</tr>
<tr id="comment" class="windowbg" style="display: none;">
<td>
<form action="'
, $scripturl ,'?action=profile;u=', $context['member']['id'] ,';sa=comment;add" method="post">
'
, $txt['profile_comment'] ,':<br />
<textarea cols="80" rows="4" name="comment"></textarea><br />
<br />
<input type="submit" value="'
, $txt[10] ,'" />
<input type="hidden" name="sc" value="'
, $context['session_id'], '" />
</form>
</td>
</tr>
</table>'
;

return true;
} else
return false;
}


function
up_block_show_comments() {
global $context, $settings, $txt, $scripturl;

if (@$context['member']['options']['comments_disable'] != 1) {
echo '

<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="100%" id="comments">
<tr>
<td class="titlebg" colspan="2" align="center">'
, $txt['profile_comments'] ,'</td>
</tr>'
;

// Only show comments if they have made some!
if (!empty($context['comments'])) {
foreach ($context['comments'] as $comment) {
echo '
<tr>
<td class="windowbg" align="center" valign="top">
<b><a href="'
, $scripturl ,'?action=profile;u=', $comment['author']['ID_MEMBER'] ,'">', $comment['author']['realName'] ,'</a></b>
<div class="smalltext">
'
, $comment['author']['avatar'] ,'<br /><br />
<i>'
, $settings['use_image_buttons'] ? '<img src="' . $comment['author']['online']['image_href'] . '" alt="' . $comment['author']['online']['text'] . '" align="middle" />' : $comment['author']['online']['text'], $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $comment['author']['online']['text'] . '</span>' : '', '</i>
</div>
</td>
<td class="windowbg2" valign="top">
<table width="100%">
<tr>
<td><span class="smalltext">'
, $comment['time'] ,'</span><hr /></td>
</tr>
<tr>
<td>'
, $comment['body'] ,'</td>
</tr>
<tr>
<td align="right" valign="bottom" class="smalltext">'
;

if ($context['user']['is_owner'])
echo '
<a href="'
, $comment['reply'], '">', $txt['profile_comment_reply'] ,'</a>&nbsp;&nbsp;&nbsp; ';

if ($context['can_delete'])
echo '
<a onclick="javascript:return confirm(\''
, $txt['profile_comment_delete_confirm'], '\')" href="', $comment['delete'], '">', $txt['profile_comment_delete'] ,'</a>';

echo '
</td>
</tr>
</table>
</td>
</tr>'
;

}

} else
echo '
<tr class="windowbg2">
<td colspan="2">'
, $txt['profile_comment_no'] ,'</td>
</tr>'
;

echo '
</table>'
;

// Show more page numbers.
echo '
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor" align="center">
<tr>
<td colspan="3" class="catbg3">
'
, $txt[139], ': ', $context['page_index'], '
</td>
</tr>
</table>'
;

return true;
} else
return false;
}


function
up_block_profile_options() {
global $context;

if (!empty($context['profile_areas'])) {

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="profile_areas">
<tr>
<td class="windowbg2">
<table>
<tr>'
;

// Loop through every area, displaying its name as a header.
foreach ($context['profile_areas'] as $section) {
echo '
<td valign="top">
<table border="0" cellpadding="4" cellspacing="1">
<tr>
<td class="catbg">'
, $section['title'], '</td>
</tr>
<tr>
<td class="windowbg2 smalltext">'
;

// For every section of the area display it, and bold it if it's the current area.
foreach ($section['areas'] as $i => $area)
if ($i == $context['menu_item_selected'])
echo '
<b>'
, $area, '</b><br />';
else
echo '
'
, $area, '<br />';
echo '
<br />
</td>
</tr>
</table>
</td>'
;
}

echo '
</tr>
</table>
</td>
</tr>
</table>'
;

return true;
} else
return false;
}

function
up_block_custom_fields() {
// This section is optional. You can paste code and display fields from Custom Profile Fields mod.

echo '
<table border="0" cellpadding="4" cellspacing="1" class="bordercolor" width="100%" id="more_fields">
<tr>
<td class="windowbg">'
;

// PASTE YOUR CODE HERE

echo '
</td>
</tr>
</table>'
;

return true;
}

?>


I'd be very grateful for some help since this is the last thing I need to do before my forum is finally ready to officially open! Please be easy on my amateurish brain. XD Thank you for your time.  :)



Jason

żεχเ๏ภ

#1
Haha, solved it myself, after 30 minutes of experimenting it would appear I found the right combination! :D

Rough solution I found is attached below. Why? Why not.


Edit: I'm quite pleased with the final result!  :D  ;)

Advertisement: