3.1 & 3.2 Extensions Database 3.1 / 3.2Username BBCode

<span class="qte-attr qte_31_32-qte">3.1.x &amp; 3.2.x</span>
User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 10 Chrome

Username BBCode

Post by dmzx »

Extension Name: Username BBCode
Author: dmzx

Extension Description:

Username BBCode with Group Colours.




Add class

Screenshots:
Select Username:

Image

Selected:
Image

Output:
Image

Extension Download:
Download-link
Username BBCode v1.0.1
Installation:
  1. Download the latest release.
  2. Unzip the downloaded release, and change the name of the folder to `username`.
  3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
  4. Copy the `username` folder to `/ext/dmzx/` if done correctly, you'll have the main extension class at
    (your forum root)/ext/dmzx/username/composer.json
  5. Navigate in the ACP to `Customise -> Manage extensions`
  6. Look for `Username BBCode` under the Disabled Extensions list, and click its `Enable` link.

User avatar

JohnDory
Donator
Donator
Posts: 20
Joined: 01 Apr 2015, 01:11
    Windows 7 Firefox

Re: Username BBCode

Post by JohnDory »

I have Advanced BBCode Box on my form and this stops yours from working :(
Cheers.

Mike.

User avatar

JohnDory
Donator
Donator
Posts: 20
Joined: 01 Apr 2015, 01:11
    Windows 7 Firefox

Re: Username BBCode

Post by JohnDory »

But it does work with Posting Buttons

User avatar

alfi0815
Users
Users
Posts: 120
Joined: 06 Jun 2015, 12:41
    Windows 7 Opera

Re: Username BBCode

Post by alfi0815 »

Hi,
on my Board not works.
I have this: phpBB • [CDB] Advanced BBCode Box 3.1
and your : phpBB • MODx commands - Contribution Details
with this:

Code: Select all

Change posting_editor_buttons_custom_tags_before.html in ext\dmzx\modxcommands\styles\prosilver\template\event to posting_editor_buttons_after.html
What can i do??

User avatar

alfi0815
Users
Users
Posts: 120
Joined: 06 Jun 2015, 12:41
    Windows 7 Opera

Re: Username BBCode

Post by alfi0815 »

Hello,
have the problem solved itself :
modxcommand changed > phpBB • [CDB] MODx commands
and usernameBBCode changed > .....template/event/posting_editor_buttons_after.html
that was it and works
:buigen:
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Username BBCode

Post by Solidjeuh »

How can I get this to work with QuickReply Reloaded?
https://www.phpbb.com/community/viewtop ... #p14154821

Image
Last edited by Solidjeuh on 12 Oct 2015, 21:22, edited 1 time in total.
Forum voor NL Extensie vertalingen ---> https://www.supportforum.be
----------------------------------------------------------------------------

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Username BBCode

Post by Sniper_E »

Solidjeuh wrote:How can I get this to work with QuickReply Reloaded?
I would like that also. I tried a few things to get it to work but I'm no dmzx.

I did not want that blank box showing up so to hide it until we get a solution...

Open: ext/dmzx/username/styles/prosilver/template/event/posting_editor_buttons_custom_tags_before.html

Change this line: <!-- IF not S_PRIVMSGS -->
To this: <!-- IF not S_PRIVMSGS and SCRIPT_NAME != "viewtopic" -->
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Username BBCode

Post by dmzx »

Open ext\tatiana5\quickreply\event\listener.php
Find This may be a partial find and not the whole line

Code: Select all

}

	/**
	* Lock post subject if the user cannot change it.
	*
	* @param object $event The event object
	* @return null
	* @access public
	*/
Add before Add these lines on a new blank line before the preceding line(s) to find

Code: Select all

$sql = "SELECT user_id, username, user_colour
			FROM " . USERS_TABLE . "
			WHERE user_type IN (" . USER_FOUNDER . ', ' . USER_NORMAL . ")
		ORDER BY username_clean";
		$result	= $this->db->sql_query($sql);
		while ($row = $this->db->sql_fetchrow($result))
		{
			$row['user_colour'] = (!empty($row['user_colour'])) ? $row['user_colour'] : '000000';
			$style_bold		 = ($row['user_colour'] == '000000') ? 'normal' : 'bold';
			$this->template->assign_block_vars('username_bb', array(
				'USERNAME_BB_BOLD'	=> $style_bold,
				'USERNAME_BB_VALUE' => '|#' . $row['user_colour'] . '|' . $style_bold . '|'. $row['user_id'],
				'USERNAME_BB_USER'	=> $row['username']
				)
			);
		}
		$this->db->sql_freeresult($result);
Make A file called ext_quickreply_editor_buttons_custom_tags_before.html and place it in ext\tatiana5\quickreply\styles\prosilver\template\event\ext_quickreply_editor_buttons_custom_tags_before.html
With this code in there:

Code: Select all

		 <select id="hide_username" onchange="username_copy();" style="font-size:11px;" title="Select Username">
		<option value="#" selected="selected" style="display: none">{L_SELECT_USERNAME}</option>
		<!-- BEGIN username_bb -->
		<option value="{username_bb.USERNAME_BB_VALUE}">{username_bb.USERNAME_BB_USER}</option>
		<!-- END username_bb -->
		</select>

		<script type="text/javascript">
		// <![CDATA[
		function username_copy(){
		var username_copy = '[username' + $('#hide_username').val() + ']'+ $('#hide_username option:selected').text() + '[/username]';
		document.forms['qr_postform'].message.value += username_copy;
		document.forms['qr_postform'].message.focus();
		return false;}
		// ]]>
		</script>
Clear the cache :wink:

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Username BBCode

Post by Solidjeuh »

Stupid question.. what should I place in that new file? :rolling:

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Username BBCode

Post by Sniper_E »

ext\tatiana5\quickreply\styles\prosilver\template\event\ext_quickreply_editor_buttons_custom_tags_before.html

Code: Select all

       <select id="hide_username" onchange="username_copy();" style="font-size:11px;" title="Select Username">
      <option value="#" selected="selected" style="display: none">{L_SELECT_USERNAME}</option>
      <!-- BEGIN username_bb -->
      <option value="{username_bb.USERNAME_BB_VALUE}">{username_bb.USERNAME_BB_USER}</option>
      <!-- END username_bb -->
      </select>

      <script type="text/javascript">
      // <![CDATA[
      function username_copy(){
      var username_copy = '[username' + $('#hide_username').val() + ']'+ $('#hide_username option:selected').text() + '[/username]';
      document.forms['qr_postform'].message.value += username_copy;
      document.forms['qr_postform'].message.focus();
      return false;}
      // ]]>
      </script>
I did this and the text would not enter in the textarea box.

I don't see an event in the ext_quickreply_editor_buttons_custom_tags_before
in the ext\tatiana5\quickreply\styles\prosilver\template\event\quickreply_editor_message_before.html template.
Do I have the correct files?
Last edited by Sniper_E on 13 Oct 2015, 08:03, edited 1 time in total.

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Username BBCode

Post by Solidjeuh »

I used that code, I see nicknames, but they do not copy in the textarea
Same problem as Sniper_E

Image
Last edited by Solidjeuh on 13 Oct 2015, 02:00, edited 1 time in total.

User avatar

Topic Author
dmzx
Founder
Founder
Posts: 6466
Joined: 13 Jan 2014, 21:45
    Windows 8 Firefox

Re: Username BBCode

Post by dmzx »

Add code for ext_quickreply_editor_buttons_custom_tags_before.html see Username BBCode

User avatar

Sniper_E
VIP
VIP
Posts: 1157
Joined: 14 Oct 2014, 19:01
    Windows 10 Firefox

Re: Username BBCode

Post by Sniper_E »

:thumbup: working.

User avatar

martin
Admin
Admin
Posts: 5105
Joined: 06 Apr 2014, 16:12
    Linux Chrome

Re: Username BBCode

Post by martin »

Dont see the point of an ext for quick reply phpbb has quick reply built in so why not add the bbcodes and smiley box to that ? i did on 3.0.X
Image

User avatar

Solidjeuh
Donator
Donator
Posts: 348
Joined: 13 Dec 2014, 02:40
    Windows 10 Firefox

Re: Username BBCode

Post by Solidjeuh »

dmzx wrote:Add code for ext_quickreply_editor_buttons_custom_tags_before.html see Username BBCode
Still not working on my forum, disabled and enabled extenstions and purged cache.. :wtf:

Post Reply Previous topicNext topic