Replace some characters in User Profile Field content (Many people should need it)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Basketmen
    Senior Member
    • Oct 2006
    • 195
    • 3.6.x

    Replace some characters in User Profile Field content (Many people should need it)

    I need to replace some characters in User Profile Field content,
    for example aaa to be bbb


    maybe there is two way, please help to make one of them or both works :




    1. i see in User Profile Field Manager, there is regex function, what is the regex function patern to search and replace there?




    2. or using a plugin with profile_updateprofile hook, but looks like below variable code in red are still wrong, so this is still not working


    $fieldcontentbefore = array(
    'aaa',
    'ccc'
    );

    $fieldcontentafter = array(
    'bbb',
    'ddd'
    );


    $vbulletin->user[$field] = str_replace($fieldcontentbefore, $fieldcontentafter, $vbulletin->user[$field]);
    Build community is not easy, its a very long game
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Help with modifying your code is given over on vbulletin.org, the modification site.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • Basketmen
      Senior Member
      • Oct 2006
      • 195
      • 3.6.x

      #3
      i am sorry then for methode no.2

      if that so i just will ask about methode no.1, please help guys, what is the regex function patern to search and replace, in profile fields?

      or do regex function can used for replacing too, instead for searching right?
      Build community is not easy, its a very long game

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...