[ABD] CPF Group Search v.0.1.2

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

[ABD] CPF Group Search v.0.1.2

Post by 4_seven »

CPF Group Search

MOD-Title: CPF Group Search
MOD-Version: 0.1.2
MOD-Author: 4seven

Request by: cdodds
Request Thread: http://www.phpbb.com/community/viewtopi ... #p12842031

Request by: taiken
Request Thread: http://www.phpbb.com/community/viewtopi ... #p12571925

MOD-Description: Searching Custom Profile Fields by Groups

phpBB-Version: phpBB 3.0.x
phpBB-Languages: en
phpBB-Styles: prosilver

Download: http://www.4seven.de/forum/6test/viewto ... p=114#p114

Image

Image

Features:
- Search in all Custom Profile Fields
- Independent, slim search-engine using dbal
- ACP Option to set each CPF searchable/unsearchable
- Search in "Dropdown box" + "Boolean (Yes/No)" fields directly via click in pulldown
- Wildcards * and 'All Results' (just enter * in search field).
- Title tag with short explanation for each 'field type' in pulldown
- Switch to display results and values in board- or user-language
- Search Results shows all other CPF's
- Switchable Result Order
- Pagination, if more then x results.
- Users in CPF Search are showing in viewonline
- u_search acl rights to engine and template. If not given > trigger error
- No additional SQL-Querys to main board-files
- Cached SQL Querys
- No Fulltext-Index
- xhtml 1.0 strict

Screenshots:
CPF Search:
See Demo
Viewonline:
http://www.loaditup.de/files/586187.png
ACP:
http://www.loaditup.de/files/590714.png
http://www.loaditup.de/files/590716.png
http://www.loaditup.de/files/590717.png
http://www.loaditup.de/files/590718.png
Demo:
only one profile is set yet, but you can setup more
http://www.4seven.de/forum/media/index.php
eg. un: test / pw: testuser

- may check available fields and entrys before

- http://www.4seven.de/forum/media/member ... rofile&u=2

- Click on 'Search CPF' on the top right corner or use Direct Link
Fixes and Improvements in v.0.0.2
- All CPF Field Names in search results and result values for "Dropdown box, Boolean (Yes/No)" are now in Board-Language, instead of raw field-name.
- Switch to display results and values in board- or user-language.
- Search all "Dropdown box" and "Boolean (Yes/No)" fields directly via click in pulldown
- Pagination if more then x results.
- 'All Results' (just enter * in search field).
General Update v.0.1.0

- fix utf8 issues showing no results
- fix showing dropdown, but no bool active
- fix showing search box, but no field active
- fix empty pagination style, but no pagination present
- add admins only collation refresh for case insensitiv search*
- cleaning and improve code
Fixes/Improvements in v.0.1.1
- ACP Option to set each CPF searchable/unsearchable *
- Search Results shows all other CPF's **
- Switchable Result Order **
- Cached SQL Querys

* Request by pca_paul: http://www.phpbb.com/community/viewtopi ... #p12962936
----------------------
** Request #1 and #3 by Caeterra: http://www.phpbb.com/community/viewtopi ... #p12962216
** Request #2 comes in v0.1.2
Fixes/Improvements in v.0.1.2
- Adding group option to search engine
- Search shows results for chosen groups
- User group must not be the main group
- Registered user group is preselected
- Shows all memberships of result members
- Standard groups in board language
- Multiple groups select
- New 'Look and Feel'
- New Mod Name
General Info
The mod was splitted, bcs. of different needs by people:
CPF Group Search
CPF Member Search

To-Do/Requests:
- ?

Take also a look at CPF Member Search
Last edited by 4_seven on Wed Nov 23, 2011 6:15 pm, edited 85 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search

Post by 4_seven »

Note: All this Info and code you find also in search_cpf.php

CASE INSENSITIVE SEARCH INFO

BASE INFO

Code: Select all

		// Table Converting for case in-sensitive searching
		/* ###############################
		utf8_unicode_ci is *generally* more accurate for all scripts.
		For example, on Cyrillic block:
		utf8_unicode_ci is fine for all these languages:
		Russian, Bulgarian, Belarusian, Macedonian, Serbian, and Ukrainian.
		While utf8_general_ci is fine only for Russian and Bulgarian subset of Cyrillic.
		Extra letters used in Belarusian, Macedonian, Serbian, and Ukrainian are sorted not well. 
		################ */
CHANGE COLLATION
- put this in index.php
- call index.php and click 1 time F5
- after that, remove this edit

Code: Select all

if ($auth->acl_get('a_') && !empty($user->data['is_registered'])){
		$sql = 'ALTER TABLE ' . PROFILE_FIELDS_DATA_TABLE . '
		CONVERT TO CHARACTER SET utf8 
		COLLATE utf8_unicode_ci';
		$db->sql_query($sql);
CHANGE COLLATION INFO

Code: Select all

		/* ################
		So change 
		COLLATE utf8_unicode_ci 
		to 
		COLLATE utf8_generale_ci
		if needed.
		Set
		COLLATE utf8_bin
		if your language have no classic upercase letters or it makes no sense for your needs
		################ */
Last edited by 4_seven on Mon Jun 13, 2011 5:09 pm, edited 2 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search

Post by 4_seven »

[DEV] News
- CPF Names in pulldown are now in Board-Language, instead of raw field-name
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search

Post by 4_seven »

[DEV] News
- Optional activating of (unneeded) Field Types to search: "Dropdown box, Boolean (Yes/No)"
- Field Types "Textarea, Single text field, Date, Numbers" are always active
- Adding title-tag and short explanation to each Field Type in pulldown
- Adding u_search acl rights to engine and template.If not given > trigger error
- Showing User Avatar
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

v.0.0.1 released
read first post for further details..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
Jorup16
Registered User
Posts: 427
Joined: Sun Dec 14, 2008 5:13 am
Location: Guatemala
Name: Jorge

Re: [DEV] CPF Search v.0.0.1

Post by Jorup16 »

Nice idea! ;)
Spanish Translations for Ext phpBB :D - Traducciones al español para Ext phpBB :)
>>>>> https://github.com/Jorup16 <<<<<
trickoff
Registered User
Posts: 513
Joined: Mon Jan 07, 2008 12:23 am

Re: [DEV] CPF Search v.0.0.1

Post by trickoff »

love it! awesome work man =)
User avatar
heredia21
Registered User
Posts: 942
Joined: Sun Apr 18, 2010 6:14 pm

Re: [DEV] CPF Search v.0.0.1

Post by heredia21 »

Will it be available for subsilver2?
Best BlackBerry website for all users! BlackBerry News - http://blackberryempire.com
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

thx 4 laudation to Jorup16 and trickoff.
heredia21 wrote:subsilver2?
the edit in overall_header is pretty simple (just a link).
the mod template-file to copy is independent, so test it out.
seems to be easy, its just a little style change to subsilver2.
so header and footer are subsilver2 as well, if u copy to its template folder.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

Usability Improvement Update #1

- no need to use wildcard * in most cases at the begin and end to find partial matches
- now only mostly in or between words wildcard * is needed, to find partial matches

Examples

- You search for location: münchen (munich in english).
Before you use eg. *ü* to find münchen. now it suffices to enter

- You search for computer: ati
Before you use eg *at* to find ati. now it suffices to enter at ;)

Update-Instruction: http://4seven.kilu.de/forum/phpbb3/view ... f=28#p1975
Last edited by 4_seven on Sat Mar 05, 2011 4:41 pm, edited 3 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

- package is updated
- new screenshots added
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

[DEV] News v.0.0.2
- All CPF Field Names in search results and result values for "Dropdown box, Boolean (Yes/No)" are now in Board-Language, instead of raw field-name.
- Optional Switch to display results and values in board- or user-language.

update follows after some tests..
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

[DEV] News v.0.0.2
- Search all "Dropdown box" and "Boolean (Yes/No)" fields directly via click in extra pulldown
- No input 'by hand' anymore for this fields

Now you have absolute comfort to search in all kind of CPF Fields..

v.0.0.2 comes after some more tests (update will be easy. just upload two files. No code-changes in core)
Feel free to use the demo named in first post. New screenshots follows.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm

Re: [DEV] CPF Search v.0.0.1

Post by keith10456 »

Good work ;)
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] CPF Search v.0.0.1

Post by 4_seven »

thx, keith10456

[DEV] News v.0.0.2 (added)
- Pagination if more then x results.
- 'All Results' (just enter * in search field).
- Own Lang-file

Pagination was the last heavy code part, bcs. genuine phpbb pagination is not very well documented.
I think now it's done. Cleaning Code a bit, then adding to Demo-Board.

search in Country field for *
Must be 3 results, so i set the limit for active pagination to 2 results.
I setup more profiles next time, so it is more active.
Current Mods | Mod Base | php(BB) programming | No help via PM

Return to “[3.0.x] Abandoned MODs”