Hi,
I recently installed your theme onto my bb, but i am also using the Profile Control Panel hack by Ptirhiik which can be downloaded from
http://www.phpbbhacks.com/viewhack.php?id=1477
The PCP hack works fine on my forum with subsilver and a couple of other templates also, but when i try and set the forum to use the darkness theme, it just reverts back to subsilver.
I have noted that it seems to be the functions.php page that is causing the error as when i remove the code that the hack from that page only (leaving all the other pages hacked), the darkness theme loads fine, but obviously the PCP hack does not.
I was wondering if anyone had any idea why the PCP hack seems to not like working with the darkeness theme?
Below is an extract from the pcp install for functions.php
[code:1:3cef794c89]
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- mod : mods settings ---------------------------------------------------------------------------
//-- mod : profile cp ------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
if ( !empty($userdata['user_lang']))
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
global $admin_level, $level_prior, $level_desc;
global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields;
global $list_yes_no;
include_once( $phpbb_root_path . './profilcp/functions_profile.' . $phpEx);
//-- fin mod : profile cp --------------------------------------------------------------------------
//-- mod : mods settings ---------------------------------------------------------------------------
//-- add
global $db, $mods, $userdata;
// get all the mods settings
$dir = @opendir($phpbb_root_path . 'includes/mods_settings');
while( $file = @readdir($dir) )
{
if( preg_match("/^mod_.*?\." . $phpEx . "$/", $file) )
{
include_once($phpbb_root_path . 'includes/mods_settings/' . $file);
}
}
@closedir($dir);
//-- fin mod : mods settings -----------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
//
// Set up style
//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
static $translate;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
global $userdata, $db;
if ( !isset($board_config['summer_time']) )
{
$board_config['summer_time'] = false;
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name,config_value) VALUES('summer_time','0')";
if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not add key summer_time in config table', '', __LINE__, __FILE__, $sql);
}
$switch_summer_time = ( $userdata['user_summer_time'] && $board_config['summer_time'] ) ? true : false;
if ($switch_summer_time) $tz++;
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
// here we added
// , $start_field='start'
//-- modify
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, $add_prevnext_text = TRUE
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, $start_field='start'
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages;
for($i = 1; $i < $init_page_max + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
#
#-----[ REPLACE WITH ]----------------------------------------
#
$init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages;
for($i = 1; $i < $init_page_max + 1; $i++)
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;$start_field=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++)
{
$page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
#
#-----[ REPLACE WITH ]----------------------------------------
#
for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++)
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;$start_field=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
for($i = $total_pages - 2; $i < $total_pages + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
#
#-----[ REPLACE WITH ]----------------------------------------
#
for($i = $total_pages - 2; $i < $total_pages + 1; $i++)
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;$start_field=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
else
{
for($i = 1; $i < $total_pages + 1; $i++)
{
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
#
#-----[ REPLACE WITH ]----------------------------------------
#
else
{
for($i = 1; $i < $total_pages + 1; $i++)
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . append_sid($base_url . "&amp;$start_field=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if ( $on_page > 1 )
{
$page_string = ' <a href="' . append_sid($base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&nbsp;&nbsp;' . $page_string;
#
#-----[ REPLACE WITH ]----------------------------------------
#
if ( $on_page > 1 )
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string = ' <a href="' . append_sid($base_url . "&amp;$start_field=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a>&nbsp;&nbsp;' . $page_string;
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if ( $on_page < $total_pages )
{
$page_string .= '&nbsp;&nbsp;<a href="' . append_sid($base_url . "&amp;start=" . ( $on_page * $per_page ) ) . '">' . $lang['Next'] . '</a>';
#
#-----[ REPLACE WITH ]----------------------------------------
#
if ( $on_page < $total_pages )
{
//-- mod : profile cp ------------------------------------------------------------------------------
// here we replaced
// start
// with
// $start_field
//-- modify
$page_string .= '&nbsp;&nbsp;<a href="' . append_sid($base_url . "&amp;$start_field=" . ( $on_page * $per_page ) ) . '">' . $lang['Next'] . '</a>';
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
global $starttime;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
global $admin_level, $level_prior;
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
}
if ( empty($template) )
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
global $user_ip, $session_length, $starttime;
global $userdata;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
global $admin_level, $level_prior;
//-- fin mod : profile cp --------------------------------------------------------------------------
[/code:1:3cef794c89]
Thanx for reading and all help/ideas are greatly appreciated.