PDA

View Full Version : Adding 'quick search' fucnctions to the admin CP


SemperFidelis
01-25-2003, 03:03 PM
Ok
Ive played around with this a bit now.
And Ive got a couple of questions.

1.
How do I get this code to actually return the templates searched for rather than the "Thats All Folks" message ?

// Additional Quick Searches
doformheader('template', 'get');
makehiddencode('action', 'modify');
makehiddencode('group', 'all');
makehiddencode('s', $session[sessionhash]);
maketableheader('User Tools');
makelabelcode('Quick Template Finder:', '<input type="text" name="name" size="23"> <span id="submitrow"><input type="submit" value=" Go "></span>');
dotablefooter();


2.
How do I incorporate my code above (once fixed) into this so it displays correctly just below the quick user search ?

$onlineusers = '<b>' . number_format($getmembers + $getguests) . '</b> (' . $members . ' and ' . $guests . ')';

doformheader('user', 'find');
makehiddencode('action', 'find');
makehiddencode('s', $session[sessionhash]);
maketableheader('User Tools');
makelabelcode('Quick User Finder:', '<input type="text" name="ausername" size="23"> <span id="submitrow"><input type="submit" value=" Go "></span>');
makelabelcode('Useful Links:', '<select onchange="jumpto(this.options[this.selectedIndex].value)">' .
'<option>&raquo; Select link...</option>' .
'<option value="http://www.vbulletin.com/">vBulletin Home Page</option>' .
'<option value="http://www.vbulletin.com/members/">vBulletin Members Area</option>' .
'<option value="http://www.vbulletin.com/forum/">vBulletin Support Forums</option>' .
'<option value="http://www.vbulletin.com/manual/">vBulletin Online Manual</option>' .
'<option>--------------------</option>' .
'<option value="http://www.php.net/">PHP Home Page</option>' .
'<option value="http://www.php.net/manual/">PHP Online Manual</option>' .
'<option value="http://www.mysql.com/">MySQL Home Page</option>' .
'<option value="http://www.mysql.com/documentation/">MySQL Documentation</option></select>');
maketableheader('Site Statistics');
makelabelcode('Online Users:', $onlineusers);



All the above refers to code in /admin/index.php
I am also thinking of adding other quick search options in a similar way.

Before I continue, I just want to learn if Im going about it the right way or not.
Any assistance would be greatly appreciated.

TECK
01-26-2003, 08:53 PM
The best way to learn is to look at adminfunctions.php for each function you see listed above, in your code.
In this way, you can understand better how to change the code.
You can also look at my hack, admin stats. Check my profile.

SemperFidelis
01-27-2003, 12:39 PM
Teck, thanks for the time you have taken to reply to my question.

I have looked at adminfunctions.php and I already have installed your adminstats hack (I thought you would have recognised the code I posted above actually).

And the code above is what I came up with.

The only problem is that it appears to do the search, but doesnt display the actual template I was searching for
:(

I assume there is just a simple error with the code, hence why I asked here for some assistance.