Rohan
New User
Joined: 13 Jan 2010
Posts: 6
|
Posted: January 24th 2010, 2:00 pm Post subject: Profile blocks mod - profile disappeared! |
|
|
I tried to install the Profile Blocks mod and the profile.php?mode=viewprofile&u=# cuts off after the overall_header... so basically whenever looking at a profile page, it would only show the overall_header and cut off everything else beneath it.
I tried fiddling with the edits / throwing the backup file back on the profile.php and it didn't seem to be affected.
Help please? :\ Not sure where I would look first... this was the list of files to edit:
## Files To Edit: profile.php,
## admin/admin_board.php,
## admin/admin_users.php,
## includes/page_header.php,
## includes/usercp_viewprofile.php,
## language/lang_english/lang_admin.php,
## language/lang_english/lang_main.php,
## templates/subSilver/profile_view_body.tpl,
## templates/subSilver/admin/board_config_body.tpl,
## templates/subSilver/admin/user_edit_body.tpl
## Included Files: includes/usercp_pb.php,
## language/lang_english/lang_pb.php,
## templates/subSilver/profile_body.tpl,
## templates/subSilver/profile_pb.tpl
Edit: From uploading backup files one at a time, I think the problem is because of includes/usercp_viewprofile.php. This is the install code for the file, but I don't know php so I'm not sure if there are any errors.
| Code:
|
#
#-----[ OPEN ]-----------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]-----------------------------------------
#
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
exit;
}
#
#-----[ AFTER, ADD ]------------------------------------
#
//BEGIN UrW's profile block
$lang_pb_include = ( $userdata['session_logged_in'] )?$userdata['user_lang']:$lang_pb_include = $board_config['default_lang'];
require($phpbb_root_path.'language/lang_'.$lang_pb_include.'/lang_pb.'.$phpEx);
require($phpbb_root_path.'includes/bbcode.'.$phpEx);
if( !$userdata['session_logged_in'] )
{
header("Location: " . append_sid($phpbb_root_path . "login." . $phpEx . "?redirect=index.php"));
}
//END UrW's profile block
#
#-----[ FIND ]-----------------------------------------
#
$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
#
#-----[ BEFORE, ADD ]----------------------------------
#
//BEGIN UrW's profile block
//
// Decide if the profile block is shown or not.
//
$sql = 'SELECT pb_block, pb_allow FROM '.USERS_TABLE.' WHERE user_id='.$profiledata['user_id'];
if ( !$result=$db->sql_query($sql) )
{
message_die(GENERAL_ERROR,$pb_lang['sql_error'],$pb_lang['sql_error_title'],__LINE__,__FILE__,$sql);
}
$pb_info = $db->sql_fetchrow($result);
$show_pb = showAdd($profiledata['user_id'],$profiledata['user_rank']);
if ( $pb_info['pb_allow'] && $board_config['pb_use'] )
{
$message = $profiledata['pb_block'];
$message = bbencode_first_pass($message,'');
$message = smilies_pass(bbencode_second_pass($message, ''));
$message = str_replace("\n", "\n<br />\n", $message);
$message = make_clickable($message);
$message = stripslashes($message);
$template->assign_block_vars('switch_pb',array(
'PB_TITLE' => $profiledata['username'].'\'s '.$pb_lang['profile_block'],
'PB_BLOCK' => smilies_pass(bbencode_second_pass($message, ''))
)
);
}
//END UrW's profile block
|
|
|