http://www.phpbb.com/community/viewtopi ... k#p4786955
Any ideas....

Code: Select all
<?php
if (!defined('IN_PHPBB') or !defined('IN_PORTAL'))
{
die('Hacking attempt');
exit;
}
if (file_exists($phpbb_root_path . 'includes/arcade/arcade_class.' . $phpEx))
{
include($phpbb_root_path . 'includes/arcade/arcade_class.' . $phpEx);
$arcade = new arcade(false);
// Start of Top 3 Arcade Players
$real_leaders_count = sizeof($arcade->leaders);
$leaders_count = ($real_leaders_count > 3) ? 3 : $real_leaders_count;
$arcade_leaders_img = array();
$arcade_leaders_img[0] = '';
$arcade_leaders_img[1] = $phpbb_root_path . $arcade->config['image_path'] . '1st.gif';
$arcade_leaders_img[2] = $phpbb_root_path . $arcade->config['image_path'] . '2nd.gif';
$arcade_leaders_img[3] = $phpbb_root_path . $arcade->config['image_path'] . '3rd.gif';
$arcade_leaders_img_alt = array();
$arcade_leaders_img_alt[0] = '';
$arcade_leaders_img_alt[1] = $user->lang['ARCADE_FIRST'];
$arcade_leaders_img_alt[2] = $user->lang['ARCADE_SECOND'];
$arcade_leaders_img_alt[3] = $user->lang['ARCADE_THIRD'];
if ($leaders_count > 0)
{
$rank = 0;
$actual_rank = 0;
$previous_wins = 0;
for ($i = 0; $i < $leaders_count; $i++)
{
//This code is used to calculate the actual rank.
//For example if there are ties...
$actual_rank++;
if ($previous_wins != $arcade->leaders[$i]['total_wins'])
{
$rank = $actual_rank;
}
$previous_wins = $arcade->leaders[$i]['total_wins'];
$user_link = $arcade->format_username('full', $arcade->leaders[$i]['user_id'], $arcade->leaders[$i]['username'], $arcade->leaders[$i]['user_colour']);
$template->assign_block_vars('arcade_leaders', array(
'ARCADE_LEADERS_RANK' => $rank,
'ARCADE_LEADERS' => $user_link,
'ARCADE_LEADERS_IMAGE' => (isset($arcade_leaders_img[$rank])) ? $arcade_leaders_img[$rank] : '',
'ARCADE_LEADERS_IMAGE_ALT' => (isset($arcade_leaders_img_alt[$rank])) ? $arcade_leaders_img_alt[$rank] : '',
'VICTORIES' => $arcade->leaders[$i]['total_wins']
));
}
}
// End of Top 3 Arcade Players
//Newest Game
if (sizeof($arcade->newest_games))
{
$template->assign_vars(array(
'S_HAS_NEWEST_GAME' => true,
'U_NEWEST_GAME_PLAY' => append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=play&g=' . $arcade->newest_games[0]['game_id']),
'NEWEST_GAME_IMAGE' => ($arcade->newest_games[0]['game_image'] != '') ? $phpbb_root_path . "arcade.$phpEx?img=" . $arcade->newest_games[0]['game_image'] : '',
'NEWEST_GAME_NAME' => $arcade->newest_games[0]['game_name'],
));
}
//Newest Game
//Total Games, Time and Plays
$total_games = sizeof($arcade->games);
if ($total_games > 1)
{
$total_games = sprintf($user->lang['ARCADE_TOTAL_GAMES'], $total_games);
}
else if ($total_games == 1)
{
$total_games = sprintf($user->lang['ARCADE_TOTAL_GAME'], $total_games);
}
$template->assign_vars(array(
'S_DISPLAY_ARCADE' => true,
'TOTAL_GAMES_PLAYED' => ($arcade->totals['games_played']) ? sprintf($user->lang['ARCADE_TOTAL_PLAYED'], $arcade->totals['games_played'], $arcade->format_time($arcade->totals['games_time'])) : '',
'TOTAL_GAMES' => $total_games,
));
//Total Games
}
?>
Code: Select all
<h3>Arcade Stats</h3>
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<!-- IF S_HAS_NEWEST_GAME -->
<p style="margin: 4px;"><!-- IF NEWEST_GAME_IMAGE --><a href="{U_NEWEST_GAME_PLAY}">Newest Game:<br /><img src="{NEWEST_GAME_IMAGE}" alt="{NEWEST_GAME_NAME}" width="20" height="20" style="vertical-align: middle;" /></a><!-- ENDIF --> {NEWEST_GAME_NAME}</p>
<!-- ENDIF -->
<!-- IF .arcade_leaders -->
<br />
<div>
<b>{L_ARCADE_LEADERS_HEADER}</b><br />
<!-- BEGIN arcade_leaders -->
<!-- IF arcade_leaders.S_ROW_COUNT > 0 --> <!-- ENDIF --><!-- IF arcade_leaders.ARCADE_LEADERS_IMAGE --><img src="{arcade_leaders.ARCADE_LEADERS_IMAGE}" alt="{arcade_leaders.ARCADE_LEADERS_IMAGE_ALT}" style="vertical-align: middle;" /><!-- ENDIF --> {arcade_leaders.ARCADE_LEADERS_RANK}: {arcade_leaders.ARCADE_LEADERS} ({arcade_leaders.VICTORIES})
<!-- END arcade_leaders -->
</div>
<!-- ENDIF -->
<!-- IF TOTAL_GAMES -->
<br />
<p style="font-size: 12px;">{TOTAL_GAMES}<br />{TOTAL_GAMES_PLAYED}</p>
<!-- ENDIF -->
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
Code: Select all
if ($portal_config['portal_recent'])
{
include($phpbb_root_path . 'portal/block/recent.'.$phpEx);
}
Code: Select all
include($phpbb_root_path . 'portal/block/arcade.'.$phpEx);
Code: Select all
<!-- IF S_DISPLAY_MAINMENU -->
<!-- INCLUDE portal/block/main_menu.html -->
<!-- ENDIF -->
Code: Select all
<!-- IF S_DISPLAY_ARCADE -->
<!-- INCLUDE portal/block/arcade.html -->
<!-- ENDIF -->
Code: Select all
include($phpbb_root_path . 'includes/arcade/arcade_class.' . $phpEx);
Code: Select all
<?php
if (!defined('IN_PHPBB') or !defined('IN_PORTAL'))
{
die('Hacking attempt');
exit;
}
if (file_exists($phpbb_root_path . 'includes/arcade/arcade_class.' . $phpEx))
{
include($phpbb_root_path . 'includes/arcade/arcade_class.' . $phpEx);
$arcade = new arcade(false);
// Start of Top 3 Arcade Players
$real_leaders_count = sizeof($arcade->leaders);
$leaders_count = ($real_leaders_count > 3) ? 3 : $real_leaders_count;
$arcade_leaders_img = array();
$arcade_leaders_img[0] = '';
$arcade_leaders_img[1] = $phpbb_root_path . $arcade->config['image_path'] . '1st.gif';
$arcade_leaders_img[2] = $phpbb_root_path . $arcade->config['image_path'] . '2nd.gif';
$arcade_leaders_img[3] = $phpbb_root_path . $arcade->config['image_path'] . '3rd.gif';
$arcade_leaders_img_alt = array();
$arcade_leaders_img_alt[0] = '';
$arcade_leaders_img_alt[1] = $user->lang['ARCADE_FIRST'];
$arcade_leaders_img_alt[2] = $user->lang['ARCADE_SECOND'];
$arcade_leaders_img_alt[3] = $user->lang['ARCADE_THIRD'];
if ($leaders_count > 0)
{
$rank = 0;
$actual_rank = 0;
$previous_wins = 0;
for ($i = 0; $i < $leaders_count; $i++)
{
//This code is used to calculate the actual rank.
//For example if there are ties...
$actual_rank++;
if ($previous_wins != $arcade->leaders[$i]['total_wins'])
{
$rank = $actual_rank;
}
$previous_wins = $arcade->leaders[$i]['total_wins'];
$user_link = $arcade->format_username('full', $arcade->leaders[$i]['user_id'], $arcade->leaders[$i]['username'], $arcade->leaders[$i]['user_colour']);
$template->assign_block_vars('arcade_leaders', array(
'ARCADE_LEADERS_RANK' => $rank,
'ARCADE_LEADERS' => $user_link,
'ARCADE_LEADERS_IMAGE' => (isset($arcade_leaders_img[$rank])) ? $arcade_leaders_img[$rank] : '',
'ARCADE_LEADERS_IMAGE_ALT' => (isset($arcade_leaders_img_alt[$rank])) ? $arcade_leaders_img_alt[$rank] : '',
'VICTORIES' => $arcade->leaders[$i]['total_wins']
));
}
}
// End of Top 3 Arcade Players
//Newest Game
if (sizeof($arcade->newest_games))
{
$template->assign_vars(array(
'S_HAS_NEWEST_GAME' => true,
'U_NEWEST_GAME_PLAY' => append_sid("{$phpbb_root_path}arcade.$phpEx", 'mode=play&g=' . $arcade->newest_games[0]['game_id']),
'NEWEST_GAME_IMAGE' => ($arcade->newest_games[0]['game_image'] != '') ? $phpbb_root_path . "arcade.$phpEx?img=" . $arcade->newest_games[0]['game_image'] : '',
'NEWEST_GAME_NAME' => $arcade->newest_games[0]['game_name'],
));
}
//Newest Game
//Total Games, Time and Plays
$total_games = sizeof($arcade->games);
if ($total_games > 1)
{
$total_games = sprintf($user->lang['ARCADE_TOTAL_GAMES'], $total_games);
}
else if ($total_games == 1)
{
$total_games = sprintf($user->lang['ARCADE_TOTAL_GAME'], $total_games);
}
$template->assign_vars(array(
'S_DISPLAY_ARCADE' => true,
'TOTAL_GAMES_PLAYED' => ($arcade->totals['games_played']) ? sprintf($user->lang['ARCADE_TOTAL_PLAYED'], $arcade->totals['games_played'], $arcade->format_time($arcade->totals['games_time'])) : '',
'TOTAL_GAMES' => $total_games,
));
//Total Games
}
?>
Code: Select all
<h3>Arcade Stats</h3>
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<!-- IF S_HAS_NEWEST_GAME -->
<p style="margin: 4px;"><!-- IF NEWEST_GAME_IMAGE --><a href="{U_NEWEST_GAME_PLAY}">Newest Game:<br /><img src="{NEWEST_GAME_IMAGE}" alt="{NEWEST_GAME_NAME}" width="20" height="20" style="vertical-align: middle;" /></a><!-- ENDIF --> {NEWEST_GAME_NAME}</p>
<!-- ENDIF -->
<!-- IF .arcade_leaders -->
<br />
<div>
<b>{L_ARCADE_LEADERS_HEADER}</b><br />
<!-- BEGIN arcade_leaders -->
<!-- IF arcade_leaders.S_ROW_COUNT > 0 --> <!-- ENDIF --><!-- IF arcade_leaders.ARCADE_LEADERS_IMAGE --><img src="{arcade_leaders.ARCADE_LEADERS_IMAGE}" alt="{arcade_leaders.ARCADE_LEADERS_IMAGE_ALT}" style="vertical-align: middle;" /><!-- ENDIF --> {arcade_leaders.ARCADE_LEADERS_RANK}: {arcade_leaders.ARCADE_LEADERS} ({arcade_leaders.VICTORIES})
<!-- END arcade_leaders -->
</div>
<!-- ENDIF -->
<!-- IF TOTAL_GAMES -->
<br />
<p style="font-size: 12px;">{TOTAL_GAMES}<br />{TOTAL_GAMES_PLAYED}</p>
<!-- ENDIF -->
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
Code: Select all
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN and S_ZEBRA_ENABLED and S_DISPLAY_FRIENDS -->
<!-- INCLUDE portal/block/online_friends.html -->
<!-- ENDIF -->
Code: Select all
<!-- IF S_DISPLAY_ARCADE -->
<!-- INCLUDE portal/block/arcade.html -->
<!-- ENDIF -->
Code: Select all
'portal_clock' => array('lang' => 'PORTAL_CLOCK' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
Code: Select all
'portal_arcade' => array('lang' => 'PORTAL_ARCADE' , 'validate' => 'bool' , 'type' => 'radio:yes_no' , 'explain' => true),
Code: Select all
'PORTAL_LEADERS_EXPLAIN' => 'Display this block on portal.',
Code: Select all
'PORTAL_ARCADE' => 'Arcade block',
'PORTAL_ARCADE_EXPLAIN' => 'Display this block on portal.',
Code: Select all
if ($portal_config['portal_change_style'])
{
include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);
}
Code: Select all
if ($portal_config['portal_arcade'])
{
include($phpbb_root_path . 'portal/block/arcade.'.$phpEx);
$template->assign_vars(array(
'S_DISPLAY_ARCADE' => true,
));
}
Am not sure what that is...maybe Kevin can help here as am just a newb.... am using JRSweets Arcade 0.4.5 and is working on my portal.... I have only followed the code I have displayed in my last post...when i enable arcade-block in acp - portal i get the error :
Fatal error: Cannot redeclare class arcade in /srv/www/httpd/phost/d/com/pytalhost/dienstagstruppe/web/includes/arcade/arcade_class.php on line 24
Part of arcade_class.php
......
class arcade
{ *
var $config = array();
var $games = array();
var $cats = array();
var $users
......
* = line 24
The tabs are from the easy menu mod and will get you the link if you hang tight....@lonepare
i saw your tabs ( Portal - Main Forum - About Us ) in your portal , is it a MOD ?
Here you go this is where you will find the easy menu styles...@lonepare
i saw your tabs ( Portal - Main Forum - About Us ) in your portal , is it a MOD ?
Code: Select all
<div id="tabs">
<ul>
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'portal.php' --> class="activetab"<!-- ENDIF -->><a href="{U_PORTAL}"><span>{L_PORTAL}</span></a></li>
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'index.php' or basename($_SERVER['SCRIPT_NAME']) == 'viewforum.php' or basename($_SERVER['SCRIPT_NAME']) == 'viewtopic.php' --> class="activetab"<!-- ENDIF -->><a href="{U_INDEX}"><span>{L_INDEX}</span></a></li>
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'gallery/index.php' --> class="activetab"<!-- ENDIF -->><a href="{U_GALLERY_MOD}"><span>Fotogalerie</span></a></li>
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'arcade.php' --> class="activetab"<!-- ENDIF -->><a href="{U_ARCADE}"<span>Spiele</span></a></li>
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'calendar.php' --> class="activetab"<!-- ENDIF -->><a href="calendar.php"<span>Kalender</span></a></li>
<!-- IF S_DISPLAY_SEARCH --><li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'search.php' --> class="activetab"<!-- ENDIF -->><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}"><span>{L_SEARCH}</span></a></li><!-- ENDIF -->
<!-- IF S_DISPLAY_MEMBERLIST --><li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'memberlist.php' --> class="activetab"<!-- ENDIF -->><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}"><span>{L_MEMBERLIST}</span></a></li><!-- ENDIF -->
<li<!-- IF basename($_SERVER['SCRIPT_NAME']) == 'faq.php' --> class="activetab"<!-- ENDIF -->><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}"><span>{L_FAQ}</span></a></li>
</ul>
</div>
Not sure what it is you are asking.... had some teething problems with my intergration of portal, which was kindly resolved here http://www.phpbb.com/community/viewtopi ... 5#p4614725 which might be of help to you.derkubi wrote:Hmmm funny cause i have this in overall_header for tabs , but i can only see them on forum-index , not in portal !?!
Code: Select all
Klick on my website-button ->lonepare wrote:Not sure what it is you are asking....
Yes thought that was what you were asking and posted a link which shows you how to display your tab menu (nav) in portal.... here is link to the part that tells you... please read.. http://www.phpbb.com/community/viewtopi ... 0#p4619435 ..hope that helps you.derkubi wrote:Klick on my website-button ->lonepare wrote:Not sure what it is you are asking....
You have TABs on Portal AND Index , i have TABs on Index want them on Portal too ... but not sooo important .