View Full Version : How do I add a Display Field to the Control Panel Find Box?
David Copeland
09-08-2001, 09:26 PM
In the Control Panel Find feature (Ver 2.0.3) , I have added
the following sorts:
[list=1]
Usergroupid
email
password
[/list=1]
Then I can choose below the sort window which items
I want to be Displayed in my sort.
All of the items are listed in the Display Option,
except Password
How do I add password to the Display Feature?
https://vborg.vbsupport.ru/external/2001/09/3.gif
David Copeland
09-09-2001, 11:08 PM
I'm not sure why my topic was moved to the Hack section,
and I'm not sure why the How Do I Forum Moderators could
not complete my request aftet they had started it!
The above sort fields are not hacks, but fields of VB data
already in the database. I was given a very short helpful
instruction in the other forum to have these fields show up in
the drop down menu of the Find feature in the Control
Panel.
Alll I'm asking for is to know how to let these fields show up!
What good is it for me to sort a field without seeing it?
Please forgive me, but no one at the other forum bothered
to use the VB copy redirect command on my topic. They
just did a straight move without any notice to me whatsoever. :(
David
Steve Machol
09-10-2001, 01:41 AM
I'm not sure who moved your threads, but I do believe the Hacks Requests forum is the proper place for them. As far as I can tell, both of your requests would requite hacking vB PHP scripts - hence 'Hack Requests'.
In this case, you would have to hack the admin/index.php script.
David Copeland
09-10-2001, 03:37 PM
I'm a novice at this. So where does my topic go from here?
Steve Machol
09-10-2001, 03:40 PM
I guess you just have to wait and hope that someone will do this hack for you.
Admin
09-10-2001, 03:47 PM
In user.php:
Replace
makeyesnocode("Display email address","displayemail",1);
with
makeyesnocode("Display email address","displayemail",1);
makeyesnocode("Display password","displaypassword",1);
By the way, you can make it
makeyesnocode("Display password","displaypassword",0);
if you don't want it to be selected by default.
Also replace
$users=$DB_site->query("SELECT user.userid,username,usergroupid,birthday,email,pa rentemail,coppauser,homepage,icq,aim,yahoo,signatu re,usertitle,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastpost) AS lastpost,posts,ipaddress,userfield.* FROM user,userfield WHERE $condition AND userfield.userid=user.userid ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
with
$users=$DB_site->query("SELECT user.userid,username,usergroupid,birthday,email,pa ssword,parentemail,coppauser,homepage,icq,aim,yaho o,signature,usertitle,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastpost) AS lastpost,posts,ipaddress,userfield.* FROM user,userfield WHERE $condition AND userfield.userid=user.userid ORDER BY $orderby $direction LIMIT $limitstart,$limitnumber");
Also replace
if ($displayemail==1) {
echo "<td><p><b><span class='tblhead'>Email</span></b></p></td>";
}
with
if ($displayemail==1) {
echo "<td><p><b><span class='tblhead'>Email</span></b></p></td>";
}
if ($displaypassword==1) {
echo "<td><p><b><span class='tblhead'>Password</span></b></p></td>";
}
And last but not least replace
if ($displayemail==1) {
echo "<td><p><a href='mailto:$user[email]'>$user[email]</a> </p></td>";
}
with
if ($displayemail==1) {
echo "<td><p><a href='mailto:$user[email]'>$user[email]</a> </p></td>";
}
if ($displaypassword==1) {
echo "<td><p>$user[password] </p></td>";
}
And there you have it. :)
P.S.
Why did you add the option to sort by password?
Just curious... :)
Steve Machol
09-10-2001, 03:52 PM
FireFly to the rescue! :)
Admin
09-10-2001, 03:55 PM
Hehe. :)
By the way steve, are you wanted dead or alive? (or both ;))
And most important, is there a reward?
Just wanted to know... *whistles*
Steve Machol
09-10-2001, 04:11 PM
Good questions! I'm wanted alive. of course - and you actually have to pay me the reward! ;)
Admin
09-10-2001, 04:18 PM
lol, pay you. :p
Anyway, David, if you want to display the passwords also when just clicking List all users, add this code
$displaypassword=1;
right after
$displayemail=1;
(in user.php of course :))
David Copeland
09-14-2001, 11:37 PM
You're one of the very few at this site that has helped me
so much in exacting detail! (Maybe everyone else is on vacation).
Again, many thanks for your generosity and patience with me.
David
Admin
09-15-2001, 07:07 AM
No problem! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.