Warning [2] Undefined array key "display_in_posts" - Line: 268 - File: inc/plugins/myshowcase/forum_hooks.php PHP 8.4.21 (Linux)
  1. errorHandler->error

    /inc/class_error.php:163

  2. errorHandler->error_callback

    /var/www/vendor/sentry/sentry/src/ErrorHandler.php:354

  3. Sentry\ErrorHandler->handleError

    /inc/plugins/myshowcase/forum_hooks.php:268

  4. MyShowcase\Hooks\Forum\showthread_start

    /inc/class_plugins.php:197

  5. pluginSystem->run_hooks

    /showthread.php:473

MP3 Audio - Custom Thread Field - ougcNetwork

   

Hi, here I’m going to share how to use add a custom thread field for users to upload MP3 files that users can play in threads.

For this tutorial, a single custom thread field is necessary.

xThreads Field
Next step would be us creating and configuring our xThreads field. We are going to create a file field using the following details:

  1. []Key: files_audio_mp3
    [
    ]Input Field Type: File
    []Valid File Extensions: mp3
    [
    ]Maximum File Size: 5000000 for 5 Megabytes
    []Allow multiple values for this field: Yes It is advised to never change this setting once the field is created.
    [
    ]Maximum Number of Values: 10 Maximum number of files to be allowed to be uploaded. Can be changed after creating the field.
    []Multiple Value Delimiter: (space)
    [
    ]Display Item Format:
    Code:
    <audio controls>
        <source src="{URL}" type="audio/mpeg">
        Your browser does not support the audio element.
    </audio>

  2. Save the field.

Any option not mentioned is to be configured as you see fit.

Attached Files

Thumbnail(s)