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)

Eric 08-06-2006 10:00 PM

New Members Page
 
New Members Page

Updated to 1.0.2

This modification will produce a New Members page listing the username, avatar, and profile pic of the latest users sorted by joindate. The amount listed is based on an admin configurable limit. If the user has no avatar or profile pic, a default one is used.

Made by request: https://vborg.vbsupport.ru/showthread.php?t=122676

Installation
  • Import the product 'product-newmemberspage.xml'.
  • Upload newmembers.php to your forum root. Upload noavatar.gif and noprofilepic.gif to images/misc/. If you want to use your own remember that you will have to go into the admincp and give it's filename + size.
  • Options can be set in AdminCP -> vBulletin Options -> New Members Page

That's it your done.. aside from linking to the newmembers page. Here's an example of adding it to the navbar:

Open the 'navbar' template.

FIND
HTML Code:

<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
AFTER, ADD
HTML Code:

<td class="vbmenu_control"><a href="newmembers.php$session[sessionurl_q]">$vbphrase[newmembers]</a></td>
Upgrading
  • Re-import the product 'product-newmemberspage.xml' with "Allow Overwrite" set to yes.
  • Re-upload & overwrite newmembers.php.

Changelog
  • 1.0.2 - Re-added the 'cutoff'. It is based on an admin set number of days.
  • 1.0.1 - Removed the time restriction: 'cutoff'. Cleaned up the newmembers_results template.

WOL & Joindate
If you want New Members Page on WOL and/or display joindate on the New Members Page, make the edits in the following posts:

https://vborg.vbsupport.ru/showpost....6&postcount=26
https://vborg.vbsupport.ru/showpost....7&postcount=29

Make sure you click INSTALL if you use this modification.

Enjoy!

lightwave 08-07-2006 05:38 AM

can the settings be changed so it displays the latest registrations the past 7 days, or 3 days, etc?

shaynehammy 08-07-2006 07:18 AM

It would be brilliant if we could choose a time frame ie 7 days etc. Can this be added?

Stifmeister2 08-07-2006 02:37 PM

Even better if it would display, let's say latest 10 or 20 registrations, no matter when they registered. :)


No "time restrictions", just 10 or 20 latest registrations. With those changes this would rock a lot.

The Chief 08-07-2006 05:07 PM

I love this, but there seems to be a problem, wouldn't it be best if the latest registered users appear on front page and not last page?

Thanks, hope it gets fixed soon :D

/clicks install ;)

Eric 08-07-2006 06:18 PM

Ok, i'll see about making those changes ;)

The Chief 08-07-2006 06:58 PM

Quote:

Originally Posted by SecondV
Ok, i'll see about making those changes ;)

Let us know when there ready ;)

Here's a demo if you want to put it up :)

http://forums.myetalk.com/newmembers.php

The Chief 08-09-2006 02:49 PM

any news on the update Second?

Eric 08-10-2006 01:16 AM

Quote:

Originally Posted by The Chief
any news on the update Second?

I'll try to start working on it tonight, and see what I come up with.
Quote:

No "time restrictions", just 10 or 20 latest registrations. With those changes this would rock a lot.
This is what i'll be doing ^ Except the limit will rely on what you set in the admincp ;)

--

Here is what I have (giving ya'll the chance to ask for anything else before I upload the update):

The 'cutoff' was removed. Users shown on the New Members Page are now sorted by their joindate (DESC) with the amount shown based on $vbulletin->options['newmembers_limit'].

The Chief 08-10-2006 01:52 AM

Quote:

Originally Posted by SecondV
I'll try to start working on it tonight, and see what I come up with.

This is what i'll be doing ^ Except the limit will rely on what you set in the admincp ;)

--

Here is what I have (giving ya'll the chance to ask for anything else before I upload the update):

The 'cutoff' was removed. Users shown on the New Members Page are now sorted by their joindate (DESC) with the amount shown based on $vbulletin->options['newmembers_limit'].

Lookin good, you have multiple pages I hope? :D

Eric 08-10-2006 02:02 AM

Quote:

Originally Posted by The Chief
Lookin good, you have multiple pages I hope? :D

Yes - still shown on multiple pages :p

Also, removed all that code from the template; and worked that out in newmembers.php
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"><if condition="$avatarurl != '&nbsp;'"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else /><img src="$stylevar[imgdir_misc]/$vboptions[newmembers_defaultav]" width="$vboptions[newmembers_defaultavw]" height="$vboptions[newmembers_defaultavh]" border="0" alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></if></td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass"><if condition="$newmembers[profilepic] != '&nbsp;'">$newmembers[profilepic]<else /><img src="$stylevar[imgdir_misc]/$vboptions[newmembers_defaultpic]" alt="" title="$newmembers[username]'s picture" width="$vboptions[newmembers_defaultpicw]" height="$vboptions[newmembers_defaultpich]" border="0" /></if></td></if>
</tr>

Down to
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>
</tr>

So, that'll do it I guess ;) Unless I can think of anything or you want something else.

The Chief 08-10-2006 02:39 AM

Quote:

Originally Posted by SecondV
Yes - still shown on multiple pages :p

Also, removed all that code from the template; and worked that out in newmembers.php
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"><if condition="$avatarurl != '&nbsp;'"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else /><img src="$stylevar[imgdir_misc]/$vboptions[newmembers_defaultav]" width="$vboptions[newmembers_defaultavw]" height="$vboptions[newmembers_defaultavh]" border="0" alt="<phrase 1="$newmembers[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></if></td></if>
        <if condition="exec_switch_bg()"><td class="$bgclass"><if condition="$newmembers[profilepic] != '&nbsp;'">$newmembers[profilepic]<else /><img src="$stylevar[imgdir_misc]/$vboptions[newmembers_defaultpic]" alt="" title="$newmembers[username]'s picture" width="$vboptions[newmembers_defaultpicw]" height="$vboptions[newmembers_defaultpich]" border="0" /></if></td></if>
</tr>

Down to
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>
</tr>

So, that'll do it I guess ;) Unless I can think of anything or you want something else.

Well let me install the new version and test it out :)

Thanks much!

(is the new one uploaded?)

Eric 08-10-2006 02:56 AM

Quote:

Originally Posted by The Chief
Well let me install the new version and test it out :)

Thanks much!

(is the new one uploaded?)

Getting ready to :)

hbalagh1 08-10-2006 05:30 AM

Great job Eric....

Eric 08-10-2006 05:55 AM

Quote:

Originally Posted by hbalagh1
Great job Eric....

Thanks Heather :)

The Chief 08-10-2006 06:53 PM

Some few errors I would like to point out.

- First, in the admincp, you have wrote Default Avatar twice, when the other one should be called Default Profile Picture.

- Second, The New members page has 1700 pages, all until my account, can't it cut off after a certain number of days?

Thanks much!!

Charles
myetalk.com

Eric 08-10-2006 08:23 PM

Quote:

Originally Posted by The Chief
Some few errors I would like to point out.

- First, in the admincp, you have wrote Default Avatar twice, when the other one should be called Default Profile Picture.

- Second, The New members page has 1700 pages, all until my account, can't it cut off after a certain number of days?

Thanks much!!

Charles
myetalk.com

Eek..let me take a look into that

Eric 08-10-2006 09:32 PM

Updated to 1.0.2

Stifmeister2 08-11-2006 03:06 PM

Thanks dude!!! :)


*installs*

Stifmeister2 08-11-2006 03:36 PM

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

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

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

Eric 08-31-2006 03:46 AM

Quote:

Originally Posted by Stifmeister2
It works now. Thanks man. Really I appreciate this. ;)

Hey, no problem :)

If ya'll want anything else added to it, let me know.

htscpl 09-01-2006 10:46 AM

Nice hack, ** clicks install **. I have one request: How can I make the profile pics smaller. The default size for those who have no profile pic is good but the size for those that do is kind of large for the page? Any suggestions or help with that would be great.

Thanks,
Henry :D

The Chief 11-02-2006 03:03 PM

Does this work with vB 3.6?

Eric 11-03-2006 07:33 PM

I've not had the time to take a look in 3.6

I'll try to do that sometime this weekend.

criscokid 01-21-2007 01:42 PM

Suggestion for future version:

Create an 'external block' to allow this to be shown on a vbPortal page - like Myspace's 'Cool New People' block.

Eric 05-26-2007 04:08 AM

That's a nice idea. :) Here in a few weeks I'll be updating all of my modifications.. I'll see about doing that.

Stifmeister2 05-26-2007 04:35 PM

Quote:

Originally Posted by SecondV (Post 1110177)
I've not had the time to take a look in 3.6

I'll try to do that sometime this weekend.

I can save your time and tell you that it does work on my 3.6 board. :)


All times are GMT. The time now is 04:55 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.01673 seconds
  • Memory Usage 1,911KB
  • 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
  • (12)bbcode_html_printable
  • (10)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (37)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete