portaal in 2 talen.
Forumregels
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.

portaal in 2 talen.
De tekst van de portaal (ez) staat in de portal.php.
bestaat er een manier om dit 2 talig te maken??????????????
bedankt.
bestaat er een manier om dit 2 talig te maken??????????????
bedankt.
Code: Selecteer alles
//
// Set configuration for ezPortal
//
// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = '<img src="images/avatars/gallery/risque/avt_risque_215.jpg" width="73" height="80" vspace="5" hspace="8" align="left">
<div align="left"> <br>Originally The Altar was raised in 1992, it was an amiga elite board, running on an amiga 2000 with ami-express v3.x. It was online for about 5 years, but when the amiga "died", The Altar died with it. Since january 2005 The Altar is back online. We offer you: oldschool ascii art, online gaming, downloadable games, cool pictures, forum and lotsa fun!.
<br>
<br><br>The registration and use of this forum is completely free for you, however you must register before you can use all the forums features. To register click REGISTER at the top of the page. If you want to register, please beware that you NEED to fill in a valid e-mail adress, an activation code will be sent to that adress. <br><br>After the registration, you can change the board language & style! </div>';
// Number of news on portal
$CFG['number_of_news'] = '10';
// Length of news
$CFG['news_length'] = '200';
hoe zet ik hier die variable in ?
Probeer dit eens:
En dan in de lang_main.php:
$lang['welcome_text'] = '<img src="images/avatars/gallery/risque/avt_risque_215.jpg" width="73" height="80" vspace="5" hspace="8" align="left">
<div align="left"> <br>Originally The Altar was raised in 1992, it was an amiga elite board, running on an amiga 2000 with ami-express v3.x. It was online for about 5 years, but when the amiga "died", The Altar died with it. Since january 2005 The Altar is back online. We offer you: oldschool ascii art, online gaming, downloadable games, cool pictures, forum and lotsa fun!.
<br>
<br><br>The registration and use of this forum is completely free for you, however you must register before you can use all the forums features. To register click REGISTER at the top of the page. If you want to register, please beware that you NEED to fill in a valid e-mail adress, an activation code will be sent to that adress. <br><br>After the registration, you can change the board language & style! </div>';
Ik niet zeker of het werkt, maar waarschijnlijk wel.
Code: Selecteer alles
$CFG['welcome_text'] = $lang['welcome_text'];$lang['welcome_text'] = '<img src="images/avatars/gallery/risque/avt_risque_215.jpg" width="73" height="80" vspace="5" hspace="8" align="left">
<div align="left"> <br>Originally The Altar was raised in 1992, it was an amiga elite board, running on an amiga 2000 with ami-express v3.x. It was online for about 5 years, but when the amiga "died", The Altar died with it. Since january 2005 The Altar is back online. We offer you: oldschool ascii art, online gaming, downloadable games, cool pictures, forum and lotsa fun!.
<br>
<br><br>The registration and use of this forum is completely free for you, however you must register before you can use all the forums features. To register click REGISTER at the top of the page. If you want to register, please beware that you NEED to fill in a valid e-mail adress, an activation code will be sent to that adress. <br><br>After the registration, you can change the board language & style! </div>';
Ik niet zeker of het werkt, maar waarschijnlijk wel.
- Bas
- Berichten: 2741
- Lid geworden op: 02 dec 2003, 17:38
- Locatie: Omgeving Goslar (Duitsland)
- Contacteer:
Nee, nee, nee... De $CFG worden gemaakt voordat phpBB geinitialiseerd is...
Dus je zou die moeten verplaatsen na de phpBB-initialisatie.
Dus je zou die moeten verplaatsen na de phpBB-initialisatie.
.Bas Hosting, gratis hosting met FTP, PHP en MySQL | viennaCMS, simpel flexibel open source CMS
Hoe ban je tegenwoordig? 'Deny' bij alle rechten!
Hoe ban je tegenwoordig? 'Deny' bij alle rechten!
dit is mijn lang_main....
Waar moet ik het dan neerzetten ???
Waar moet ik het dan neerzetten ???
Laatst gewijzigd door gies op 04 jul 2005, 09:46, 1 keer totaal gewijzigd.
sorry de code is te lang 
hier is de rest...
Code: Selecteer alles
//Nickpage CMS
$lang['NP_BACK_TO_NICKPAGE'] = 'back to Nickpage';
$lang['NP_CONFIGURATION'] = 'General Configuration';
$lang['NP_SECURITY'] = 'Security';
$lang['NP_GUESTBOOK'] = 'Guestbook';
$lang['NP_BIRTHDAY'] = 'Date of birth (DD.MM.YY)';
$lang['NP_BIRTHDAY_COMMENT'] = '(If you do not want to display your Age,<br>leave all 3 Fields blank!)';
$lang['NP_SHOW_EMAIL'] = 'Show Emailaddy';
$lang['NP_SHOW_EMAIL_COMMENT'] = '(This setting also changes <br>your general Forum Settings!)';
$lang['NP_INFORMATION'] = 'Information';
$lang['NP_SPECIALNICKNAME'] = 'Special Nickname';
$lang['NP_USERPIC'] = 'Userpic (200x200,PNG/GIF/JPEG)';
$lang['NP_SAFE'] = 'Save';
$lang['NP_SETBACK'] = 'Reset';
$lang['NP_ADD_LINK'] = 'Add Link';
$lang['NP_LINK_NAME'] = 'Description';
$lang['NP_LINK_ADRESS'] = 'URL';
$lang['NP_EDIT_LINK'] = 'Edit Links';
$lang['NP_EDIT'] = 'Edit';
$lang['NP_DELETE'] = 'Delete';
$lang['NP_ADD_BUDDY'] = 'Add Buddy';
$lang['NP_NICKNAME'] = 'Nickname';
$lang['NP_NICKNAME_SEARCH'] = 'Find Nickname';
$lang['NP_ADD_GALERIE'] = 'Add Pic';
$lang['NP_PIC'] = 'Pic';
$lang['NP_PIC_TITLE'] = 'Description';
$lang['NP_ADD_SELFMADE'] = 'make Creatives';
$lang['NP_SECURITY_SETTINGS'] = 'Edit Security Settings';
$lang['NP_REGISTERED_ONLY_VIEW'] = 'Only members are allowed to view my Nickpage';
$lang['NP_REGISTERED_ONLY_GB'] = 'Only members are allowed to write into my Guestbook';
$lang['NP_MANAGE_GUESTBOOK'] = 'Edit Guestbook Entrys';
$lang['NP_AUTHOR'] = 'Author';
$lang['NP_DATE'] = 'Date';
$lang['NP_TIME'] = 'Time';
$lang['NP_ENTRY'] = 'Entry';
$lang['NP_DELETE_PIC'] = 'Delete Pic';
$lang['NP_GB_EMAIL'] = 'Send Email if a new Guestbook Entry was created ?';
//Notification
$lang['Notification_nickpage_subject'] = 'new Guestbook Entry exists';
//Adminref
$lang['NICKPAGE'] = "Display a Nickpage";
$lang['Name'] = 'Name';
$lang['Alter'] = 'Age';
$lang['Userpic'] = 'Photo';
$lang['Eintraege'] = 'GB-Entrys';
$lang['Bilder'] = 'Gal-Pics';
$lang['Zugang'] = 'Enter';
$lang['Recent_Nickpages'] = "Recent Nickpages";
$lang['No_Recent_Nickpages'] = "No Nickpages available";
$lang['Nickpagelist'] = "Nickpages";
//
// Recent Topics
//
$lang['Recent_topics'] = 'Recent Topics';
$lang['Recent_today'] = 'Today';
$lang['Recent_yesterday'] = 'Yesterday';
$lang['Recent_last24'] = 'Last 24 Hours';
$lang['Recent_lastweek'] = 'Last Week';
$lang['Recent_lastXdays'] = 'Last %s days';
$lang['Recent_last'] = 'Last';
$lang['Recent_days'] = 'Days';
$lang['Recent_first'] = 'started at %s';
$lang['Recent_first_poster'] = ' by %s';
$lang['Recent_select_mode'] = 'Select mode:';
$lang['Recent_showing_posts'] = 'Showing Posts:';
$lang['Recent_title_one'] = '<font size=4>%s</font> topic %s'; // %s = topics; %s = sort method
$lang['Recent_title_more'] = '<font size=4>%s</font> topics %s'; // %s = topics; %s = sort method
$lang['Recent_title_today'] = ' from today';
$lang['Recent_title_yesterday'] = ' from yesterday';
$lang['Recent_title_last24'] = ' from the last 24 hours';
$lang['Recent_title_lastweek'] = ' from the last week';
$lang['Recent_title_lastXdays'] = ' from the last %s days'; // %s = days
$lang['Recent_no_topics'] = 'No topics were found.';
$lang['Recent_wrong_mode'] = 'You´ve selected a wrong mode.';
$lang['Recent_click_return'] = 'Click %shere%s to return to recent site.';
//
// That's all, Folks!
// -------------------------------------------------
// Start add - Fully integrated shoutbox MOD
$lang['Shoutbox'] = 'Shoutbox';
$lang['Shoutbox_date'] = ' d M Y H:i';
$lang['Shout_censor'] = 'shout removed !';
$lang['Shout_refresh'] = 'Refresh';
$lang['Shout_text'] = 'Your text';
$lang['Viewing_Shoutbox']= 'Viewing shoutbox';
$lang['Censor'] ='Censor';
// End add - Fully integrated shoutbox MOD
// TopPoster Mod
$lang['Top_poster'] = 'Top Poster';
// Start add - Last visit MOD
$lang['Last_logon'] = 'Last Visit';
$lang['Hidde_last_logon'] = 'Hidden';
$lang['Never_last_logon'] = 'Never';
$lang['Users_today_zero_total'] = 'In total <b>0</b> users have visited the board today :: ';
$lang['Users_today_total'] = 'In total <b>%d</b> user have visited the board today :: ';
$lang['User_today_total'] = 'In total <b>%d</b> users have visited the board today :: ';
$lang['Users_lasthour_explain'] = ', %d of them within the last hour.';
$lang['Users_lasthour_none_explain'] = ''; //showen of none have visited the last hour, fill if you like
$lang['Years'] = 'Years';
$lang['Year'] = 'Year';
$lang['Weeks'] = 'Weeks';
$lang['Week'] = 'Week';
$lang['Day'] = 'Day';
$lang['Total_online_time'] = 'Total Online Duration';
$lang['Last_online_time'] = 'Last Online Duration';
$lang['Number_of_visit'] = 'Number of visits';
$lang['Number_of_pages'] = 'Number of page hits';
// End add - Last visit MOD
// PJIRC MOD
$lang['Chat_Room'] = 'Irc Chat Room';
$lang['IRC_commands'] = 'IRC Chat Room Commands';
$lang['IRC_commands_explain'] = 'These commands will be performed when you log into the chat room. Separate each command with a semi-colon. <br />Example:<br /> /msg nickserv identify password;<br />/beep';
$lang['IRC_disabled'] = '<b>Our chat room is currently closed.</b> Please try again later.';
// BEGIN Blank Template MOD
$lang['No_page_exists'] = 'The page you requested does not exist.';
$lang['Not_auth'] = 'Sorry, but only %s can access this page.';
$lang['Users'] = 'Registered users';
$lang['Added_pages'] = ' Special ';
$lang['See_page'] = 'See the page';
// END Blank Template MOD
// Start add - Select default language MOD
$lang['Word_language'] = 'Language';
// End add - Select default language MOD
$lang['welcome_text'] = 'Originally The Altar was raised in 1992, it was an amiga elite board, running on an amiga 2000 with ami-express v3.x. It was online for about 5 years, but when the amiga "died", The Altar died with it. Since january 2005 The Altar is back online. We offer you: oldschool ascii art, online gaming, downloadable games, cool pictures, forum and lotsa fun!.
<br>
<br><br>The registration and use of this forum is completely free for you, however you must register before you can use all the forums features. To register click REGISTER at the top of the page. If you want to register, please beware that you NEED to fill in a valid e-mail adress, an activation code will be sent to that adress. <br><br>After the registration, you can change the board language & style! ';
?>
Laatst gewijzigd door gies op 03 jul 2005, 23:45, 1 keer totaal gewijzigd.
Zet
voor

Code: Selecteer alles
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);Code: Selecteer alles
//
// Set configuration for ezPortal
//Dan krijg ik deze error:
Code: Selecteer alles
Fatal error: Cannot redeclare class template in thealtar.nl/public_html/phpBB2/includes/template.php on line 74
Laatst gewijzigd door gies op 26 okt 2005, 21:55, 1 keer totaal gewijzigd.
sorry...
maar dan krijg ik nog geen text... dit is mijn portal.php:
maar dan krijg ik nog geen text... dit is mijn portal.php:
Code: Selecteer alles
<?php
/***************************************************************************
* portal.php
* -------------------
* begin : Tuesday, August 13, 2002
* copyright : (C) 2002 Smartor
* email : smartor_xp@hotmail.com
*
* $Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/***************************************************************************
*
* Some code in this file I borrowed from the original index.php, Welcome
* Avatar MOD and others...
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);
//
// Set configuration for ezPortal
//
// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = $lang['welcome_text'];
// Number of news on portal
$CFG['number_of_news'] = '10';
// Length of news
$CFG['news_length'] = '200';
// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1,2,3,4,5,6,7,8,9,10,11,12,13,14';
// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1';
//
// END configuration
// --------------------------------------------------------
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
//change theme on index - new code by Smartor (smartor.is-root.com)
$fpage_style = $userdata['user_style'];
if(isset($HTTP_POST_VARS['fpage_theme']))
{
$fpage_theme = intval($HTTP_POST_VARS['fpage_theme']);
$fpuser_id = $userdata['user_id'];
$fp_sql = "UPDATE " . USERS_TABLE . " SET user_style = '$fpage_theme' WHERE
user_id = $fpuser_id";
if ( !($fp_result = $db->sql_query($fp_sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table ' . "$user_id
$fpage_theme", '', __LINE__, __FILE__, $sql);
}
else
{
$fp_message = $lang['Profile_updated'] . '<br /><br />' .
sprintf($lang['Click_return_index'], '<a href="' .
append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $fp_message);
}
}
//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}
if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
if( $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(post_id) as total
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $userdata['user_lastvisit'];
$result = $db->sql_query($sql);
if( $result )
{
$row = $db->sql_fetchrow($result);
$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
}
}
//
// Newest Nickpages Mod
//
$sql = "SELECT a.user_id, a.username, b.name, b.created FROM ".USERS_TABLE." a, ".NICKPAGE_TABLE." b WHERE b.uid=a.user_id ORDER BY b.created DESC LIMIT 6";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query Nickpage information', '', __LINE__, __FILE__, $sql);
}
$number_nickpages = $db->sql_numrows($result);
$nickpage_list = $db->sql_fetchrowset($result);
if ( $number_nickpages != 0 )
{
$template->assign_block_vars('switch_nickpages_yes', array());
for($i = 0; $i < count($nickpage_list); $i++)
{
$username = $nickpage_list[$i]['username'];
$userdate = $nickpage_list[$i]['created'];
if(strlen($username) > 17) { // Limit title length to avoid wrap
$username = strip_tags($username, '<a><i><b><ul><li>');
$username = substr($username,0,15);
$username .= "...";
}
if ($username != '') $template->assign_block_vars('switch_show_nickpages', array());
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$template->assign_vars(array(
'TEMPLATE_SELECT' => style_select($board_config['default_style'], 'template'),
'L_SELECT_STYLE' => $lang['Change_style'],
'L_CHANGE_NOW' => $lang['Go'],
'FPAGE_STYLE' => style_select($fpage_style, 'fpage_theme'),
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"L_RECENT_NICKPAGES" => $lang['Recent_Nickpages'],
'NAME' => '<a href="' . append_sid("nickpage.php?user=$username") . '">' . $username . '</a>',
'LSEEN_TIME' => date("d.m.y", $nickpage_list[$i]['created']),
)
);
}
}
else
{
$template->assign_block_vars('switch_nickpages_no', array());
$template->assign_vars(array(
"L_RECENT_NICKPAGES" => $lang['Recent_Nickpages'],
'L_NO_RECENT_NICKPAGES' => $lang['No_Recent_Nickpages'])
);
}
// Start add - Last visit MOD
$time_now=time();
$time1Hour=$time_now-3600;
$minutes = date('is', $time_now);
$hour_now = $time_now - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
$dato=create_date('H', $time_now,$board_config['board_timezone']);
$timetoday = $hour_now - (3600*$dato);
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
while( $guest_list = $db->sql_fetchrow($result))
{
if ($guest_list['session_time'] >$time1Hour) $users_lasthour++;
}
$guests_today = $db->sql_numrows($result);
$sql = 'SELECT user_id,username,user_allow_viewonline,user_level,user_lastlogon FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' ORDER BY username';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
while( $todayrow = $db->sql_fetchrow($result))
{
$style_color = "";
if ($todayrow['user_lastlogon']>=$time1Hour)
{
$users_lasthour++;
}
switch ($todayrow['user_level'])
{
case ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
}
$users_today_list.=( $todayrow['user_allow_viewonline'])?' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'>' . $todayrow['username'] . '</a>,' : (($userdata[user_level]==ADMIN) ? ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'><i>' . $todayrow['username'] . '</i></a>,' : '');
if (!$todayrow['user_allow_viewonline']) $logged_hidden_today++;
else $logged_visible_today++;
}
if ($users_today_list)
{
$users_today_list[ strlen( $users_today_list)-1] = ' ';
} else
{
$users_today_list = $lang['None'];
}
$total_users_today = $db->sql_numrows($result)+$guests_today;
$users_today_list = $lang['Registered_users'].' ' . $users_today_list;
$l_today_user_s = ($total_users_today) ? ( ( $total_users_today == 1 )? $lang['User_today_total'] : $lang['Users_today_total'] ) : $lang['Users_today_zero_total'];
$l_today_r_user_s = ($logged_visible_today) ? ( ( $logged_visible_today == 1 ) ? $lang['Reg_user_total'] : $lang['Reg_users_total'] ) : $lang['Reg_users_zero_total'];
$l_today_h_user_s = ($logged_hidden_today) ? (($logged_hidden_today == 1) ? $lang['Hidden_user_total'] : $lang['Hidden_users_total'] ) : $lang['Hidden_users_zero_total'];
$l_today_g_user_s = ($guests_today) ? (($guests_today == 1) ? $lang['Guest_user_total'] : $lang['Guest_users_total']) : $lang['Guest_users_zero_total'];
$l_today_users = sprintf($l_today_user_s, $total_users_today);
$l_today_users .= sprintf($l_today_r_user_s, $logged_visible_today);
$l_today_users .= sprintf($l_today_h_user_s, $logged_hidden_today);
$l_today_users .= sprintf($l_today_g_user_s, $guests_today);
// End add - Last visit MOD
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = 'Old School Never Dies - Main Page';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'portal_body.tpl')
);
//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
break;
}
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
$name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&" . $userdata['user_id']) . '">' . $userdata['username'] . '</a>';
}
else
{
$name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//
//
// BEGIN Random or Recent Photo
//
$Display = 'XXXX'; // Replace 'XXXX' with 'Recent' or 'Random'.
$CategoryID = 0; // Replace 0 with a category ID. Otherwise, keep it as it is.
// Example: http://www.seekideas.com/forum/album_cat.php?cat_id=3
// Category ID is 3
if ($Display == 'Random') {
if ($CategoryID != 0) {
$sql = "SELECT * FROM phpbb_album WHERE pic_cat_id = $CategoryID ORDER BY RAND() LIMIT 1";
}
else {
$sql = "SELECT * FROM phpbb_album ORDER BY RAND() LIMIT 1";
}
}
else if ($Display == 'Recent') {
if ($CategoryID != 0) {
$sql = "SELECT pic_id, pic_title, pic_username, pic_time FROM phpbb_album WHERE pic_cat_id = $CategoryID ORDER BY pic_time DESC LIMIT 0,1";
}
else {
$sql = "SELECT pic_id, pic_title, pic_username, pic_time FROM phpbb_album ORDER BY pic_time DESC LIMIT 0,1";
}
}
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query album information', '', __LINE__, __FILE__, $sql);
}
$picrow = $db->sql_fetchrow($result);
//
// END Random or Recent Photo
//
//
//start top poster
//
$total_poster = '5'; // total of top poster
$avatar_height = '25'; // the avatar's height
$sql = "SELECT username, user_id, user_posts, user_avatar, user_avatar_type, user_allowavatar
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY user_posts DESC LIMIT $total_poster";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$username = $row['username'];
$user_id = $row['user_id'];
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
$poster_avatar = '';
if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
{
switch( $row['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
case USER_AVATAR_REMOTE:
$poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
case USER_AVATAR_GALLERY:
$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" height="' . $avatar_height . '" />' : '';
break;
}
}
$template->assign_block_vars('topposter', array(
'USERNAME' => $username,
'POSTS' => $posts,
'AVATAR_IMG' => $poster_avatar,
'U_VIEWPOSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
);
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
//
//end top poster
//
$template->assign_vars(array(
'WELCOME_TEXT' => $CFG['welcome_text'],
// Start add - Last visit MOD
'USERS_TODAY_LIST' => $users_today_list,
'L_USERS_LASTHOUR' =>($users_lasthour)?sprintf($lang['Users_lasthour_explain'],$users_lasthour):$lang['Users_lasthour_none_explain'],
'L_USERS_TODAY' =>$l_today_users,
// End add - Last visit MOD
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
'L_FORUM' => $lang['Forum'],
'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
'L_STATISTICS' => $lang['Statistics'],
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
'L_POSTED' => $lang['Posted'],
'L_COMMENTS' => $lang['Comments'],
'L_VIEW_COMMENTS' => $lang['View_comments'],
'L_POST_COMMENT' => $lang['Post_your_comment'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
'L_REMEMBER_ME' => $lang['Remember_me'],
'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
'L_POLL' => $lang['Poll'],
'L_VOTE_BUTTON' => $lang['Vote'],
// Top Poster
'L_TOP_POSTER' => $lang['Top_poster'],
// Start add - Fully integrated shoutbox MOD
'U_SHOUTBOX' => append_sid("shoutbox.$phpEx"),
'L_SHOUTBOX' => $lang['Shoutbox'],
'U_SHOUTBOX_MAX' => append_sid("shoutbox_max.$phpEx"),
// End add - Fully integrated shoutbox MOD
// Welcome Avatar
'L_NAME_WELCOME' => $lang['Welcome'],
'U_NAME_LINK' => $name_link,
'AVATAR_IMG' => $avatar_img)
);
//
// Fetch Posts from Announcements Forum
//
if(!isset($HTTP_GET_VARS['article']))
{
$template->assign_block_vars('welcome_text', array());
$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], $CFG['news_length']);
for ($i = 0; $i < count($fetchposts); $i++)
{
if( $fetchposts[$i]['striped'] == 1 )
{
$open_bracket = '[ ';
$close_bracket = ' ]';
$read_full = $lang['Read_Full'];
}
else
{
$open_bracket = '';
$close_bracket = '';
$read_full = '';
}
$template->assign_block_vars('fetchpost_row', array(
'TITLE' => $fetchposts[$i]['topic_title'],
'POSTER' => $fetchposts[$i]['username'],
'TIME' => $fetchposts[$i]['topic_time'],
'TEXT' => $fetchposts[$i]['post_text'],
'REPLIES' => $fetchposts[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id']),
'U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
'L_READ_FULL' => $read_full,
'OPEN' => $open_bracket,
'CLOSE' => $close_bracket)
);
}
}
else
{
$fetchposts = phpbb_fetch_posts($CFG['news_forum'], $CFG['number_of_news'], 0);
$i = intval($HTTP_GET_VARS['article']);
$template->assign_block_vars('fetchpost_row', array(
'TITLE' => $fetchposts[$i]['topic_title'],
'POSTER' => $fetchposts[$i]['username'],
'TIME' => $fetchposts[$i]['topic_time'],
'TEXT' => $fetchposts[$i]['post_text'],
'REPLIES' => $fetchposts[$i]['topic_replies'],
'U_VIEW_COMMENTS' => append_sid('viewtopic.' . $phpEx . '?t=' . $fetchposts[$i]['topic_id']),
'U_POST_COMMENT' => append_sid('posting.' . $phpEx . '?mode=reply&t=' . $fetchposts[$i]['topic_id'])
)
);
}
//
// END: Fetch Announcements
//
//
// Fetch Poll
//
$fetchpoll = phpbb_fetch_poll($CFG['poll_forum']);
if (!empty($fetchpoll))
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $fetchpoll['vote_text'],
'S_POLL_ACTION' => append_sid('posting.'.$phpEx.'?'.POST_TOPIC_URL.'='.$fetchpoll['topic_id']),
'S_TOPIC_ID' => $fetchpoll['topic_id'],
'L_SUBMIT_VOTE' => $lang['Submit_vote'],
'L_LOGIN_TO_VOTE' => $lang['Login_to_vote']
)
);
for ($i = 0; $i < count($fetchpoll['options']); $i++)
{
$template->assign_block_vars('poll_option_row', array(
'OPTION_ID' => $fetchpoll['options'][$i]['vote_option_id'],
'OPTION_TEXT' => $fetchpoll['options'][$i]['vote_option_text'],
'VOTE_RESULT' => $fetchpoll['options'][$i]['vote_result'],
)
);
}
}
else
{
$template->assign_vars(array(
'S_POLL_QUESTION' => $lang['No_poll'],
'DISABLED' => 'disabled="disabled"'
)
);
}
//
// Generate the page
//
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
en dit een stukje lang_main:
??
Code: Selecteer alles
// Start add - Select default language MOD
$lang['Word_language'] = 'Language';
// End add - Select default language MOD
$lang['welcome_text'] = 'Originally The Altar was raised in 1992, it was an amiga elite board, running on an amiga 2000 with ami-express v3.x. It was online for about 5 years, but when the amiga "died", The Altar died with it. Since january 2005 The Altar is back online. We offer you: oldschool ascii art, online gaming, downloadable games, cool pictures, forum and lotsa fun!.
<br>
<br><br>The registration and use of this forum is completely free for you, however you must register before you can use all the forums features. To register click REGISTER at the top of the page. If you want to register, please beware that you NEED to fill in a valid e-mail adress, an activation code will be sent to that adress. <br><br>After the registration, you can change the board language & style! ';
?>En wat nu als je
vervangt met
Code: Selecteer alles
'WELCOME_TEXT' => $CFG['welcome_text'],Code: Selecteer alles
'WELCOME_TEXT' => $lang['welcome_text'],Code: Selecteer alles
//
// Set configuration for ezPortal
//
// Welcome Text: note that we are in PHP file, so use \' instead of ' and use \\ instead of \ (HTML enabled)
$CFG['welcome_text'] = $lang['welcome_text'];