[CDB] ModBreak BBcode

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

[CDB] ModBreak BBcode

Post by Ger »

Extension Name: ModBreak
Author: Ger

Extension Description: Adds a BBcode for moderator remarks, only usable for moderators

Extension Version: 1.0.0

Requirements:
  • phpBB 3.2
  • PHP 5.4+
Features:
  • Add a BBcode for moderators to make an obvious remark in a post
  • Only useable for users with the m_ permission in the current forum (e.g.: moderators)
  • Non-moderators get the default error message for not being allowed to use this BBcode
  • Styling provided in extension, can be overwritten in your own CSS definitions
  • Usage: [mod={YOUR_USERNAME}]{YOUR_MESSAGE}[/mod] or [mod]{YOUR_MESSAGE}[/mod]
  • BBcode buttons aren't displayed in posting forms since it's only available for moderators.
Languages:
Language en and nl included.
It's only about the string in the heading, default being "Message from moderator ".
You can change this to your liking by going to the ACP -> Posting -> BBcodes -> mod= -> edit
Change the {L_MODBREAK_HEAD} at will.

Screenshots:
Image


Extension Download: https://www.phpbb.com/customise/db/exte ... eak_bbcode
Last edited by Ger on Mon Apr 24, 2017 12:25 pm, edited 4 times in total.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

bcurran3
Registered User
Posts: 119
Joined: Sat Aug 29, 2015 2:52 am

Re: [DEV] [3.2] ModBreak BBcode

Post by bcurran3 »

I like this. Thanks.

It works great for my admins and global moderators, but doesn't work for my local forum administrators. They are being told "You cannot use certain BBcodes: [mod]." Any advice on permissions or a bug?

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [DEV] [3.2] ModBreak BBcode

Post by Ger »

Hmm, I need to check that. I assumed that all moderators have the m_ permission, but assumption seems the be the mother of... you know :mrgreen:
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

User avatar
david63
Registered User
Posts: 17400
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: [DEV] [3.2] ModBreak BBcode

Post by david63 »

bcurran3 wrote:
Wed Feb 01, 2017 11:40 am
but doesn't work for my local forum administrators
An administrator does not, by default, have moderator permissions.
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [BETA] [3.2] ModBreak BBcode

Post by Ger »

I updated the extension. To update:
  1. Download the latest version
  2. Uninstall the current extension
  3. Remove the mod= BBcode from ACP -> Posting -> BBcodes
  4. Install the new version as usual
In this version, the BBcode is slightly altered to make the username attribute optional. When omitted, the heading is simply

"Message from moderator"
instead of
"Message from moderator Username".


david63 wrote:
Wed Feb 01, 2017 1:31 pm
An administrator does not, by default, have moderator permissions.
That wasn't the issue really. The check I made earlier only looked for global moderator permissions. I now do

Code: Select all

$this->auth->acl_get('m_', $this->request->variable('f', 0))
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

bcurran3
Registered User
Posts: 119
Joined: Sat Aug 29, 2015 2:52 am

Re: [BETA] [3.2] ModBreak BBcode

Post by bcurran3 »

Update installed.

NOTE TO OTHERS: Be sure to disable and delete data if you had previous one installed or ERRORS.

Asked local mod to test.

Will update with results.

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [BETA] [3.2] ModBreak BBcode

Post by Ger »

bcurran3 wrote:
Wed Feb 01, 2017 10:01 pm
NOTE TO OTHERS: Be sure to disable and delete data if you had previous one installed or ERRORS.
Did you follow my previous instructions?
Ger wrote:
Wed Feb 01, 2017 1:49 pm
To update:
  1. Download the latest version
  2. Uninstall the current extension
  3. Remove the mod= BBcode from ACP -> Posting -> BBcodes
  4. Install the new version as usual
Asked local mod to test.

Will update with results.
I'll be pleased to read the results. :)
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

bcurran3
Registered User
Posts: 119
Joined: Sat Aug 29, 2015 2:52 am

Re: [3.2][BETA] ModBreak BBcode

Post by bcurran3 »

I was reading through the Extensions in Development forum and realized....I never gave an update!

I just verified with one of my local mods today that it DOES indeed work now in his respective forum.

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Ger »

bcurran3 wrote:
Thu Feb 16, 2017 4:29 am
I was reading through the Extensions in Development forum and realized....I never gave an update!

I just verified with one of my local mods today that it DOES indeed work now in his respective forum.
Great, thank you for your feedback. :)
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

User avatar
Hartenheer
Registered User
Posts: 780
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Hartenheer »

I do not understand what to do.
See how to place message
Sorry English is not my native language :oops:
regards: Willem

https://bierfijnproevers.nl/bierforum

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Ger »

Provided that you have moderator permissions in the forum you place your post, you can either use:

Code: Select all

[mod=Hartenheer]Some random text[/mod]
or

Code: Select all

[mod]Some random text[/mod]
The only difference is that the blue bar on top of the modbreak has your name. So, in the Dutch language this would result in
Opmerking moderator Hartenheer
Please be polite!
resp
Opmerking moderator
Please be polite
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

User avatar
Hartenheer
Registered User
Posts: 780
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Hartenheer »

Ger wrote:
Thu Feb 23, 2017 2:05 pm
Provided that you have moderator permissions in the forum you place your post, you can either use:

Code: Select all

[mod=Hartenheer]Some random text[/mod]
or

Code: Select all

[mod]Some random text[/mod]
The only difference is that the blue bar on top of the modbreak has your name. So, in the Dutch language this would result in
Opmerking moderator Hartenheer
Please be polite!
resp
Opmerking moderator
Please be polite
I am an administrator and moderator. There is no special icon?
Sorry English is not my native language :oops:
regards: Willem

https://bierfijnproevers.nl/bierforum

User avatar
Ger
Recognised Extension Developer
Posts: 1934
Joined: Wed Jan 02, 2008 7:35 pm
Location: 192.168.1.100
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Ger »

There are no icons used.
My extensions:
Simple CMS, Feed post bot, Avatar Resize, Modbreak, Magic OGP, Live topic update, Modern Quote, Quoted Where (GDPR) and Autoresponder.
Newest: FAQ manager for 3.2

Like my work? Buy me a coffee to keep it coming. :ugeek:

-Don't PM me for support-

User avatar
Hartenheer
Registered User
Posts: 780
Joined: Fri Jan 23, 2015 12:23 pm
Location: The Netherlands
Name: Willem Hartman
Contact:

Re: [3.2][BETA] ModBreak BBcode

Post by Hartenheer »

Thanks it works well
Sorry English is not my native language :oops:
regards: Willem

https://bierfijnproevers.nl/bierforum

bcurran3
Registered User
Posts: 119
Joined: Sat Aug 29, 2015 2:52 am

Re: [3.2][BETA] ModBreak BBcode

Post by bcurran3 »

Hartenheer wrote:
Thu Feb 23, 2017 2:49 pm
I am an administrator and moderator. There is no special icon?


If you want an icon, it's real easy:

ACP/Posting/BBCodes/Add a new BBCode

BBCode usage: [mod={SIMPLETEXT;optional;defaultValue=}]{TEXT}[/mod]

HTML replacement: <p class="bbc_mod_head">{L_MODBREAK_HEAD}{SIMPLETEXT}</p><div class="bbc_mod_text">{TEXT}</div>

Help line: Message from moderator: [mod]message[/mod]

Group permissions: Administrators, Global moderators, + any custom

Locked

Return to “Extensions in Development”