[CDB] Advanced Profile Fields Pack

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

[CDB] Advanced Profile Fields Pack

Post by javiexin » Fri Jul 17, 2015 8:02 pm

Extension Name: Advanced Profile Fields Pack
Author: javiexin

Extension Description:
This extension adds several new types of profile fields, plus other profile field features.

This is a continuation and extension over the previous "Multi Select Profile Fields" extension, found here:
viewtopic.php?f=456&t=2317026
This extension is a superset of the former, that is now obsolete, and should not be used any longer.

Current Version: 1.0.1 RC

Features:
0.0.1 DEV - Multi Select Profile Fields
  • New profile field type for Multiple Selection, that is, multivalued fields in user profiles
0.1.0 DEV - Advanced Profile Fields Pack
  • New profile field type for Uploaded Images. You may configure the folder to upload the images to, restrict size of uploaded picture and dimensions (minimum and maximum).
  • New profile field type for Image Selector. You may select an image from within all available in a specified folder, either from a dropdown or from a gallery presentation.
  • New profile field configuration option, that allows to specify that a profile field is not going to be shown in the profile field loops, but only with direct access, individually. Better for image positioning.
  • Integrates with a lot of new functionality that has been necessary to introduce in the core of phpbb profile field processing, like enabling, disabling and purging of profile field types.
1.0.0 BETA - Advanced Profile Fields Pack
  • Make the extension compatible with 3.2
  • Remove all dependencies from core changes that had not been accepted, using different coding approach
  • Use workarounds for core changes that will be implemented, but not yet finally approved; changes are "future proof": when the core change is implemented, it will be used automatically; if not, the extension workaround is used
1.0.0 RC - Advanced Profile Fields Pack
  • Minor cosmetic changes, submitted to CDB
1.0.1 RC - Advanced Profile Fields Pack
  • Minor changes from the validation team
  • Fixed Upload Image Profile Fields for 3.2, to use the new file services available
  • Resubmitted to CDB
NOTE: This extension does NOT require any core modification to work on 3.1.11 and 3.2.0.
If you want to use it in 3.1.10, it is possible, but you will have to insert an event (one line of HTML code) that has already been merged into the core, but not yet "published" in the 3.1 branch (it is in 3.2):
[ticket/14887] ACP profile step one lang specific event

NOTE 2: As of today (3.1.10 & 3.2.0) the following changes to the core were still pending: This extension is still under development (although advanced, and quite stable), so it might have minor errors or malfunctions:
DO NOT INSTALL ON LIVE BOARDS.

If you find an issue, or have questions, let me know here.

If you have ideas for improvements or new functionality, let me know. I will evaluate them and see if they are feasible to be implemented. However, one thing I have already evaluated and discarded is searching based on profile fields contents.

Download:
[RC] Version 1.0.1: https://github.com/javiexin/advancedpf/ ... .0.1rc.zip
Github Repository: https://github.com/javiexin/advancedpf

Installation:
  1. Unzip the downloaded file.
  2. Copy the whole contents of the unzipped folder in the ext/javiexin/advancedpf directory of your phpBB board, where you should see the main JSON file at (your forum root)/ext/javiexin/advancedpf/composer.json.
  3. Navigate in the ACP to Customise -> Manage extensions.
  4. Look for Advanced Profile Fields Pack under the Disabled Extensions list, and click its Enable link.
  5. You are done!.
Important: Only official release versions validated by phpBB should be installed on a live forum. Pre-release (beta, RC) versions are only to be used for testing on offline/development forums.
Last edited by javiexin on Thu Jun 01, 2017 6:16 pm, edited 11 times in total.

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Fri Jul 17, 2015 8:02 pm

Updating from a previous version of this extension:
The BEST WAY to update on a pure testing forum would be to DISABLE extension, and then DELETE DATA, remove all extension files, do a fresh install, and configure your test cases.
If you had this extension in your forum before, and you NEED TO KEEP DATA across versions (ie, defined profile fields and profile field values of new types), then make sure to read this and follow these instructions carefully!.
  1. DO NOT DISABLE THE EXTENSION
  2. Remove the contents of the ext/javiexin/advancedpf directory of your phpBB board, and then install there a fresh new copy of the new version; you should see the main JSON file at (your forum root)/ext/javiexin/advancedpf/composer.json.
  3. Now, with the new version in place, navigate in the ACP to Customise -> Manage extensions.
  4. Look for Advanced Profile Fields Pack under the Enabled Extensions list, and then Disable and Reenable it.
  5. You are done!.
Also, if you had this extension working before, you HAD HAD to update core: remember that THE NEW VERSION WORKS ON AN UNMODIFIED 3.1.11 or 3.2.0 CORE, so you should REMOVE all core file edits that you might have done to support previous versions of this (copy the original files in place). On 3.1.10, you should only add the event that is mentioned in the first post.
Last edited by javiexin on Sat Feb 04, 2017 2:53 pm, edited 3 times in total.

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Fri Jul 17, 2015 8:02 pm

Included in the package are also several example use cases that have attracted some attention.

Specifically, I have included TWO main examples:
  1. Clan Identifier

    In this example, it is demonstrated how to use this extension to add a "CLAN" to your profile, and show it in all relevant places.

    I have chosen the Game of Thrones House theme as the Clan. There are some images that represent these different Clans, stored in an images folder.

    These images are presented in all possible places where Profile Fields are shown: in the Member Profile, in the Memberlist, in the Viewtopic mini profile, and in the Private Message mini profile.

    Given that these elements are not positioned in standard event places, each one of them uses a small JavaScript to reposition it, and a few embedded CSS attributes to give them the right appearance.

    Of course, you will need to adapt all these (CSS, JS and HTML in events) if you want to reuse it, or if you want them in different styles.

    To use this example in your forum, simply copy all the contents of the contrib/example-clan folder (except the readme file) to the root of the extension folder, disable and re-enable the extension (to execute the migration file that installs the profile field), and then configure a few profiles assigning the "GoT House" to test behavior.

    To remove it, if you do not want to continue to use it, you will have to remove the created Profile Field ("jx_got_house"), and remove the files that you have copied.

    In the Profile, it looks like this:
    Image

    In the Memberlist, like this:
    Image

    And in Viewtopic mini-profile:
    Image
  2. Multiple ranks

    In this example, you may see how to use this extension to add multiple ranks to a single profile, showing them in most relevant places.

    There are two examples included, one to be positioned BEFORE the standard rank, and another to be positioned AFTER the standard rank. It may use any of the images in the images/ranks folder as additional ranks. I have tested this with the "Star Ranks 2.0.3" rank set downloaded from here:
    https://www.phpbb.com/customise/db/styl ... tar_ranks/
    The reason is that it has multiple rank images, both for regular ranks, administrative ranks and special ranks.

    These images are presented in most possible places where Profile Fields are shown: in the Member Profile, in the Memberlist, and in the Viewtopic mini profile. They are NOT shown in the Private Message mini profile, simply by choice, and to demonstrate the ability to select where to show them.

    These elements are positioned in new standard event places, that correspond to new events that have been requested for 3.1.6, and that are included in the changes performed to test this extension. No CSS and no JavaScript is used here. You may need to adapt this to fit your needs, specially for other styles where the events will not be present yet.

    To use this example in your forum, simply copy all the contents (except the readme file) of either of the contrib/example-rank* folders (or both if you want three ranks) to the root of the extension folder, disable and re-enable the extension (to execute the migration file that installs the profile field), and then configure a few profiles with the new additional ranks.

    To remove it, if you do not want to continue to use it, you will have to remove the created Profile Field(s) ("jx_rank_admin" and/or "jx_rank_extra"), and remove the files that you have copied.

    In the Profile, it looks like this:
    Image

    In the Memberlist, like this:
    Image

    And in Viewtopic mini-profile:
    Image
Last edited by javiexin on Fri Jul 17, 2015 9:36 pm, edited 1 time in total.

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Fri Jul 17, 2015 8:03 pm

Changelog

0.0.1 DEV - Multi Select Profile Fields
  • Fully integrated with the new profile fields coding schema of phpbb3.1.
  • No events used! Only class extensions and dependency injections!
  • No specific configuration for the extension is needed, just the same as for other (standard) profile fields.
  • Option to add profile fields to user profiles where multiple values may be selected from a list of pre-set options. These fields are configured globally, from the ACP, as any other Custom Profile Field, including the definition of the field, options, and visibility. Once defined, and depending on the options, each user (or admin) may fill in the value or values (during registration and/or from UCP). You may set a minimum and maximum number of options to be selected. The chosen values may be seen from the user profile, viewtopic's mini profile, memberlist, as any other profile field, as configured in the ACP.
  • Fully multi-language ready, you may enter values and explanations in multiple languages.
0.0.2 DEV - Multi Select Profile Fields
  • Multi selection profile fields support default value and no value configuration and management
  • If profile field is not required, minimum should not have effect (fix)
  • Use LANG string for value separation, better support of RTL languages (fix)
  • Show options in a single line (aesthetic)
0.0.3 DEV - Multi Select Profile Fields
  • Enable, disable and purge processing for the extension now manage properly the existing profile fields of this kind
0.1.0 DEV - Advanced Profile Fields Pack
  • New profile field type for Uploaded Images. You may configure the folder to upload the images to, restrict size of uploaded picture and dimensions (minimum and maximum).
  • New profile field type for Image Selector. You may select an image from within all available in a specified folder, either from a dropdown or from a gallery presentation.
  • New profile field configuration option, that allows to specify that a profile field is not going to be shown in the profile field loops, but only with direct access, individually. Better for image positioning.
1.0.0 BETA - Advanced Profile Fields Pack
  • Make the extension compatible with 3.2
  • Remove all dependencies from core changes that had not been accepted, using different coding approach
  • Use workarounds for core changes that will be implemented, but not yet finally approved; changes are "future proof": when the core change is implemented, it will be used automatically; if not, the extension workaround is used
1.0.0 RC - Advanced Profile Fields Pack
  • Minor cosmetic changes, submitted to CDB
1.0.1 RC - Advanced Profile Fields Pack
  • Minor changes from the validation team
  • Fixed Upload Image Profile Fields for 3.2, to use the new file services available
  • Resubmitted to CDB
Last edited by javiexin on Fri May 05, 2017 7:11 pm, edited 3 times in total.

User avatar
Mauron
Registered User
Posts: 342
Joined: Wed Jul 16, 2014 11:25 am

Re: [DEV] Advanced Profile Fields Pack

Post by Mauron » Fri Jul 17, 2015 10:19 pm

O: !

User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by Volksdevil » Fri Jul 17, 2015 10:39 pm

Javier,

If I currently have the original 'Multi-select profile fields' extension installed, will all the values carry over to this one? Both currently and in future dev?
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Fri Jul 17, 2015 10:43 pm

Volksdevil wrote:Javier,

If I currently have the original 'Multi-select profile fields' extension installed, will all the values carry over to this one? Both currently and in future dev?
viewtopic.php?p=14144846#p14144846

User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by Volksdevil » Fri Jul 17, 2015 10:53 pm

Great, I didn't get around to reading that. Brilliant work mate. I think I'll wait until the core file changes have been merged. I also added the fields separately so it will be a little more work for me...
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by supanet » Sat Jul 18, 2015 6:13 am

This is fantastic news, this extension dose what I have been asking for and more. :o
Excellent work javiexin look forward to testing it. 8-)

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by supanet » Sat Jul 18, 2015 2:46 pm

Hi mate still on testing this and so far looking good. :D

But just a small point in the image below I have added the VIP rank to a members profile and given it the name "Rank" but the name is now pushing the image to one side. :(
Would it be possible to have the name displayed above the image and even better would it be possible to leave "Field name/title presented to the user:" blank as some of my badges don't need a name as it is already stated on the badge what it stands for.

I tried leaving "Field name/title presented to the user:" blank but it just kicks me back to fill it in however you can leave the " Field description:" blank. :D

Image

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Sat Jul 18, 2015 3:23 pm

@supanet

What you describe is the standard behavior of Profile Fields.

To counter this effect, what I have done is provide a new profile field option, "Display field individually".
That option has the effect of treating the PF differently from the others in that it is NOT presented to the user in the standard way other PFs are, but it has to be positioned specifically via TEMPLATE EVENTS.

If you want to see how to do it, see the examples on Multi-Ranks, but in summary, and starting from where you are now:
- Set the field as "individual"
- Crete a styles/prosilver/template/event/the_event_where_you_want_it.html file within the extension folder
- Populate the file with the right code, including specific Profile Field variables

For the last two steps, you may copy the file https://github.com/javiexin/advancedpf/ ... after.html, and tweak it as needed (specially, change the name of the PF in all variables).

A side effect of this is that if you indicate a field is "individual", it will have the same effect everywhere it is displayed, so you will need to create an event file for every place where you want it displayed (memberlist_body, memberlist_view, viewtopic_body, and/or ucp_pm_viewmessage) and have it configured to display in each of these places by configuring the PF.

Hope this helps,
-javiexin

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by supanet » Sun Jul 19, 2015 8:18 am

Thanks for the reply.
Wile this is easy to do it dose seem like a lot of work if you have lots of ranks/badges to add when all I want it to do is look like the supporter one above or better still have an option not to display the field name (Rank)at all then it would line up with the one above. :idea:
Image

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Sun Jul 19, 2015 9:08 am

A lot of work selecting one option and copying or editing one file?
And why do you need to do it lots of times? Once per field, and normally, you will have one or two extra ranks...

Removing the label is something that cannot be done simply, as it is part of the standard profile field behavior from phpbb.

User avatar
supanet
Registered User
Posts: 234
Joined: Sat Dec 15, 2012 4:20 pm
Location: UK
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by supanet » Sun Jul 19, 2015 1:26 pm

Ok looked into this a bit more and after trying things out your way things now look ok. :D
Thanks for all your hard work on this, will keep testing but so far not had any issues. ;)

User avatar
javiexin
Code Contributor
Posts: 1157
Joined: Wed Oct 12, 2011 11:46 pm
Location: Madrid, Spain
Name: Javier
Contact:

Re: [DEV] Advanced Profile Fields Pack

Post by javiexin » Sat Jul 25, 2015 12:30 pm

Hello all,

I am now looking into additional functionality for Profile Fields, and these are some topics I have in mind, that I would like your opinion and prioritization on.
  1. BBcode enabled profile fields
  2. User search based on profile fields - will require significant core changes and new events
  3. Limit profile fields to certain users - profile fields that only apply to certain users, selectable by user group or by permission? still to be confirmed
  4. Profile field statistics - generate a new page (or multiple pages) with profile field statistics, how many users have/don't have a certain profile field, and other statistics depending on field type
  5. Full editor profile fields - text profile fields that will support full editing, including BBcodes, smilies, etc.
  6. Separation of profile field editing in UCP - add new UPC tab(s) to edit certain profile fields, grouped by topic
  7. Bar profile field type - setting up a min value, max value, and allowing the user/admin to enter his own value in it for percentages for example, could be used later on with some systems like points/cash - suggested by Yros
This list is a LONG list, and besides, most of these functionalities are quite complex to code, so there is no commitment to any of these, this is just a planned features list, that might be reduced or changed any time. And think that these will take significant time to cover these.

What I am asking from you is:
1) Prioritize among these options
2) Suggest new areas or functionalities (with use case examples please)

Thanks a lot,
-javiexin
Last edited by javiexin on Sat Jul 25, 2015 4:37 pm, edited 1 time in total.

Locked

Return to “Extensions in Development”