nieuwste user
Geplaatst: 10 nov 2003, 22:41
Ik heb op mijn forum nieuwst user erop staan maar in welke SQL tabel kan ik dit vinden?
Code: Selecteer alles
//
// 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'];
}
Probeer anders effe deze hack: http://www.phpbbhacks.com/viewhack.php?id=1915relaxuhmichel schreef:ik krijg hem niet opgeroepen hoe moet ik da doen?
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
jouwpagina.php
#
#-----[ FIND ]------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------
#
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// End session management
//
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
// Newest User
'L_OUR_NEWEST_USER' => Ons nieuwste lid,
'NEWEST_USER' => sprintf('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL .
"=$newest_uid") . '">' . $newest_user . '</a>'),
#
#-----[ OPEN ]------------------------------------------
#
Het bestand waar je de username wilt zien......
#
#-----[ FIND ]------------------------------------------
#
De plek waar jij graag wilt dat de nieuwste user verschijnt.....
#
#-----[ AFTER, ADD ]------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>Ons nieuwste lid</b></span></td>
</tr>
<tr>
<td class="row1" align="center">
<span class="genmed">
<b>{NEWEST_USER}</b>
</span><br /></span><br /></td>
</tr>
</table>
<br />
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
Code: Selecteer alles
'L_OUR_NEWEST_USER' => Ons nieuwste lid,
Code: Selecteer alles
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// End session management
//
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain ranks information', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
// Newest User
'L_OUR_NEWEST_USER' => Ons nieuwste lid,
'NEWEST_USER' => sprintf('<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL .
"=$newest_uid") . '">' . $newest_user . '</a>'),
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>Ons nieuwste lid</b></span></td>
</tr>
<tr>
<td class="row1" align="center">
<span class="genmed">
<b>{NEWEST_USER}</b>
</span><br /></span><br /></td>
</tr>
</table>
<br />
Mijn fout, moest nog quote's bij....:relaxuhmichel schreef:krijg fout in deze regel
Code: Selecteer alles
'L_OUR_NEWEST_USER' => Ons nieuwste lid,
Code: Selecteer alles
'L_OUR_NEWEST_USER' => 'Ons nieuwste lid',
Kun je effe link naar de betreffende pagina geven?relaxuhmichel schreef:blijft in die regel fout geven
Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
language/lang_dutch/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]-----------------------------------
#
$lang['our_newest_user'] = 'Ons nieuwste lid';
Code: Selecteer alles
'L_OUR_NEWEST_USER' => $lang['our_newest_user'],
Code: Selecteer alles
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="catHead" height="25"><span class="genmed"><b>Ons nieuwste lid</b></span></td>
</tr>
<tr>
<td class="row1" align="center">
<span class="genmed">
<b>{NEWEST_USER}</b>
</span><br /></span><br /></td>
</tr>
</table>
<br />
Code: Selecteer alles
<table width="100%" cellpadding="2" cellspacing="1" border="0">
<tr>
<height="25"><b>Ons nieuwste lid</b>
</tr>
<tr>
<align="center">
<b>{NEWEST_USER}</b>
<br /><br />
</tr>
</table>
<br />