Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Using phrases in user profile fields Details »»
Using phrases in user profile fields
Version: 1.1.1, by JoergZ JoergZ is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

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.

Comments
  #2  
Old 10-21-2005, 01:16 AM
nexialys
Guest
 
Posts: n/a
Default

great idea... i don't like single-language features...
Reply With Quote
  #3  
Old 10-21-2005, 03:23 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 10-21-2005, 07:00 AM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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
Reply With Quote
  #5  
Old 03-22-2006, 05:05 PM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 03-22-2006, 05:09 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 03-22-2006, 05:11 PM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Felix
Reply With Quote
  #8  
Old 03-22-2006, 09:09 PM
JoergZ JoergZ is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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
Reply With Quote
  #9  
Old 03-23-2006, 03:30 AM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 03-23-2006, 01:20 PM
derfelix derfelix is offline
 
Join Date: Nov 2001
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:37 PM.


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.04329 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete