php forum
php mysql forum
php mysql smarty
 
Topic Options
#207550 - 01/16/01 10:55 AM user list hack
PGPG Offline
Newbie

Registered: 12/15/00
Posts: 14
Does anybody know how to have the user list displayed, only for users who are actualy loged-in?<br />I do not want user list displayed for non users.<br /><br />Many thanks<br /><br />PG<br /><br />
_________________________
PG

Top
#207551 - 01/17/01 03:20 PM Re: user list hack [Re: Snorre]
Shalazar Offline
Member

Registered: 03/01/00
Posts: 214
Loc: AZ
Well, isn't that what the Who's Online link is for?<br /><br />---------<br />Shalazar<br />www.charisma-carpenter.com
_________________________
---------
Shalazar
www.charisma-carpenter.com

Top
#207552 - 01/17/01 03:36 PM Re: user list hack [Re: G5]
PGPG Offline
Newbie

Registered: 12/15/00
Posts: 14
Thanks for your reply<br /><br />Maybe I wasn't clear enough.<br /><br />I wish to have Userlist menu available only for loged in users.<br />eg the Userlist menu do not appear for Guests but is available once visitor is loged in (with a User status.)<br />Hope it makes sense..<br /><br />PG<br /><br />
_________________________
PG

Top
#207553 - 01/17/01 10:54 PM Re: user list hack [Re: Snorre]
Shalazar Offline
Member

Registered: 03/01/00
Posts: 214
Loc: AZ
I apologize for the misunderstanding. To do what you're asking only requires a minor change to the main.inc.php file.<br /><br />Around lines 272-295 of main.inc.php, change the following block of code:<br /><br />echo "<br /> <a href = \"$phpurl/login.php?Cat=$Cat\">$lang[CPRIV_MENU]</a><br /> $spacer<br /> <a href = \"$phpurl/online.php?Cat=$Cat\">$lang[WHO_ON]</a><br /> $spacer<br /> <a href = \"$phpurl/$language.php?Cat=$Cat\">$lang[FAQ_TEXT]</a><br /> $spacer<br /> <a href = \"$phpurl/logout.php?Cat=$Cat\">$lang[LOGOUT_TEXT]</a><br /> ";<br /> }<br /><br /> // -----------------------------<br /> // Are we showing the user list?<br /> <br /> if ($config['userlist']) {<br /> echo "<br /> $spacer<br /> <a href=\"$phpurl/showmembers.php?Cat=$Cat&page=1\">$lang[USER_LIST]</a><br /> ";<br /> }<br /> <br /> $this->close_table(); <br /> echo "<p>";<br /> }<br /><br />To the following:<br /><br /> echo "<br /> <a href = \"$phpurl/login.php?Cat=$Cat\">$lang[CPRIV_MENU]</a><br /> $spacer<br /> <a href = \"$phpurl/online.php?Cat=$Cat\">$lang[WHO_ON]</a><br /> $spacer<br /> <a href = \"$phpurl/$language.php?Cat=$Cat\">$lang[FAQ_TEXT]</a><br /> $spacer<br /> <a href = \"$phpurl/logout.php?Cat=$Cat\">$lang[LOGOUT_TEXT]</a><br /> ";<br /> // -----------------------------<br /> // Are we showing the user list?<br /> <br /> if ($config['userlist']) {<br /> echo "<br /> $spacer<br /> <a href=\"$phpurl/showmembers.php?Cat=$Cat&page=1\">$lang[USER_LIST]</a><br /> ";<br /> }<br /> <br /> <br /> }<br /><br /> $this->close_table(); <br /> echo "<p>";<br /> }<br /><br />Basically, you're moving the "Are we showing the user list" check into the block of code available to only those users logged in.<br /><br />Best of luck to you. I've tested it with php5.1.5 and it appears to work flawlessly.
_________________________
---------
Shalazar
www.charisma-carpenter.com

Top


Who's Online
0 registered (), 24 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Spell Check [beta]
by Bill B
Today at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Today at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Today at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Today at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks