How To Make the Postbit a User Option

  • Time
  • Show
Clear All
new posts
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73464
    • 6.0.X

    How To Make the Postbit a User Option

    (1) Create a new Custom Profile Field of the your choosing (yes/no / radio / select). I am going to use a single-selection menu for this demo. I put in two options "Top" and "Left". At the very bottom of the custom profile edit page, set the Display Page option to Options: Thread Viewing. Submit your new profile field.

    (2) Now you are redirected to your list of custom profile fields. Find the new field you selected and note its Name. Mine is called field66 for example.

    (3) Then I add a new plugin with the Hook Location 'global_start' and the following code:
    PHP Code:
    if ($vbulletin->userinfo['field66'] == 'Left')
    $vbulletin->options['legacypostbit'] = 1;
    Now everyone will default to top style but can choose left style in their User CP. You can adjust the code to default everyone to left style by enabling the vboption for legacy postbit and then changing the above code to:
    PHP Code:
    if ($vbulletin->userinfo['field66'] == 'Top')
    $vbulletin->options['legacypostbit'] = 0;
    Originally posted by Freddie Bingham.
    Last edited by Colin F; Wed 28 Dec '05, 12:26pm.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.