Gossamer Forum
Home : Products : DBMan : Customization :

How can i display a list of new users on the login screen

Quote Reply
How can i display a list of new users on the login screen
How can i display a list of new users on the login screen? I don't want a link, but i want to create a small table that says newest members and has a list with each of the new members, with each name being a link to their listing.

------------------
Jonathan
jwilliam@umfort.cs.ecsu.edu
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
You've already got the "what's new" mod, right?

Instead of having the "what's new" link, add the following to sub html_home:

Code:
$in{'Date-gt'} = $new;
my ($status, @hits) = &query("view");
if ($status eq "ok") {
my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
print "These are the newest members:<P>";
for (0 .. $numhits - 1) {
%rec = &array_to_hash($_, @hits);
print qq|<a href="$db_script_link_url&$db_key=$rec{$db_key)&ww=1&view_records=1">$rec{'Name'}</a><br>|;
}
}

Be sure to change any of the text in bold above to match fields in your database.


------------------
JPD





Quote Reply
Re: How can i display a list of new users on the login screen In reply to
I am getting an error


Reason: syntax error at ./html.pl line 226, near "$db_key)"
syntax error at ./html.pl line 226, near ""$db_script_link_url&$db_key=$rec{$db_key)&ww=1&view_records=1">"



------------------
Jonathan
jwilliam@umfort.cs.ecsu.edu
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
There is a syntax error.

You have:

Code:
print qq|
<a href="$db_script_link_url&$db_key=$rec{$db_key)&ww=1&view_records=1">$rec{'Name'}</a><br>|;

It should be
print qq|
<a href="$db_script_link_url&$db_key=$rec{$db_key}&ww=1&view_records=1">$rec{'Name'}</a><br>|;

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited August 03, 1999).]
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
That is still giving me an error...


------------------
Jonathan
jwilliam@umfort.cs.ecsu.edu
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
Post the EXACT codes you are using and we'll try to help you.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
here it is

Code:
$in{'Date-gt'} = $new;
my ($status, @hits) = &query("view");
if ($status eq "ok") { my ($numhits) = ($#hits+1) / ($#db_cols+1);
my ($maxhits); $in{'mh'} ? ($maxhits = $in{'mh'}) : ($maxhits = $db_max_hits);
print "These are the newest members:<P>";
for (0 .. $numhits - 1) { %rec = &array_to_hash($_, @hits);
print qq|
<a href="$db_script_link_url&$db_key=$rec{$db_key}&ww=1&view_records=1">$rec{'Name'}</a><br>|; }
}

------------------
Jonathan
jwilliam@umfort.cs.ecsu.edu
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
Its working now, i don't know what happened but it is fine now!!!

------------------
Jonathan
jwilliam@umfort.cs.ecsu.edu
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
Great!

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
How do I make it into link? like the Whats new?

Quote Reply
Re: How can i display a list of new users on the login screen In reply to
nels, I need to know exactly what you want before I can tell you how to get it.

The mod we're talking about here shows the most recent records added to the database, which may or may be the same as the most recent users.


------------------
JPD





Quote Reply
Re: How can i display a list of new users on the login screen In reply to
I want to have a link on the footer that will link to display a list of new users that have registered.

How do I mod it?


Quote Reply
Re: How can i display a list of new users on the login screen In reply to
I can give you the code for a link that will give you a list of all the new records that were added. If that is the same as the new users that were registered, then you can have what you want.

There's a modification at

http://www.jpdeni.com/dbman/whatsnew.txt

that will give you the most recent records.

There are two parts to the modification. Try the first one first. If you are not getting the correct date, then use the second one.



------------------
JPD





Quote Reply
Re: How can i display a list of new users on the login screen In reply to
nels,

Why not add the codes into the admin_display sub-routine? That would allow you to see the information by clicking on the Admin Menu link. Just a suggestion.

Regards,

[This message has been edited by Eliot (edited August 05, 1999).]
Quote Reply
Re: How can i display a list of new users on the login screen In reply to
I would like to let my user know any new user that has register for an account.