Pagina 1 van 2

Variabelen (bv. aantal gebruikers) in tekst zetten?

Geplaatst: 15 jun 2003, 18:24
door MartijnLiessel
Weet iemand hoe ik variabelen, in mijn geval het aantal gebruikers, in een stuk tekst kan plaatsen? Ik heb 'n forum (http://www.vwodeurne.tk) met 'n portal, en nu wil ik in de welkomstekst schrijven hoeveel leden we al hebben. Bijvoorbeeld: We hebben nu al 50 leden. Het moet dus denk ik in portal.php komen te staan. Het stuk waar 't om gaat ziet er zo uit:

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'] = 'Welkom op <b>www.vwodeurne.tk</b><br /><br />Het forum voor iedereen die nu in 4 VWO op het Peelland College zit. <br /><br />Veel plezier! :D';

// Number of news on portal
$CFG['number_of_news'] = '3';
Wie weet raad? Ik heb al geprobeerd om er {TOTAL_USERS} tussen te zetten, maar dat werkte niet.

Geplaatst: 15 jun 2003, 18:53
door Leipo
{TOTAL_USERS} :lol:
Is toch goed hoor.. :?
Welke template gebruik je.. moet je even index_body.tpl daarvan openen met word dan zie je het onderaan staan..

Geplaatst: 15 jun 2003, 19:13
door MartijnLiessel
Als ik {total_users} ertussen zet staat dat er gewoon als tekst. Ook als ik de aanhalingstekens wat verschuif.

Geplaatst: 15 jun 2003, 21:21
door Leipo
Oww sorry zat verkeerd te denken.. je doet dus [ ] eromheen.. dan moet je alleen maar total_users ertussen doen.. check je index_body.tpl maar eens.. dan net niet onderaan staan ze allemaal.. :lol:

Geplaatst: 16 jun 2003, 12:59
door MartijnLiessel

Code: Selecteer alles

</tr>
<tr>
<td class="row1" rowspan="4"><img src="templates/fisubsilversh/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" width="25" height="25" class="imgfolder" title="{L_WHO_IS_ONLINE}" />
</td>
<td class="row1" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />
{TOTAL_USERS}<br />
{NEWEST_USER}</span></td>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ <strong>{L_WHOSONLINE_ADMIN}</strong> 
]   [ <strong>{L_WHOSONLINE_MOD}</strong> ]<br />
Dit is het stukje waar jij op doelt, neem ik aan. Maar daar staat dus {TOTAL_USERS}, en als ik dat ertussen zet, krijg ik het gewoon als tekst te lezen! HELP

Geplaatst: 16 jun 2003, 13:04
door Leipo
Probeer [ ' TOTAL_USERS ' ] eens of verschuif anders de aanhalings tekentjes.. anders probeer het in kleine letters..

Geplaatst: 16 jun 2003, 13:07
door kolly
Drietal zaken die je in je portal.php moet zetten, anders heb je in de template van je portal ongeldige verwijzigingen:

:arrow: ergens onder "$total_posts = get_db_stat('postcount');" of iets dergelijks plaats je:

Code: Selecteer alles

$total_users = get_db_stat('usercount');
:arrow: Aan het eind van het lijstje dat begint met $ zet je:

Code: Selecteer alles

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'];
}
:arrow: na de regel "$template->assign_vars(array(" volgt:

Code: Selecteer alles

'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),

Geplaatst: 16 jun 2003, 13:13
door MartijnLiessel
Helaas, ik heb het allemaal geprobeerd maar het werkt niet. Ik ben er nu ongeveer wel achtergekomen dat ik in dat gedeelte geen ' mag gebruiken, omdat dan de hele site niet meer werkt.

Geplaatst: 16 jun 2003, 13:17
door kolly
Heb mijn idee verandert, zie 2 postjes hierboven, daarmee werkt het misschien wel.

Geplaatst: 16 jun 2003, 13:21
door MartijnLiessel
Bedankt voor de tip Kolly, maar al die dingen stonden al in portal.php ik zal de hele file hier even neerzetten:

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...
 *
 ***************************************************************************/

//
// 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'] = 'Welkom op <b>www.vwodeurne.tk</b><br /><br />Het forum voor iedereen die nu in 4 VWO op het Peelland College zit. <br /><br />Veel plezier! :D';

// Number of news on portal
$CFG['number_of_news'] = '4';

// 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';

// Poll Forum ID: separate by comma for multi-forums, eg. '3,8,14'
$CFG['poll_forum'] = '1,2,3,4,5,6';

// Number of Recent Topics (not Forum ID)
$CFG['number_recent_topics'] = '25';

// Exceptional Forums for Recent Topics, eg. '2,4,10' (note: my Recent Topics script has its own permission checking, so you can leave this variable blank)
$CFG['exceptional_forums'] = '';

//
// END configuration
// --------------------------------------------------------

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);
// ChatBox Mod
include($phpbb_root_path . 'chatbox_front.php');


//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
// 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'];
}

//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
	$forum_data[] = $row;
}

$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);

if( $CFG['exceptional_forums'] == '' )
{
	$except_forum_id = '\'start\'';
}
else
{
	$except_forum_id = $CFG['exceptional_forums'];
}

for ($i = 0; $i < count($forum_data); $i++)
{
	if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
	{
		if ($except_forum_id == '\'start\'')
		{
			$except_forum_id = $forum_data[$i]['forum_id'];
		}
		else
		{
			$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
		}
	}
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
		FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
		WHERE t.forum_id NOT IN (" . $except_forum_id . ")
			AND t.topic_status <> 2
			AND p.post_id = t.topic_last_post_id
			AND p.poster_id = u.user_id
		ORDER BY p.post_id DESC
		LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
	message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
while ($row = $db->sql_fetchrow($result))
{
	$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
	$template->assign_block_vars('recent_topic_row', array(
		'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
		'L_TITLE' => $recent_topic_row[$i]['topic_title'],
		'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
		'S_POSTER' => $recent_topic_row[$i]['username'],
		'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
		)
	);
}
//
// END - Recent Topics
//

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'] . "&nbsp;(" . $row['total'] . ")";
	}
}

//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
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
//

// 
// Get Newest Pic 
// 
$Display = 'Random';   // Replace 'Recent' with 'Random' 
$CategoryID = 0;   // Replace 0 with a category ID. Otherwise, keep it as it is 
         // Example: http://www.yourdomain.com/phpBB2/album_cat.php?cat_id=3 
         // Category ID is 3 

if ($Display == 'Random') 
{ 
   if ($CategoryID != 0) 
   { 
      $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username 
         FROM ". ALBUM_TABLE ." AS p 
         LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id 
         WHERE  pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID 
         ORDER BY RAND() 
         LIMIT 0,1"; 
   } 
   else { 
      $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username 
         FROM ". ALBUM_TABLE ." AS p 
         LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id 
         WHERE  pic_approval = 1 AND pic_lock = 0 
         ORDER BY RAND() 
         LIMIT 0,1"; 
   } 
} 

else if ($Display == 'Recent') 
{ 
   if ($CategoryID != 0) 
   { 
      $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_approval, u.username 
         FROM ". ALBUM_TABLE ." AS p 
         LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id 
         WHERE  pic_approval = 1 AND pic_lock = 0 AND pic_cat_id = $CategoryID 
         ORDER BY pic_time DESC 
         LIMIT 0,1"; 
   } 
   else 
   { 
      $sql = "SELECT p.pic_id, p.pic_title, p.pic_username, p.pic_user_id, p.pic_time, p.pic_desc, p.pic_lock, p.pic_approval, u.username 
         FROM ". ALBUM_TABLE ." AS p 
         LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id 
         WHERE  pic_approval = 1 AND pic_lock = 0 
         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); 

$pic_poster = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $picrow['pic_user_id']) .'">'. $picrow['pic_username'] .'</a>'; 
// 
// END: Get Newest Pic 
// 


$template->assign_vars(array(
	'WELCOME_TEXT' => $CFG['welcome_text'],
	'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'],
		// Recent Topics
	'L_RECENT_TOPICS' => $lang['Recent_topics'],
	   // Photo Album 
   'L_NEWEST_PIC' => $lang['Newest_pic'], 
   'PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $picrow['pic_id']), 
   'PIC_TITLE' => $picrow['pic_title'], 
   'PIC_POSTER' => $pic_poster, 
   'U_PIC_LINK' => append_sid('album_comment.' . $phpEx . '?pic_id=' . $picrow['pic_id']), 
   'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['pic_time'], $board_config['board_timezone']), 
   'PIC_DESCR' => $picrow['pic_desc'], 

   'L_PIC_TITLE' => $lang['Pic_Title'], 
   'L_POSTER' => $lang['Poster'], 
   'L_POSTED' => $lang['Posted'], 
	// ChatBox
	'L_WHO_IS_CHATTING' => $lang['Who_is_Chatting'],
	'TOTAL_CHATTERS_ONLINE' => sprintf($lang['How_Many_Chatters'], $howmanychat),
	'CHATTERS_LIST' => sprintf($lang['Who_Are_Chatting' ],$chatters),
	'L_LOGIN_TO_JOIN_CHAT' => $lang['Login_to_join_chat'],
	'L_CLICK_TO_JOIN_CHAT' => $lang['Click_to_join_chat'],
	'S_JOIN_CHAT' => append_sid("chatbox_mod/chatbox.$phpEx"),
	'CHATBOX_NAME' => $userdata['user_id'] . '_ChatBox',

	// 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);

?>

Geplaatst: 16 jun 2003, 13:25
door MartijnLiessel
Nog een aanvulling: Volgens mij als ik deze code gebruik {TOTAL_USERS} dan zou er moeten komen staan: We hebben 50 geregistreerde gebruikers.

Wat ik zou willen is alleen die 50, zodat ik zelf een zin kan maken. Ik weet dat ik heb bij de language-file kan veranderen, maar dan veranderd het ook bij het forum en rechts bij de statistieken. Dat is niet de bedoeling.

Geplaatst: 16 jun 2003, 14:12
door kolly
Deze code dan bijv. ff toevoegen in je portal.php

Code: Selecteer alles

'TOTAL_USERS_NR' => $total_users, 
Dan kun je {TOTAL_USERS_NR} als het goed is als aantal gebruiken!

Geplaatst: 16 jun 2003, 16:22
door Leipo
Uuhmm dat stond er al in hoor.. :?

Geplaatst: 16 jun 2003, 17:01
door kolly
Leipo schreef:Uuhmm dat stond er al in hoor.. :?
Neej hoor, er stond al TOTAL_USERS in, maar nog niet TOTAL_USERS_NR. Volgende keer even beter lezen Leipo :)

Geplaatst: 16 jun 2003, 17:25
door Leipo
Oww srry.. :oops:

Geplaatst: 16 jun 2003, 17:47
door SuperNova
Dan wil ik de volgende dingen wel (los) weten:
* Gebruikers online
* Verborgen online
* Gasten online

Geplaatst: 16 jun 2003, 18:24
door kolly
Eitje, de brongegevens hiervan staan in viewonline.php. Even (bijv.) deze codetjes toevoegen:

Code: Selecteer alles

'TOTAL_REGISTERED_USERS_ONLINE_NR' => $registered_users,
'TOTAL_HIDDEN_USERS_ONLINE_NR' => $hidden_users, 
'TOTAL_GUEST_USERS_ONLINE_NR' => $guest_users,
Succes ermee SuperNova

Geplaatst: 17 jun 2003, 05:54
door SuperNova
dit werkt niet.
ik heb het in viewtopic en page_header geprobeerd
de variables worden in index_body template gebruikt

Geplaatst: 17 jun 2003, 09:39
door kolly
Ik zei ook dat ze in viewonline.php staan, dus ze worden dan in viewonline_body.tpl gebruikt, hehe. Als je ze in andere tpl bestanden wilt proppen, moet je bijv. in index_body.tpl gebruiken ja of in overall_header.tpl. Je moet ze dan wel gedefinieerd hebben in het bijbehorende php-bestand lijkt mij!

Geplaatst: 17 jun 2003, 13:17
door FlorisD
kolly schreef:Ik zei ook dat ze in viewonline.php staan, dus ze worden dan in viewonline_body.tpl gebruikt, hehe. Als je ze in andere tpl bestanden wilt proppen, moet je bijv. in index_body.tpl gebruiken ja of in overall_header.tpl. Je moet ze dan wel gedefinieerd hebben in het bijbehorende php-bestand lijkt mij!
Inderdaad, dus als je ze in index_body.tpl wilt hebben moet je ze neerzetten in index.php. :)