Do not remember me!
/ / / Display newest registered user in your site

Display newest registered user in your site

This quick tip will show you how to display newest member in your site, this way you can use jquery or any kind message to welcome user in your site

REF: Display newest member in dle website Added by: in PHP Questions on
if you are using DLE 10.3 and older, open index.php
if you are using DLE 10.4, open engine/modules/main.php

Find:
if ( !$user_group[$member_id['user_group']]['allow_admin'] ) $config['admin_path'] = "";

Add after
$row = $db->super_query("SELECT name,user_id FROM " . PREFIX . "_users ORDER BY user_id DESC LIMIT 1") ;
$tpl->set( '{last-user}', stripslashes( $row['name'] ) );

If you want username with link then use
$row = $db->super_query("SELECT name,user_id FROM " . PREFIX . "_users ORDER BY user_id DESC LIMIT 1") ;
$tpl->set( '{last-user}', "<a onclick=\"ShowProfile('" . urlencode( $row['name'] ) . "', '" . urlencode( $row['name'] ) . "', '" . $user_group[$member_id['user_group']]['admin_editusers'] . "'); return false;\" href=\"" . urlencode( $row['name'] ) . "\">" . $row['name'] . "</a>" );

Now you can use tag in main.tpl or any theme files attached to main.tpl
Welcome our newest member: {last-user}
Answered by: dlefaq



+8

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.