Posting Buttons

<span class="qte-attr qte_32_33-qte">3.2.x & 3.3.x</span>
User avatar

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

Re: Posting Buttons

Post by Sniper_E »

Then copy that second file to ext_quickreply_transform_text_buttons_after.htm
and do the css edit only if you get two posting button rows showing.

I must have an old copy of posting buttons.

[ Post made via Samsung Galaxy S5 Active ] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

mike
Users
Users
Posts: 6
Joined: 06 Jul 2015, 13:56

Re: Posting Buttons

Post by mike »

Sniper_E wrote: 23 Aug 2017, 15:30 Then copy that second file to ext_quickreply_transform_text_buttons_after.htm
I don't have that file either.

The only two files I have in /forums/ext/dmzx/postingbuttons/styles/prosilver/template/event are:

overall_header_head_append.html and posting_editor_buttons_before.html.

User avatar

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

Re: Posting Buttons

Post by Sniper_E »

Sniper_E wrote: 23 Aug 2017, 15:30 Then copy that second file to ext_quickreply_transform_text_buttons_after.htm
That second file would be the posting_editor_buttons_before.html
Make a copy of that file and name it ext_quickreply_transform_text_buttons_after.htm

[ Post made via Samsung Galaxy S5 Active ] Image
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

mike
Users
Users
Posts: 6
Joined: 06 Jul 2015, 13:56

Re: Posting Buttons

Post by mike »

OK. I think it'll be easier to just wait for this guy to release his fix (though I had hoped dmzx would've provided an official solution...).

Either way, thanks for your time and help. :tumbsyes:

User avatar

Galixte de EzCom
Users
Users
Posts: 39
Joined: 04 Mar 2015, 17:26

Re: Posting Buttons

Post by Galixte de EzCom »

See ADDONs for “Posting buttons” with “QuickReply Reloaded” and “Smilies scroll”, here: https://www.phpbb.com/customise/db/exte ... pic/179381. ;)
Communau EzCom
Image « Traductions d’extensions & styles pour phpBB 3.1.x & 3.2.x ».

User avatar

Topic Author
dmzx Online
Founder
Founder
Posts: 6429
Joined: 13 Jan 2014, 21:45

Re: Posting Buttons

Post by dmzx »

First post updated

User avatar

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

Re: Posting Buttons

Post by Sniper_E »

I have 5 ext that I'm updating for 3.3 and they all use your posting buttons. Thanks for updating dm!
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

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

Re: Posting Buttons

Post by martin »

I submitted my version of your version (twiged version and 3.2 3.3) guess i shall change my version to suit :rolling:
Image

User avatar

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

Re: Posting Buttons

Post by Sniper_E »

Looking at his files in this new release, it looks like your twig changes are in this version.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

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

Re: Posting Buttons

Post by martin »

Indeed they are but dm uses the ext to convert all html to twig any ways.
Image

User avatar

miri4ever
Users
Users
Posts: 71
Joined: 22 Jan 2017, 15:39

Re: Posting Buttons

Post by miri4ever »

I got 3 Questions on this:

1. How can I add own new Buttons from BBCodes / Extensions to this one ?

2. How can the Icons changed to Font Awesome Codes

3. How to Display only in MChat but not inside the normal Posting Editor ?

Thanks.

User avatar

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

Re: Posting Buttons

Post by Sniper_E »

miri4ever wrote: 14 Jun 2020, 14:301. How can I add own new Buttons from BBCodes / Extensions to this one ?
In your extension you would use a event name for your button code.
There are a few event names to choose from in the posting_editor_postingbuttons.html template.
dmzx_postingbuttons_posting_editor_buttons_prepend.html
dmzx_postingbuttons_posting_editor_buttons_append.html
dmzx_postingbuttons_posting_editor_buttons_custom_tags_before.html
2. How can the Icons changed to Font Awesome Codes
The font awesome icons are what is being used in the regular phpbb buttons.
Posting buttons and abbc3 buttons both use images. If you want icons then don't use this extension.
3. How to Display only in MChat but not inside the normal Posting Editor ?
Posting buttons are placed in the posting buttons on posting. mChat picks the buttons up from there.
But I'm sure a {% if SCRIPT_NAME != "posting %} could be used in this ext to make that happen.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar

miri4ever
Users
Users
Posts: 71
Joined: 22 Jan 2017, 15:39

Re: Posting Buttons

Post by miri4ever »

Well I managed the impossible. I rewrote the code for Font Awesome and added some Custombuttons by myself.

All edits only need to be done in posting_editor_postingsbuttons,html

If you want to use in MCHAT only because you having an external editor for yourself, please this in the first line of the file:

Code: Select all

{% if MCHAT_PAGE %}
And this to the very last

Code: Select all

{% endif %}
It might still appear in acp, but well this is not the problem so far. All change fpr Font Awesome Icons should work in posting editor too. I just can give you some examples how to do, if you need more support please ask me for more:

Search in File for:

Code: Select all

	{% EVENT dmzx_postingbuttons_posting_editor_buttons_prepend %}
And all buttons added after and the old lines got removed. I setup some permissions too, if users allowed to use this buttons or not: I show you an example for B, U, I used on most forums now:

Code: Select all

        {% if S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="font_awesome" value="&#160;" title="{{ lang('BBCODE_B_HELP') }}" /">
	<a onclick="bbstyle(0)";><i class="icon fa-bold fa-fw awesome_icon" aria-hidden="true"></i></a></button>
	{% endif %}

        {% if S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="font_awesome" value="&#160;" title="{{ lang('BBCODE_I_HELP') }}" />
        <a onclick="bbstyle(2)";><i class="icon fa-italic fa-fw awesome_icon" aria-hidden="true"></i></a></button>
	{% endif %}

        {% if S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="font_awesome" value="&#160;" title="{{ lang('BBCODE_U_HELP') }}" />
        <a onclick="bbstyle(4)";><i class="icon fa-underline fa-fw awesome_icon" aria-hidden="true"></i></a></button>
	{% endif %}
	
for snipes font awesome extension you can add this line anywhere in the code buttons:

Code: Select all

        {% if U_USE_FONT_AWESOME_BBCODE && S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="font_awesome" value="&#160;" title="{{ lang('FONT_AWESOME_HELP') }} {{ lang('FONT_AWESOME_ICONS') }}{{ lang('COLON') }} {{ FONTAWESOME_VALUE }} &bull; {{ lang('FONT_AWESOME_POPUP') }}{{ lang('COLON') }} {{ FONTAWESOME_WIDTH }}{{ lang('FONTAWESOME_PX') }} &times; {{ FONTAWESOME_HEIGHT }}{{ lang('FONTAWESOME_PX') }}">
	<a href="{{ U_FONTAWESOME }}" onclick="popup(this.href, {{ FONTAWESOME_WIDTH }}, {{ FONTAWESOME_HEIGHT }}, '_fontawesome'); return false;">
	<i class="icon fa-flag fa-fw awesome_icon" aria-hidden="true"></i></a></button>
        {% endif %} 
For the color button dropdown you need the following code

Code: Select all

        {% if S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="bbpalette" value="&#160;" title="{{ lang('BBCODE_S_HELP') }}" />
        <a onclick="change_palette()";><i class="icon fa-tint fa-fw awesome_icon" aria-hidden="true"></i></a></button>
	{% endif %}
If you use Snipers Table Extentsion then this line will help:

Code: Select all

        {% if U_USE_TABLES_BBCODE && S_BBCODE_ALLOWED %}
	<button type="button" class="button button-icon-only" name="font_awesome" value="&#160;" title="{L_TABLE_SELECTIONS_SHOW}">
	<a onclick="toggle_pb_table_selections();" title="{L_TABLE_SELECTIONS_SHOW}"><i class="icon fa-table fa-fw awesome_icon" aria-hidden="true"></i></a></button>
        {% endif %}
If you also want a dropdown box for selecting Fonts, you need to add this piece of code somewhere:

Code: Select all

        {% if S_BBCODE_ALLOWED %}
						<select class="bbcode-size" name="abbc3_font" onchange="bbfontstyle('[font=' + this.form.abbc3_font.options[this.form.abbc3_font.selectedIndex].value + ']', '[/font]'); this.form.abbc3_font.selectedIndex = 0" title="{{ custom_tag.BBCODE_HELPLINE }}">
							<option selected="selected" >{{ lang('ABBC3_FONT_BBCODE') }}</option>
							<optgroup label="{{ lang('ABBC3_FONT_SAFE') }}">
								<option style="font-family: Arial, sans-serif;" value="Arial">Arial</option>
								<option style="font-family: Arial Black, sans-serif;" value="Arial Black">Arial Black</option>
								<option style="font-family: Comic Sans MS, sans-serif;" value="Comic Sans MS">Comic Sans MS</option>
								<option style="font-family: Courier New, sans-serif;" value="Courier New">Courier New</option>
								<option style="font-family: Georgia, sans-serif;" value="Georgia">Georgia</option>
								<option style="font-family: Impact, sans-serif;" value="Impact">Impact</option>
								<option style="font-family: Times New Roman, sans-serif;" value="Times New Roman">Times New Roman</option>
								<option style="font-family: Trebuchet MS, sans-serif;" value="Trebuchet MS">Trebuchet MS</option>
								<option style="font-family: Verdana, sans-serif;" value="Verdana">Verdana</option>
							</optgroup>
							<optgroup label="{{ lang('ABBC3_FONT_FANCY') }}">
								<option style="font-family: Bradley Hand ITC, sans-serif;" value="Bradley Hand ITC" >Bradley Hand ITC</option>
								<option style="font-family: Century Gothic, sans-serif;" value="Century Gothic" >Century Gothic</option>
								<option style="font-family: Curlz MT, sans-serif;" value="Curlz MT">Curlz MT</option>
								<option style="font-family: cursive, sans-serif;" value="cursive">Cursive</option>
								<option style="font-family: fantasy, sans-serif;" value="fantasy">Fantasy</option>
								<option style="font-family: French Script MT, sans-serif;" value="French Script MT">French Script MT</option>
								<option style="font-family: Garamond, sans-serif;" value="Garamond">Garamond</option>
								<option style="font-family: Garamond Bold, sans-serif;" value="Garamond Bold">Garamond Bold</option>
								<option style="font-family: Goudy Stout, sans-serif;" value="Goudy Stout">Goudy Stout</option>
								<option style="font-family: Helvetica, sans-serif;" value="Helvetica">Helvetica</option>
								<option style="font-family: monospace, sans-serif;" value="monospace">Monospace</option>
								<option style="font-family: OCR A Extended, sans-serif;" value="OCR A Extended">OCR A Extended</option>
								<option style="font-family: Script MT Bold, sans-serif;" value="Script MT Bold">Script MT Bold</option>
							</optgroup>
							<optgroup label="{{ lang('ABBC3_FONT_WIN') }}">
								<option style="font-family: Lucida Console, sans-serif;" value="Lucida Console">Lucida Console</option>
								<option style="font-family: Lucida Sans Unicode, sans-serif;" value="Lucida Sans Unicode">Lucida Sans Unicode</option>
								<option style="font-family: Microsoft Sans Serif, sans-serif;" value="Microsoft Sans Serif">Microsoft Sans Serif</option>
								<option style="font-family: MS Mincho, sans-serif;" value="MS Mincho">MS Mincho</option>
								<option style="font-family: Palatino Linotype, sans-serif;" value="Palatino Linotype">Palatino Linotype</option>
								<option style="font-family: Symbol, sans-serif;" value="Symbol">Symbol</option>
								<option style="font-family: Tahoma, sans-serif;" value="Tahoma">Tahoma</option>
							</optgroup>
						</select>
        {% endif %} 
So it's possible to get this extension easy working with all kind of BBCodes on your forum to work with Font Awesome Buttons. If you got some more questions or how to add your custom BBCodes I may can offer some help.

User avatar

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

Re: Posting Buttons

Post by martin »

Your missing the point of this ext it's to replace the fa icons with images :rolling:

And if you wanted to to what you wanted you should have asked me i rewrote it along time ago to show both and it auto picks up bbcodes from acp.
buttons.png
You do not have the required permissions to view the files attached to this post.
Image

User avatar

Kaizen
New user
New user
Posts: 2
Joined: 18 Jun 2021, 00:59

Re: Posting Buttons

Post by Kaizen »

Hello,

Is it possible to make custom bbcodes appear as buttons just like the original bbcodes, and not in a drop-down list?

If this has been explained sorry I did not understand how to do it (I speak very little English)

Thank you

Post Reply