<span class="qte-attr qte_31_32-qte">3.1.x & 3.2.x</span>
dmzx Online
Founder
Posts: 6549 Joined: 12 years ago
Post
by dmzx » 11 years ago
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: 11 years ago
Post
by alfi0815 » 11 years ago
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: 11 years ago
Post
by alfi0815 » 11 years ago
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.
Sniper_E
VIP
Posts: 1161 Joined: 11 years ago
Post
by Sniper_E » 10 years ago
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: 6549 Joined: 12 years ago
Post
by dmzx » 10 years ago
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
Users
Posts: 348 Joined: 11 years ago
Post
by Solidjeuh » 10 years ago
Stupid question.. what should I place in that new file?
Sniper_E
VIP
Posts: 1161 Joined: 11 years ago
Post
by Sniper_E » 10 years ago
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 10 years ago , edited 1 time in total.
Solidjeuh
Users
Posts: 348 Joined: 11 years ago
Post
by Solidjeuh » 10 years ago
I used that code, I see nicknames, but they do not copy in the textarea
Same problem as
Sniper_E
Last edited by
Solidjeuh 10 years ago , edited 1 time in total.
dmzx Online
Founder
Posts: 6549 Joined: 12 years ago
Post
by dmzx » 10 years ago
Add code for
ext_quickreply_editor_buttons_custom_tags_before.html see
Username BBCode
martin
Admin
Posts: 5139 Joined: 12 years ago
Post
by martin » 10 years ago
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
Users
Posts: 348 Joined: 11 years ago
Post
by Solidjeuh » 10 years ago
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..