Version: 1.1.1, by JoergZ
Developer Last Online: Dec 2012
Version: 3.5.0
Rating:
Released: 10-20-2005
Last Update: 10-31-2005
Installs: 16
Uses Plugins Template Edits
Code Changes Additional Files Is in Beta Stage
No support by the author.
Short Description
Unfortunately it is not possible in the standard-vB to use phrases in user profile fields. If you have only one language installed, this is no problem. But if you have more than one language on your board, this is bad.
With this hack, you can use phrases for user profile field title, description and select-options.
So you will have in the UserCP, in the meber-search and in the profile-view the text for user profile fields multilanguage. (See screenshots)
Though the main part of this hack is packed into a product, it is necessary to make some code-modifications, because there are new hooks necessary.
Requirements
vB 3.5 (Tested up to 3.5.1)
Installation-Time
approx. 15 - 20 minutes
Changes
Code-Modifications: 4
Template-Modifications: 3
New files: 1
Support
I have not marked the box "supported" because I am not always available and can answer in short time, but of course I will try helping you, if there are problems.
Open issues
When you get as administrator a mail, that a new user has registrated, in this mail, the phrase-converting is not implemented yet.
Updates
21.10.05: I have updated the hack. Now the phrases for the profile fields are shon correct on the registration page and in the AdminCP, when you add or search there a user. The ZIP-file contains a install-description for the new version, and a update-description, if you had already installed version 1.0
01.11.05: Update to 1.1.1: Bugfix for selection-options. They were interpreted always as phrase, even if you entered them as fix text. For updating only import the product and choose "Allow Overwrite" yes.
NOTE !!!
I marked "is in beta-stage" because I want to have first a feedback of some people, if this hack works on their board correct. Of course I have tested it on my installation, but you know, strange things can happen. When some people use this hack without problems, I will remove the beta-stage.
Please click if you have installed this hack, to get informations, if there are upadtes or corrections.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I think you can get rid of the file edit of class_dm_user.php:
The Return value of set_userfields seems to be only used in register.php, where it is accessible in Hook register_addmember_process before it is used in prhase newuser to inform moderators about the new user.
You must do the replacement there, as otherwise you could catch the wrong phrase anyway, as the moderators might use other languages than the user who is registering.
@Andreas: Thanks for the hint. But the change in class_dm_user.php I made, to get the correct error-message. Otherwise the error-message would say e.g.
Quote:
You may only select 1 option(s) for the $title_checkboxtest field.
I looked a lot around, but I did not found another point to replace the field-title with the text from phrase.
Moreover I forgot two things: The register-page and the AdminCP (If you add a user or search a user in the AdminCP. The phrases are not tranlated there.
I will add this, and publish an update on weekend.
specially for multilingual boards.. where the profile is important...
That's the reason, why I made it..
Concerning your problem: I have checked it, and it should work.. It works fine on my board, I only forgot, that I use it also in the memberlist
Please check via your AdminCP, if the plugin for the hook memberlist_fetch_prffld_hack exists and check, that you made the change in the memberlist.php
Which vB-version are you using ? I have not tested it on the latest 3.5.4 version.
If it is still not working for you, I will make on the weekend a test-installaton on a clean, new vB installation and check it.
First the good news:
on 3.54 board.. your hack does exactly what you told it to..
and that part works perfectly.. You can even search the memberlist with the text of the phrases in the advanced member search!!!! which I think is great!!!
But and that is the bad news:
The new hook in the memberlist is ONLY affecting the search...
it is within the
PHP Code:
// advanced search
if ($_REQUEST['do'] == 'search')
{
section...
The simple display (output of the memberlist) is above!!!!
and there, there is no hook..
but as I see it.. its more complicated.. than I thought because the title and the stored field content are replaced at different locations..
But again.. I only have 3.54 ... maybe it was different before...