One theme as one page only

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
Mr_makaveli
Registered User
Posts: 1159
Joined: Sun Oct 26, 2008 3:34 pm

One theme as one page only

Post by Mr_makaveli »

Ok this one may or may not be possible so bare with me

For my arcade found at

http://www.tgzforum.com

I would like to use this

http://www.phpbb.com/styles/demo/3.0/?style_id=215

But i want to stick with the dirty board style found here http://www.tgzforum.com/index.php for my Community

Is it possible to use only one style for the arcade.php and one style for the community index.php

Thanks in advance

EDITED POST

Users should not be able to switch between styles, so it remains fixed for all users!
www.tgzforum.com, a new forum for all types of people
User avatar
Rahber
Former Team Member
Posts: 2720
Joined: Tue Feb 12, 2008 3:39 pm
Location: Pakistan
Name: Rahber
Contact:

Re: One theme as one page only

Post by Rahber »

i guess its possible but it will take a huge time

and then it would require alot of edits
like you have to create a new overall footer and overall header(with some other names ),and provide direct link to new theme style sheet to it, and then will have to edit the theme of new style and manually provide the link to images and resources it use as generally they use template path and theme and image set path , but as you will be using dirty board as main theme so if they use template path they gonna get url of dirty-board template and themes
so it will be along journey doing so
and if you still want so and know little html and css .. post back and i will tell you the rest of procedure
Mr_makaveli
Registered User
Posts: 1159
Joined: Sun Oct 26, 2008 3:34 pm

Re: One theme as one page only

Post by Mr_makaveli »

Half way there - links and images are easy enough to change, this is arcade.php

Code: Select all

<?php
/**
*
* @package arcade
* @version $Id: arcade.php 765 2009-03-27 22:35:30Z JRSweets $
* @copyright (c) 2008 http://www.JeffRusso.net
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

// We use this to display the flash and image files for the game.  This is to hide the acutal path from the end user.
// However this will not work with IBProV3 or IBPro arcadelib games so the real path must be used for the flash file for those type of games.
if (isset($_GET['swf']) || isset($_GET['img']))
{
	require($phpbb_root_path . 'includes/arcade/arcade_protect.' . $phpEx);
}

// implicit else: we are not in swf or img mode
include($phpbb_root_path . 'common.' . $phpEx);

// Handling of V3arcade games
// Only accept the var if its a POST
$v3arcade = (isset($_POST['sessdo'])) ? request_var('sessdo', '') : '';
if (!empty($v3arcade))
{
	require($phpbb_root_path . 'includes/arcade/scoretype/v3arcade.'.$phpEx);
}
// End Handling of V3arcade games

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

include($phpbb_root_path . 'includes/arcade/arcade_common.' . $phpEx);
// Initialize arcade auth
$auth_arcade->acl($user->data);
// Initialize arcade class
$arcade = new arcade();

// Is arcade disabled and user not an admin?
if ($arcade->config['arcade_disable'] && !$auth->acl_get('a_'))
{
	header('HTTP/1.1 503 Service Unavailable');

	$message = (!empty($arcade->config['arcade_disable_msg'])) ? $arcade->config['arcade_disable_msg'] : 'ARCADE_DISABLE';
	trigger_error($message);
}

// Get the varibles we will use to build the arcade pages
$mode = request_var('mode', '');
$cat_id	= request_var('c', 0);
$game_id = request_var('g', 0);
$user_id = request_var('u', 0);
$start = request_var('start', 0);
$search_id = request_var('search_id', '');
$term = utf8_normalize_nfc(request_var('term', '', true));
$type = request_var('type', '');

if ($mode == 'download' && $type == 'data' || $type == 'list')
{
	if ($arcade->config['download_list'])
	{
		if ($type == 'data')
		{
			$arcade->display_download_data();
		}
		else
		{
			$sort_time = request_var('st', 0);
			$sort_key = request_var('sk', 'n');
			$sort_dir = request_var('sd', 'a');
			$per_page = request_var('per_page', 50);

			$arcade->display_download_list($cat_id, $start, $sort_key, $sort_dir, $sort_time, $per_page);
		}
	}
	else
	{
		$mode = $type = '';
	}
}

// Assign index specific vars
$template->assign_vars(array(
	'CAT_IMG'				=> $user->img('forum_read', 'NO_NEW_GAMES'),
	'CAT_NEW_IMG'			=> $user->img('forum_unread', 'NEW_GAMES'),
	'CAT_LOCKED_IMG'		=> $user->img('forum_read_locked', 'NEW_GAMES_LOCKED'),
	'CAT_NEW_LOCKED_IMG'	=> $user->img('forum_unread_locked', 'NO_NEW_GAMES_LOCKED'),

	'S_LOGIN_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&redirect=' . urlencode(str_replace('&', '&', build_url())),
	)
);

switch ($mode)
{
	case 'random':
		if ($random_game_id = $arcade->get_random_game())
		{
			redirect(append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=play&g='. $random_game_id));
		}
	break;

	case 'report':
		if (empty($game_id))
		{
			break;
		}

		include($phpbb_root_path . 'includes/arcade/arcade_reports.'.$phpEx);
	break;

	case 'stats':
		$arcade->set_data($mode);
		include($phpbb_root_path . 'includes/arcade/arcade_stats.'.$phpEx);
	break;

	case 'download':
		include($phpbb_root_path . 'includes/arcade/arcade_download.'.$phpEx);
	break;

	case 'play':
	case 'popup':
		// We won't let guests play games in a new window, it would cause some other problems.
		if (($mode == 'popup' && !$user->data['is_registered']) || empty($game_id))
		{
			break;
		}

		if (!$user->data['is_registered'] && !$auth_arcade->acl_getc_global('c_play'))
		{
			$total_games = $arcade->get_total('games');
			$message =  sprintf($user->lang['ARCADE_REGISTER_MESSAGE_PLAY'], $total_games, '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=register") . '">', '</a>', '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . urlencode("arcade.$phpEx?mode=play&g=$game_id")) . '">', '</a>');
			trigger_error($message);
		}

		include($phpbb_root_path . 'includes/arcade/arcade_play.'.$phpEx);
	break;

	case 'score':
	case 'done':
		// Well you should never get to this condition if you are not
		// logged in however just in case...
		if (!$user->data['is_registered'])
		{
			redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'));
		}
		include($phpbb_root_path . 'includes/arcade/arcade_score.'.$phpEx);
	break;

	case 'addfav':
	case 'delfav':
		$arcade->set_favorites($mode, $cat_id, $game_id);
	break;

	case 'cat':
		// Break out and diplay main arcade page if the cat_id is not set
		if (empty($cat_id))
		{
			break;
		}

	case 'fav':
	case 'search':
		include($phpbb_root_path . 'includes/arcade/arcade_games.'.$phpEx);
	break;

	default:
	// The default case is to continue to load the page
	break;
}
// At the index display all the categories...
// Configure style, language, etc.
display_arcade_header($arcade->config['welcome_index'], $arcade->config['search_index'], $arcade->config['links_index']);
display_arcade();
display_arcade_online();

// Output page
page_header($user->lang['ARCADE_INDEX'], false);

$template->set_filenames(array(
	'body' => 'arcade/arcade_index_body.html')
);

page_footer();
?>
im not to sure what i am looking for - all games open in Clan now but not sure how to get the main page changed :(
www.tgzforum.com, a new forum for all types of people
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: One theme as one page only

Post by marian0810 »

rahber wrote:but it will take a huge time
Actually that's not true, you can do it with 3 small edits. Take a look at this topic: http://www.phpbb.com/community/viewtopi ... &t=2094166

Edit: I took a closer look at the arcade tab in my acp and found that you can also set a fixed style for each category in "Manage arcade".
You and me, time and space. You watch us run!
Mr_makaveli
Registered User
Posts: 1159
Joined: Sun Oct 26, 2008 3:34 pm

Re: One theme as one page only

Post by Mr_makaveli »

thats true but not for the main page
www.tgzforum.com, a new forum for all types of people
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: One theme as one page only

Post by marian0810 »

marian0810 wrote:Take a look at this topic: http://www.phpbb.com/community/viewtopi ... &t=2094166
But this will work :)
You and me, time and space. You watch us run!
Mr_makaveli
Registered User
Posts: 1159
Joined: Sun Oct 26, 2008 3:34 pm

Re: One theme as one page only

Post by Mr_makaveli »

well can you run me through the instructions with the arcade.php i have posted

:?
www.tgzforum.com, a new forum for all types of people
marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: One theme as one page only

Post by marian0810 »

Try this:

Find

Code: Select all

$user->setup();
Replace with

Code: Select all

$user->setup('', '3');
Possibly also needed in viewgame.php and newscore.php but I'm not sure.

Change the "3" to your style ID.
You and me, time and space. You watch us run!
Mr_makaveli
Registered User
Posts: 1159
Joined: Sun Oct 26, 2008 3:34 pm

Re: One theme as one page only

Post by Mr_makaveli »

OHHH wow - i fng love you! thanks heaps

BTW - nice video of your youtube post!
www.tgzforum.com, a new forum for all types of people
Locked

Return to “[3.0.x] Styles Support & Discussion”