Coder Social home page Coder Social logo

phpbb-extensions / boardrules Goto Github PK

View Code? Open in Web Editor NEW
17.0 19.0 26.0 1.51 MB

Board Rules extension for phpBB

Home Page: https://www.phpbb.com/customise/db/extension/boardrules/

License: GNU General Public License v2.0

PHP 97.46% HTML 2.05% JavaScript 0.14% CSS 0.35%
phpbb-extension

boardrules's Introduction

phpBB Board Rules Extension

This is the repository for the development of the phpBB Board Rules Extension.

Build Status codecov Code Climate

Install

  1. Download the latest validated release.
  2. Unzip the downloaded release and copy it to the ext directory of your phpBB board.
  3. Navigate in the ACP to Customise -> Manage extensions.
  4. Look for Board Rules under the Disabled Extensions list, and click its Enable link.
  5. Set up and configure Board Rules by navigating in the ACP to Extensions -> Board Rules.

Uninstall

  1. Navigate in the ACP to Customise -> Extension Management -> Extensions.
  2. Look for Board Rules under the Enabled Extensions list, and click its Disable link.
  3. To permanently uninstall, click Delete Data and then delete the /ext/phpbb/boardrules directory.

Support

  • Important: Only official release versions validated by the phpBB Extensions Team should be installed on a live forum. Pre-release (beta, RC) versions downloaded from this repository are only to be used for testing on offline/development forums and are not officially supported.
  • Report bugs and other issues to our Issue Tracker.
  • Support requests should be posted and discussed in the Board Rules topic at phpBB.com.

Translations

  • Translations should be posted to the Board Rules topic at phpBB.com. We accept pull requests for translation corrections, but we do not accept pull requests for new translations.

License

GNU General Public License v2

boardrules's People

Contributors

alhitary avatar bonelifer avatar exreaction avatar galixte avatar humbledeer avatar imattpro avatar leinad4mind avatar marc1706 avatar michaelcullum avatar nickvergessen avatar nicofuma avatar paybas avatar phpbb-es avatar pico avatar pico88 avatar rxu avatar senky avatar tolga9009 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boardrules's Issues

HHVM Test Failures

The HHVM test failures are due to rule_entity_message_test.php
The tests die without reporting errors, so it's hard to tell what it is exactly, but it most likely has to do with get_message_for_storage/edit/display() functions. HHVM tests also fail on functional test btw.

Add better info to the delete rule confirmation text

Because deleting a category will also delete all rules within it, we should mention that to the user. So the delete rule confirmation text should read something like:

Are you sure you want to remove this rule?

Note: Removing a rule category will also remove all rules contained within it.

Unify migration

IMO, migration files should be unified before first final release.
m3_add_schema can be merged with m1_initial_schema

Require phing as a dependency for -dev

Now that a build script has been added, as per our discussion on irc with MichaelC my question is if we should require phing as a dependency for -dev.

ACP Module Permissions

So do we want to set up a unique permission for the ACP module (a_boardrules)?

Where module 'auth' => 'ext_phpbb/boardrules && acl_a_boardrules'

Or we could just use an existing ACP permission like acl_a_board (which I believe gives access to Full/Standard Admins only).

Where module 'auth' => 'ext_phpbb/boardrules && acl_a_board'

I guess my question is, who do we want to restrict access to editing/creating board rules to?

Composer.json issues

Since this extension is a learning example, I think our composer.json should be up to par.

having said that, the "username" fields in the author block are not part of the composer.json schema, so should be removed.

In my extensions I have typically added my username to my name field, e.g.:
"name": "Matt Friedman (VSE)",

Also, what is the story at the bottom with

"branch-alias": {
            "dev-master": "1.0-dev"

What does 1.0-dev refer to? And what branch alias? because the github branch is called master. So i'm confused by this line.

Wiki Guide

@EXreaction @pico88

I made a wiki entry here:
https://github.com/phpbb-extensions/boardrules/wiki/Board-Rules-Directory-Structure-and-Content-Guide

Since this extension is meant to be a learning model, I took the liberty of creating a guide explaining the purpose and usage of all the directories and files in this extension (since not everything can be explained just in code comments).

Some extra eyes on it would help in making sure it is accurate. Feel free to make edits to it as needed.

Notify Users of Board Rules Changes

How will we implement this feature?

Using the notifications system was mentioned in the discussions. But what if a board has over 10,000 members? Can the notification system handle creating 10,000 notifications???

Delete last rule issues with AJAX

When I delete the last remaining rule within a category and I click the closing-icon on the AJAX confirm message, an empty table of a few pixels is shown. (When I click the "Return to previous page" link, it's working fine).

SQL Error: Duplicate entry 'phpbb.boardrules.notification.type.boardrules' for key 'type' [1062]

Disabled the extension (don't know exactly which version I had), updated to master repo, tried to enable the extension again. Result ;)

SQL ERROR [ mysqli ]

Duplicate entry 'phpbb.boardrules.notification.type.boardrules' for key 'type' [1062]

SQL

UPDATE phpbb_notification_types SET notification_type_name = 'phpbb.boardrules.notification.type.boardrules', notification_type_enabled = 1 WHERE notification_type_name = 'boardrules'

BACKTRACE
FILE: [ROOT]/ext/phpbb/boardrules/migrations/v10x/m11_notification_type_update.php
LINE: 41
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\boardrules\migrations\v10x\m11_notification_type_update->update_notifications_name()

I could easily just delete the data, but I'm guessing others might encounter this error too.

RC1

Next logical step is to move this to RC which ideally we'd do in ~1 week. Hopefully we can get it to stable and release that at the same time as 3.1.

Use sql_freeresult after sql queries

gitattributes?

Should we have a gitattributes file?

Mainly just to prevent the following files which are unrelated to the actual extensions usage from being exported when anybody clicks download:
/tests/
.travis.yml
README.md

All rules disappeared

I noticed that all the rules that I have created yesterday are gone. When I try to re-create the rules with the same anchor I am getting an error message that the anchor is not unique (however I cannot access the rule by it's unique URL). The table notifications in the DB is also empty ...
In which table the rules are kept?

Any other ideas?

Make board rules explanation user customizable

We should be able to use the config_text field to make the Board Rules explanation user configurable from the Settings page.

Currently it is hard coded language

These rules are disclosed to clarify the various responsibilities of all community members here on yourdomain.com. They shall be adhered to by everyone to ensure that our board runs smoothly and provides a fun and productive experience for all of our community members and visitors.

While it's a good bit of text, is there any value in making it customizable for the admin?

Allow non-unique anchors between languages

Currently every anchor must be unique.

We should allow non-unique anchors between different languages. So, for example, the anchor rule-1 will link to "Rule 1" no matter which language the user is viewing the rules in.

An example scenario is where a user is using English, and he copies the link to a rule and gives the link to another user. But the other user is on another language, so the link currently won't work for them since in their language, the rule's anchor does not exist.

So we should only enforce unique anchors within the current language a rule is being created in.

Based on this report:
https://www.phpbb.com/customise/db/extension/boardrules/support/topic/153026

Ship with example data?

Kind of like phpBB does, would it help to install some sample data, say 1 category with 1 rule inside, just to help users see how it works? It may be more helpful than sending it out with nothing as we currently do.

Just something basic like:

Example Rule Category
    Example Rule
        This is an example rule in your Board Rules installation. Everything
        seems to be working. You may delete this rule and category and
        continue to set up your own board rules. Have fun :)

Require At Registration (desired feature)

I have not been able to find an elegant/efficient way to implement this.

My idea was simple enough. Append the following text to the bottom of the "Terms of Use" paragraph shown to users when attempting to register:

You agree to abide by the additional rules of this forum set forth in the following “Rules” section. View Board Rules.

So we'd need a template event in ucp_agreement.html

But we need to do a little work in the event listener, such as:

public function require_at_registration($event)
{
    $this->template->assign_vars(array(
        'S_BOARDRULES_AT_REGISTRATION' => ($this->config['boardrules_enable'] && $this->config['boardrules_require_at_registration']) ? true : false
        'BOARDRULES_REGISTRATION' => $this->user->lang('BOARDRULES_REGISTRATION', $this->controller_helper->url('rules')),
    ));
}

My question is regarding the event listener. We could just add the function to the page_header() core event, but I think we really only want this event listener to load when it is needed, which is only when a guest is on the register page.

So is it worth asking for a core event somewhere in ucp_register.php just for this purpose, or does anybody have any brighter ideas?

Change categories when editing a rule

It would be nice to have a categories pull-down field on the edit a rule page, so you can easily move a rule being edited into a new category. This should be something exactly like editing forums offers.

Beta 1 release

Anything else we must address before creating a Beta 1 release?

Problem with entity set_message_option function

PHP Notice: in file [ROOT]/ext/phpbb/boardrules/entity/rule.php on line 545: Undefined index: rule_message_bbcode_options

// If we're setting the option and the option is not already set
if (!$negate && !($this->data['rule_message_bbcode_options'] & $option_value))
{
    // Add the option to the options
    $this->data['rule_message_bbcode_options'] += $option_value;
}

First time through we are trying to add a value to something that does not exist.

Hide rule message when editing a category

The difference between rules and categories is not clear when editing one of those. For categories the "Rules message" textarea serves no purpose and should actually be hidden.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.