vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   New Members Page (https://vborg.vbsupport.ru/showthread.php?t=123260)

The Chief 08-11-2006 03:46 PM

Quote:

Originally Posted by Stifmeister2
Suggestion: Could you add "Join date" also? :p After "User Name" for example.

Like
"User Name" | "Join Date" | "Avatar" | "Profile Picture"

Meh, don't add to much stuff, I need to take it all off when it comes to templates at the end, I just needed the username and profile picture ;)

Stifmeister2 08-11-2006 04:05 PM

Ok ok it's not necessary, but I'd like it. :p If someone can give me some help how to do it myself I'd appreciate. ;)


Yet another question though. :p Does anyone know how to edit this? (SEE ATTACHED IMAGE)
It would really make this cool mod look even cooler if you could add a text like "Viewing Newest Members" or something like that instead of that "Unknown Locaton". :D

The Chief 08-11-2006 06:53 PM

Updated without a problem, keep up the good work :)

Eric 08-11-2006 10:15 PM

Quote:

Originally Posted by Stifmeister2
Ok ok it's not necessary, but I'd like it. :p If someone can give me some help how to do it myself I'd appreciate. ;)


Yet another question though. :p Does anyone know how to edit this? (SEE ATTACHED IMAGE)
It would really make this cool mod look even cooler if you could add a text like "Viewing Newest Members" or something like that instead of that "Unknown Locaton". :D

Sure, here in a little while I'll do that. And make a post with a way to add joindate ;)

Stifmeister2 08-12-2006 03:27 PM

Quote:

Originally Posted by SecondV
Sure, here in a little while I'll do that. And make a post with a way to add joindate ;)

LOL don't ask me I'm a n00b when it comes to coding. :p

Eric 08-15-2006 04:03 AM

Quote:

Originally Posted by Stifmeister2
LOL don't ask me I'm a n00b when it comes to coding. :p

For WOL, you'll need two plugins.

online_location_process:
PHP Code:

if ($filename == 'newmembers.php')
{
    
$userinfo['activity'] = 'newmembers';


online_location_unknown:
PHP Code:

if ($userinfo['activity'] == 'newmembers')
{
    
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'New Members');
    
$handled true;


For joindate; open newmembers.php and find:
PHP Code:

        $bgclass 'alt2'

Above that add:
PHP Code:

        $newmembers['datejoined'] = vbdate($vbulletin->options['dateformat'], $newmembers['joindate'], true); 

Edit the newmembers template, find
HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
        <td class="thead" align="$stylevar[left]" nowrap="nowrap">$vbphrase[username]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[avatar]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[profile_picture]</td>
</tr>

$newmemberbits
</table>

Replace with
HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
        <td class="thead" align="$stylevar[left]" nowrap="nowrap">$vbphrase[username]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[avatar]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[profile_picture]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[join_date]</td>
</tr>

$newmemberbits
</table>

Edit the 'newmembers_results' template. Replace everything with:
HTML Code:

<tr align="center">
        <td class="alt1Active" align="$stylevar[left]" id="u$newmembers[userid]"><a href="member.php?$session[sessionurl]u=$newmembers[userid]">$newmembers[username]</a></td>
        <if condition="exec_switch_bg()"><td class="$bgclass"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass">$newmembers[profilepic]</td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass">$newmembers[datejoined]</td></if>
</tr>

That should do it. Of course you can change the template around etc to get it where you want. :)

Stifmeister2 08-15-2006 11:13 AM

Quote:

Originally Posted by SecondV
For WOL, you'll need two plugins.

online_location_process:
PHP Code:

if ($filename == 'newmembers.php')
{
    
$userinfo['activity'] = 'newmembers';


online_location_unknown:
PHP Code:

if ($userinfo['activity'] == 'newmembers')
{
    
$userinfo['action'] = construct_phrase($vbphrase['viewing_x'], 'New Members');
    
$handled true;


For joindate; open newmembers.php and find:
PHP Code:

        $bgclass 'alt2'

Above that add:
PHP Code:

        $newmembers['datejoined'] = vbdate($vbulletin->options['dateformat'], $newmembers['joindate'], true); 

Edit the newmembers template, find
HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
        <td class="thead" align="$stylevar[left]" nowrap="nowrap">$vbphrase[username]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[avatar]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[profile_picture]</td>
</tr>

$newmemberbits
</table>

Replace with
HTML Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr align="center">
        <td class="thead" align="$stylevar[left]" nowrap="nowrap">$vbphrase[username]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[avatar]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[profile_picture]</td>
        <td class="thead" nowrap="nowrap">$vbphrase[join_date]</td>
</tr>

$newmemberbits
</table>

Edit the 'newmembers_results' template. Replace everything with:
HTML Code:

<tr align="center">
        <td class="alt1Active" align="$stylevar[left]" id="u$newmembers[userid]"><a href="member.php?$session[sessionurl]u=$newmembers[userid]">$newmembers[username]</a></td>
        <if condition="exec_switch_bg()"><td class="$bgclass"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass">$newmembers[profilepic]</td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass">$newmembers[datejoined]</td></if>
</tr>

That should do it. Of course you can change the template around etc to get it where you want. :)

Wow man thx, you rock!! :)

Stifmeister2 08-15-2006 01:01 PM

Hmm it says everyone has joined "01-01-1970".. :S

Eric 08-17-2006 01:01 AM

Quote:

Originally Posted by Stifmeister2
Hmm it says everyone has joined "01-01-1970".. :S

Let me take a look into that.

EDIT: oops, my bad :red:

Forgot to add something to the query, open newmembers.php and find:
PHP Code:

    $getnewmembers $db->query_read("
        SELECT user.userid, user.username, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight, customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "avatar AS avatar ON(avatar.avatarid = user.avatarid)
        LEFT JOIN " 
TABLE_PREFIX "customavatar AS customavatar ON(customavatar.userid = user.userid)
        LEFT JOIN " 
TABLE_PREFIX "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
        WHERE user.joindate >= 
$cutoff
        ORDER BY user.joindate DESC
        LIMIT " 
. ($limitlower 1) . ", $perpage
    "
); 

Replace with
PHP Code:

    $getnewmembers $db->query_read("
        SELECT user.userid, user.username, user.joindate, avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight, customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight
        FROM " 
TABLE_PREFIX "user AS user
        LEFT JOIN " 
TABLE_PREFIX "avatar AS avatar ON(avatar.avatarid = user.avatarid)
        LEFT JOIN " 
TABLE_PREFIX "customavatar AS customavatar ON(customavatar.userid = user.userid)
        LEFT JOIN " 
TABLE_PREFIX "customprofilepic AS customprofilepic ON (user.userid = customprofilepic.userid)
        WHERE user.joindate >= 
$cutoff
        ORDER BY user.joindate DESC
        LIMIT " 
. ($limitlower 1) . ", $perpage
    "
); 


Stifmeister2 08-17-2006 01:53 PM

It works now. Thanks man. Really I appreciate this. ;)


All times are GMT. The time now is 02:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01213 seconds
  • Memory Usage 1,803KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_html_printable
  • (10)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete