Any way change to a different style even if that style is not defined in the database, but you know that it exists locally.
HERE's The code im working with
Code: Select all
define('IN_PHPBB', true);
$phpbb_root_path = './foro/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.'.$phpEx);
include('site_common.'.$phpEx); // site common definitions
// Start session management
$user->start();
$auth->acl($user->data);
$user->setup();
// get passed variables
$artist_url_name = request_var('artist', '');
$page_id = request_var('page', '');
// redirect back to the main page if no artist is picked
if (!$artist_url_name) {
trigger_error('Direct Access to this file is not allowed');
}
// Grab the artists information
$sql = 'SELECT *
FROM ' . ARTIST_TABLE . "
WHERE url_name = '" . $artist_url_name . '\'';
$result = $db->sql_query($sql);
// store the info into an array or display an error that artist does not exists
if ($artist = $db->sql_fetchrow($result)) {
$db->sql_freeresult($result);
} else {
trigger_error('That artist does not exists');
}
// CHANGING TEMPLATES IN HERE
// set some default artist template values
$template->assign_vars(array(
'A_DISPLAY_NAME' => $artist['display_name'],
'A_SLOGAN' => $artist['slogan'],
'A_URL_NAME' => $artist_url_name,
'A_DISPLAY_NAME' => $artist['display_name'],
'A_LOCATION' => $artist['location'],
'A_CITY' => $artist['city'])
);
// display the tabs
$tabs = array(
// page_id, display_name, link
array('', 'Pagina', '/'.$artist_url_name),
array('musica', 'Musica', '/'.$artist_url_name.'/musica'),
array('fotos', 'Fotos', '/'.$artist_url_name.'/fotos'),
array('contacto', 'Contacto', '/'.$artist_url_name.'/contacto')
);
// process each tab
foreach($tabs as $tab)
{
// send each tab's information to the template
$template->assign_block_vars('tab', array(
'TAB_CLASS' => ($tab[0] == $page_id) ? 'tab_sel' : 'tab',
'TAB_TEXT' => $tab[1],
'TAB_LINK' => $tab[2])
);
}
unset($tabs); // not needed anymore, save some memeory
// get the information for the page we are in
switch ($page_id):
case "musica":
$page_template = 'artist_templates/' . $artist['page_style'] . '_music.htm';
break;
default:
$page_template = 'site_home_page.htm';
endswitch;
// Let the templates know that we are in the site, and not the forum
$template->assign_var('IN_SITE', true);
// Output page
page_header($artist['artist_display_name']);
$template->set_filenames(array(
'body' => $page_template)
);
page_footer();
$user->setup(); but apperently not.
NOT ASKING FOR SUPPORT ON PHPBB, SIMPLY SUGGESTION ON HOW YOU GUYS THINK I COULD GO ABOUT DOING THIS