Skip to content

cloudfaction/joomla_custom_user_field_shortcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Fields Shortcode Plugin

This Joomla plugin makes it possible to display values from custom user fields in content via shortcodes.

Usage

Use the following shortcode syntax in your articles, modules, or other content:

[CF FieldName]

Where "FieldName" is the name or title of the custom user field.

Examples

[CF Initials]
[CF MiddleName]
[CF LastName]
[CF PhoneNumber]
[CF CompanyName]

Installation

  1. Copy the customfields folder to plugins/content/customfields/
  2. Go to the Joomla administrator interface
  3. Navigate to Extensions > Manage > Discover
  4. Click "Discover" to find the plugin
  5. Install the plugin
  6. Go to Extensions > Plugins
  7. Search for "Content - Custom Fields Shortcode"
  8. Enable the plugin

Configuration

The plugin has several configuration options:

Basic Settings

  • Enable Plugin: Enable or disable the plugin
  • Guest Text: Text shown to guests (non-logged-in users)
  • Default Text: Text shown when the field is empty or does not exist
  • Allow HTML Output: Whether HTML is allowed in field values
  • Debug Mode: Shows error messages on the frontend

Advanced Settings

  • Processing Contexts: List of contexts where shortcodes are processed

Behavior

  • For Guests: Shortcodes are replaced by the configured guest text (or removed if empty)
  • For Logged-in Users: Shortcodes are replaced by the value of the custom field
  • If Field Does Not Exist: Shortcode is replaced by default text or remains unchanged
  • JSON Values: Values such as checkbox lists are automatically converted to comma-separated text

Requirements

  • Joomla 4.x or higher
  • Custom user fields must be created in Users > Fields

Security

  • All output is escaped by default (HTML is sanitized)
  • Only values from existing custom fields are shown
  • Guests do not have access to user data

Example Custom Fields

To use this plugin optimally, create custom fields by:

  1. Go to Users > Fields
  2. Click "New"
  3. Give the field a name such as "Initials"
  4. Configure the field as desired
  5. Use [CF Initials] in your content

Support

This plugin is developed for use in Joomla websites. For questions or issues, first check:

  1. Whether the plugin is enabled
  2. Whether the custom field has been created correctly
  3. Whether the user is logged in (for non-guests)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published