vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Using phrases in user profile fields (https://vborg.vbsupport.ru/showthread.php?t=98904)

JoergZ 10-20-2005 10:00 PM

Using phrases in user profile fields
 
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 https://vborg.vbsupport.ru/ if you have installed this hack, to get informations, if there are upadtes or corrections.

nexialys 10-21-2005 01:16 AM

great idea... i don't like single-language features...

Andreas 10-21-2005 03:23 AM

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.

JoergZ 10-21-2005 07:00 AM

@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.



J?rg

derfelix 03-22-2006 05:05 PM

well i just found another one..
in memberlist when you display the profilefields.. it shows the strings..
example in attachment...

but it works great in profile...

Felix

JoergZ 03-22-2006 05:09 PM

O.k., thanks for the hint. I don't know yet, if I will publish an official update, due to the low interest to the mod.

But I will have a look, and maybe can give a hint, how it can be fixed for the memberlist.

Best regards

Jörg

derfelix 03-22-2006 05:11 PM

thx..
i think its great..specially for multilingual boards.. where the profile is important...

Felix

JoergZ 03-22-2006 09:09 PM

Quote:

Originally Posted by derfelix
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 :D

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.



Best Regards

J?rg

derfelix 03-23-2006 03:30 AM

very strange..
its not working..
just checked.. everything is there..
the hook, the plugin... hmmm

i'm running 3.54

before you go into trouble.. i'll check this afternoon.. (my own little debug system.. ;) ) just to see what variables are passed..

I assume there is a collision with another hack.. but.. i couldnt imagine with wich.. hmmm

Felix

derfelix 03-23-2006 01:20 PM

Ok I looked into it..

And.. there is good and bad news...

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...

Felix


All times are GMT. The time now is 03:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete