- Description
-
Creates a @mention link to the named user's profile.
Can be used either on its own or as a drop-in replacement for the default BBCode used by the Simple Mentions extension.
Can be styled with the.mention
class. Some suggested styles to begin with:
Note that theCode: Select all
.mention { background: #1221; color: #235; font-size: 0.9em; height: 1.5em; border-radius: 0.75em; padding: 0 0.6em; display: inline-flex; align-items: center; font-weight: bold; }
_baseurl
parameter is not intended to be user-configurable; it's just a way of grabbing the forum's relative path if it's not the root URL. Worst case scenario if a user deliberately changes it is that you get a broken (but still internal) link.
- Author luo-ning
- Last updated Fri Mar 18, 2022 1:35 am
- Rating ( )
- Categories Text Formatting, Misc
Public performance attribution has been waived.
Settings
- BBCode Usage: Select all
[mention _baseurl={LOCAL_URL?}]{TEXT}[/mention]
- HTML Replacement: Select all
<a class="mention">@{TEXT}</a> <script data-baseurl="{LOCAL_URL}" data-username="{TEXT}">(function(script) { script.previousElementSibling.href = script.dataset.baseurl + 'memberlist.php?mode=viewprofile&un=' + encodeURIComponent(script.dataset.username); script.remove(); })(document.scripts[document.scripts.length - 1]);</script>
- Help Line: Select all
[mention]{username}[/mention]
-
- Revisions
- Version
- phpBB Version(s)
-
-
@mention profile link 1.0.0
- 1.0.0
- 3.3.x
-
Validation time: Mar 18, 2022 1:35 am
- BBCode Usage: Select all
[mention _baseurl={LOCAL_URL?}]{TEXT}[/mention]
- HTML Replacement: Select all
<a class="mention">@{TEXT}</a> <script data-baseurl="{LOCAL_URL}" data-username="{TEXT}">(function(script) { script.previousElementSibling.href = script.dataset.baseurl + 'memberlist.php?mode=viewprofile&un=' + encodeURIComponent(script.dataset.username); script.remove(); })(document.scripts[document.scripts.length - 1]);</script>
- Help Line: Select all
[mention]{username}[/mention]
-