A Solution to BBCode Username

Get help developing custom BBCodes or request one.
Post Reply
alexlupoz
Registered User
Posts: 3
Joined: Sat Feb 24, 2018 9:08 pm

A Solution to BBCode Username

Post by alexlupoz » Thu May 10, 2018 6:46 am

Hello!

I would like to share an option to who would like to have a BBCODE that shows the name of the current user with JQuery:

If your porject don't have JQuery, add this between <head></head> tags:

Code: Select all

<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
JS

Code: Select all

var usernameGlobals = $('#usernameGlobalsContainer').text();
$('.usernameGlobalsElement').text(usernameGlobals);
Place this in overall_header.html: => {phpbbfolder}/styles/prosilver/template/

Code: Select all

<span id="usernameGlobalsContainer" style="display: none;">{S_USERNAME}</span>
in BBCODE, create something like this:

Code: Select all

[mytagname][/mytagname]

Code: Select all

<span class="usernameGlobalsElement"></span>
I hope it helps :)

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: No registered users and 3 guests