Code Monkey home page Code Monkey logo

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

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?

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 :)

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?

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.

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?

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?

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

Unify migration

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

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.

Beta 1 release

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

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???

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

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.

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.

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).

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.

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.

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.

Use sql_freeresult after sql queries

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.

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.