Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 05:31 pm EST
Geeklog Forums
Usability enhancements to system/lib-admin.php(ADMIN_list)
Status: offline
bitter
Forum User
Newbie
Registered: 10/23/06
Posts: 1
Hi All,
In writing a few plugins, I use the call ADMIN_list() quite often to generate a quick table with all the good-stuff, clickable headers, paging, search criteria: neat stuff. In writing these, I have made two changes that I would like to raise for consideration of inclusion to the core-code. If you agree, let me know the best way of submitting the changes.
Highlighting Search Terms for greater user feedback
I was lacking the ability to highlight the search term on the result set to help the user locate the information. I found COM_highlightQuery() and my prayers were answered. I changed:
to
Better Searching
When I enter a search term into ADMIN_list() the code behind it wants me to be exact, or use * to go for wild cards, so at the moment 'Aus' will not match 'Australia' unless I type 'Aus*'.
Not sure if I have really fixed this in the right place; it might be better to do so in the SQL, however I have done it in PHP. Comments appreciated if this is a bad thing.
to
so now we wildcard match.
Both of these updates to system/lib-admin.php(ADMIN_list) have made the usability of my plugins much better and I would like these changes to be considered for all GL users. It's now open to you for feedback and if you like it, tell me the process for submission.
Cheers.
In writing a few plugins, I use the call ADMIN_list() quite often to generate a quick table with all the good-stuff, clickable headers, paging, search criteria: neat stuff. In writing these, I have made two changes that I would like to raise for consideration of inclusion to the core-code. If you agree, let me know the best way of submitting the changes.
Highlighting Search Terms for greater user feedback
I was lacking the ability to highlight the search term on the result set to help the user locate the information. I found COM_highlightQuery() and my prayers were answered. I changed:
Text Formatted Code
line 390 : $fieldvalue = $A[$fieldname]; # yes, get its datato
Text Formatted Code
line 390 : $fieldvalue = COM_highlightQuery($A[$fieldname],$_REQUEST['q']); # yes, get its dataBetter Searching
When I enter a search term into ADMIN_list() the code behind it wants me to be exact, or use * to go for wild cards, so at the moment 'Aus' will not match 'Australia' unless I type 'Aus*'.
Not sure if I have really fixed this in the right place; it might be better to do so in the SQL, however I have done it in PHP. Comments appreciated if this is a bad thing.
Text Formatted Code
line 275 : $query = str_replace ('*', '%', $query);to
Text Formatted Code
line 275 : $query = '%' . $query . '%'; so now we wildcard match.
Both of these updates to system/lib-admin.php(ADMIN_list) have made the usability of my plugins much better and I would like these changes to be considered for all GL users. It's now open to you for feedback and if you like it, tell me the process for submission.
Cheers.
10
10
Quote
All times are EST. The time is now 05:31 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content