<span class="qte-attr qte_31_32-qte">3.1.x & 3.2.x</span>
dmzx Online
Founder
Posts: 6466 Joined: 13 Jan 2014, 21:45
Post
by dmzx » 23 Apr 2015, 22:08
Extension Name: Username BBCode
Author: dmzx
Extension Description:
Username BBCode with Group Colours.
Add class
Screenshots:
Select Username:
Selected:
Output:
Extension Download:
Installation:
Download the latest release.
Unzip the downloaded release, and change the name of the folder to `username `.
In the `ext ` directory of your phpBB board, create a new directory named `dmzx ` (if it does not already exist).
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
Navigate in the ACP to `Customise -> Manage extensions`
Look for `Username BBCode ` under the Disabled Extensions list, and click its `Enable ` link.
alfi0815
Users
Posts: 120 Joined: 06 Jun 2015, 12:41
Post
by alfi0815 » 24 Jun 2015, 18:33
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??
alfi0815
Users
Posts: 120 Joined: 06 Jun 2015, 12:41
Post
by alfi0815 » 25 Jun 2015, 16:24
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
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Solidjeuh
Donator
Posts: 348 Joined: 13 Dec 2014, 02:40
Post
by Solidjeuh » 12 Oct 2015, 21:21
Last edited by
Solidjeuh on 12 Oct 2015, 21:22, edited 1 time in total.
Forum voor NL Extensie vertalingen ---> https://www.supportforum.be
----------------------------------------------------------------------------
Sniper_E
VIP
Posts: 1157 Joined: 14 Oct 2014, 19:01
Post
by Sniper_E » 12 Oct 2015, 23:17
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" -->
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™
dmzx Online
Founder
Posts: 6466 Joined: 13 Jan 2014, 21:45
Post
by dmzx » 13 Oct 2015, 00:04
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
Solidjeuh
Donator
Posts: 348 Joined: 13 Dec 2014, 02:40
Post
by Solidjeuh » 13 Oct 2015, 00:18
Stupid question.. what should I place in that new file?
Sniper_E
VIP
Posts: 1157 Joined: 14 Oct 2014, 19:01
Post
by Sniper_E » 13 Oct 2015, 01:54
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.
Solidjeuh
Donator
Posts: 348 Joined: 13 Dec 2014, 02:40
Post
by Solidjeuh » 13 Oct 2015, 01:58
I used that code, I see nicknames, but they do not copy in the textarea
Same problem as
Sniper_E
Last edited by
Solidjeuh on 13 Oct 2015, 02:00, edited 1 time in total.
dmzx Online
Founder
Posts: 6466 Joined: 13 Jan 2014, 21:45
Post
by dmzx » 13 Oct 2015, 07:54
Add code for
ext_quickreply_editor_buttons_custom_tags_before.html see
Username BBCode
martin
Admin
Posts: 5105 Joined: 06 Apr 2014, 16:12
Post
by martin » 13 Oct 2015, 10:12
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
Solidjeuh
Donator
Posts: 348 Joined: 13 Dec 2014, 02:40
Post
by Solidjeuh » 13 Oct 2015, 13:33
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..