The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Custom Form filter
I have a custom form that I want to use with an mod I'm working on and I'm trying to dynamically build an SQL statement depending on the selections made in the form. Does vbulletin have anything already built-in? What would be the best way to do this?
PHP Code:
|
#2
|
|||
|
|||
Well, I don't know if it's the best way, but if you look at admin/user.php in the section that starts with "if ($_REQUEST['do'] == 'find')", it's doing something similar in that there are a lot of possible fields you can fill in to search by. It calls fetch_user_search_sql() which is in adminfunctions_user.php, but it just pretty much goes through checkng all the options and adding to the sql as necessary.
|
#3
|
||||
|
||||
Quote:
Here's a short exerp of what I did: PHP Code:
|
#4
|
|||
|
|||
I think the other adminCP pages call construct_hidden_code() (in adminfunctions.php) to add fields to a list (that's kept in a global var). Then those fields will be output as <input type="hidden"... when print_submit_row() is called. That way those values will come back when the form on the second page is submitted.
|
#5
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|