Area51 @ 4seven.de

Mod Base and Testarea
It is currently 23 Feb 2025, 18:25

All times are UTC + 1 hour




Post new topic TOPIC_LOCKED  [ 1 post ] 
Author Message
PostPosted: 18 Dec 2011, 22:03 
Offline
Tiptop
Tiptop
User avatar

Joined: 11 Feb 2008, 11:49
Posts: 241
Get Newest X Users

This Snippet shows the newest x users instead of only 1

open

index.php

find

Code:
 // Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');         


after add


Code:
 // Get Newest X Users // 4seven 2009
// ----------------------------------------------------

    $sql = 'SELECT user_id, username, user_colour
        FROM ' . USERS_TABLE . '
        WHERE user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
        ORDER BY user_id DESC';
       
    $result = $db->sql_query_limit($sql, 5);

    if ($result){   

       while($row = $db->sql_fetchrow($result)){

    $template->assign_block_vars('newest_x_users', array(
   
      'NEWEST_X_USERS'    => sprintf($user->lang['NEWEST_USERS'], get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']))
     
          )
      );
   }
}

  $db->sql_freeresult($result);
 // ----------------------------------------------------
// Get Newest X Users // 4seven 2009               


open

language/de/common.php

find

Code:
     'NEWEST_USER'                => 'Unser neuestes Mitglied: <strong>%s</strong>',         


after add

Code:
     // Get Newest X Users // 4seven 2009
    'NEWEST_X_USERS_TEXT'        => 'Unsere neuesten 5 Mitglieder: ',
    'NEWEST_USERS'                => '<strong> %s &nbsp;</strong>',
    // Get Newest X Users // 4seven 2009             


open

styles/prosilver/template/index_body.html

find

Code:
 {NEWEST_USER}         


replace with

Code:
 <!-- {NEWEST_USER} -->{L_NEWEST_X_USERS_TEXT}<!-- BEGIN newest_x_users -->{newest_x_users.NEWEST_X_USERS}<!-- END newest_x_users -->         


clear all caches

_________________
Mod-Bot / Service-Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic TOPIC_LOCKED  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
[ Time : 0.009s | 22 Queries | GZIP : Off ]