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 03-23-2006 01:38 PM

Hello Felix !

You are right, sorry. I have "cheated" in my board. I have in the memberlist a field "country", but it shows a flag. And the header comes not from the profile-field, I modified the template and use a phrase. :D

Quote:

Originally Posted by derfelix
but as I see it.. its more complicated.. than I thought because the title and the stored field content are replaced at different locations..

Maybe that's the reason, why it is not included yet ... :D

But I will have a look at the problem and if I have a solution, either release a new version or give the instruction how to have the fields in the memberlist. (But maybe I have no time before the weekend for this, so you have to wait 2 or 3 days).


Best regards

J?rg

derfelix 03-23-2006 02:13 PM

Thanx... guess what..

I got it working for me... :banana:

It was a little tricky though :rolleyes:

And as I am a newbie to vbulletin (used to hack only phpbb boards) i could never put this into a plugin..

(and as there allready was a fileedit.. i think this will cost less ressources)

ATTENTION I only tested it with the multiple checkbox example in your file..

so what i did:

first find in memberlist.php
PHP Code:

     if ($value['type'] == 'checkbox' OR $value['type'] == 'select_multiple')
     {
      unset(
$customfield);
      foreach (
$value['data'] AS $key => $val)
      {
       if (
$userinfo["$value[varname]"] & pow(2$key))
       {
        
$customfield .= iif($customfield', ') . $val;
       }
      }
     }
     else
     {
      
$customfield $userinfo["$value[varname]"];
     } 

and replace with:
PHP Code:

// ########### Lang hack part one ---start ########
     
if ($value['type'] == 'checkbox' OR $value['type'] == 'select_multiple')
     {
      unset(
$customfield);
      foreach (
$value['data'] AS $key => $val)
      {
       if (
$userinfo["$value[varname]"] & pow(2$key))
       {
        
$phraseprffld '';
        
$testforphrase substr(trim($val), 01); 
        if (
$testforphrase == '$'
        { 
         
$prffldphrase substr(trim($val), 1); 
         
$val $vbphrase[$prffldphrase]; 
        }
        
$customfield .= iif($customfield', ') . $val;
       }
      }
     }
     else
     {
      
$phraseprffld '';
      
$testforphrase substr(trim($userinfo["$value[varname]"]), 01); 
      if (
$testforphrase == '$'
      { 
       
$prffldphrase substr(trim($userinfo["$value[varname]"]), 1); 
       
$customfield $vbphrase[$prffldphrase]; 
      }
      else
      { 
       
$customfield $userinfo["$value[varname]"];
      } 
      
     }
// ########### Lang hack part one ---end ######## 

then find:
PHP Code:

   $customfield $customfield['title']; 

and ABOVE add:
PHP Code:

// ########### Lang hack part two ---start ########
   
$testforphrase substr($customfield['title'], 01);
   if (
$testforphrase == '$')
   {
    
$prffldtitle substr($customfield['title'], 1);
    
$customfield['title'] = $vbphrase[$prffldtitle];
   }
// ########### Lang hack part two ---end ######## 

Well for me it seems to work!!!!

Felix

BWJ 06-15-2007 10:55 PM

Does this hack work with 3.6.7?

BWJ 06-16-2007 12:20 AM

Unfortunately it didn't work for me:

I could see the check boxes in edit profile but when saving it gives this error:

Parse error: syntax error, unexpected T_GLOBAL, expecting '{' in /home/xxxxxxx/public_html/forums/includes/class_dm_user.php on line 972

when trying to access the member list it gives this error:

Parse error: syntax error, unexpected T_ELSE in /home/xxxxxxx/public_html/forums/memberlist.php on line 898

I didn't try derfelix's modification...

But the idea is great and useful! :)

KubisForce 08-10-2008 12:51 PM

Is there a newer version or does it work with vb 3.7?

JoergZ 08-10-2008 01:10 PM

I have not installed it on 3.7, but I doubt it will work. Sorry, there is no newer version. And I currently don't have time to work on a version for 3.7.

Br

Joerg


All times are GMT. The time now is 11:42 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.01156 seconds
  • Memory Usage 1,754KB
  • 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
  • (4)bbcode_php_printable
  • (1)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
  • (6)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