[XenConcept] Advanced Forum Rules

[XenConcept] Advanced Forum Rules [Paid] 2.0.6 Patch 3

No permission to buy ($15.00)

XenConcept

Well-known member
XenConcept submitted a new resource:

[XenConcept] Advanced Forum Rules - Nobody can read the forum content without their confirmations to read the forum rules.

This is a special add-on and specially fitted with some specific groups. When users click on any links in the site, they must confirm they have read the forum rules firstly.

Users could load and observe the threads/forums/posts if they have accepted that they have read the forum rules. This will be effective for some content of age limit or post with sensitive content.

FEATURES:
- Rules shown on separate page.
- Rules can be created on admin option.
- Options to force users to accept forum...

Read more about this resource...
 
The accept button is not working, it stays on disabled..
------------------------------
kgGtntI.png


I also can't change the wait time less then 10..

yuHOHyH.png
 
Last edited:
And when you reload the URL OR click on "Forum rules" (see screenshot) and then accept the rules you get: "Oops! We ran into some problems."

GsCn8nv.png
 
Thanks, works great after the update but when you refresh the page and accept the rules you still get an error page.


For non English users of this plugin go to:
js > xenconcept > advancedforumrules > counter.js

And change:
Code:
                    child.text(XF.phrase('Accept'));
To:
Code:
                    child.text(XF.phrase('Accept in your language'));
 
Hello do you have the same worries?

[E_NOTICE] Undefined index: excluded_usergroup
src/addons/XenConcept/AdvancedForumRules/Repository/AdvancedForumRules.php:69
 
Hello do you have the same worries?

[E_NOTICE] Undefined index: excluded_usergroup
src/addons/XenConcept/AdvancedForumRules/Repository/AdvancedForumRules.php:69

Hello,

I did not have a report for this error. Which version do you use?

Regards
 
Hello,

I did not have a report for this error. Which version do you use?

Regards
the last version I have not used a report but I talk to Entity I use the latest version but I think the problem and resolved by rebuilding the addons I come back to you if these not the case thanks for your help and addons
 
I'm a little bit confused with the "Excluded Forums" thing:

rule_edit-png.165401


If I get this right, you have to select the nodes where the rule won't be applied is that correct? I ask because in my case I want to force users to read specific per-node rules before creating new threads and I think that it will be easier if I just pick where I want the rules to be shown not the opposite (adding new nodes will require to edit the excluded forums over and over).
 
I'm a little bit confused with the "Excluded Forums" thing:

rule_edit-png.165401


If I get this right, you have to select the nodes where the rule won't be applied is that correct? I ask because in my case I want to force users to read specific per-node rules before creating new threads and I think that it will be easier if I just pick where I want the rules to be shown not the opposite (adding new nodes will require to edit the excluded forums over and over).

Hello,

Started using the latest version.

Regards
 
I took the screen from the resource page. I don't own a license for your resource, I don't know if it will fit my needs based on the descriptions and screenshots that I'm seeing in the resource product page.
 
I've found a bug in this resource (2.0.3)

Custom phrase for xc_advanced_forum_rules_accept is being overridden when the JS timer ends, which changes the text from the button to "Accept" this happens because you didn't added the phrase to XF.phrases object.

js/counter.js
JavaScript:
child.text(XF.phrase('Accept'));

You must either add the phrase to the object, or grab the button text using dom.

I also have a suggestion for xc_advanced_forum_rules template regarding the title displayed as "Forum rules". Since we may add several different rules, I think that it will be better if this displays the rule name.

This:
XML:
<xf:title>{{ phrase('xc_advanced_forum_rules') }}</xf:title>

Should become this:
XML:
<xf:title>{{ $rule.title }}</xf:title>

By doing this you get this on your rule page:

1536565816309.webp

Cheers,
Rodolfo.
 
Last edited:
hey @XenConcept .... i bought the addon and installed it successfully ... unfortunately when i try to create a new rule when i click "save" i'm getting this error:

Code:
    XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'data' in 'field list' src/XF/Db/AbstractStatement.php:212

    Generated by: metadmin Sep 19, 2018 at 12:42 AM

Stack trace

INSERT  INTO `xc_advanced_forum_rules` (`title`, `active`, `wait_time`, `viewing_forum`, `viewing_thread`, `create_thread`, `excluded_node_ids`, `excluded_user_group_ids`, `rule`, `rule_id`, `data`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(160): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1403): XF\Db\AbstractAdapter->insert('xc_advanced_for...', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1135): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/XF/Mvc/FormAction.php(69): XF\Mvc\Entity\Entity->save(true, false)
#8 src/XF/Mvc/FormAction.php(159): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/addons/XenConcept/AdvancedForumRules/Admin/Controller/AdvancedForumRules.php(122): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(249): XenConcept\AdvancedForumRules\Admin\Controller\AdvancedForumRules->actionSave(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XenConcept\\Adva...', 'Save', 'html', Object(XF\Mvc\ParameterBag), 'xcAdvancedForum...', Object(XenConcept\AdvancedForumRules\Admin\Controller\AdvancedForumRules), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(329): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(29) "/admin.php?forum/rules/0/save"
  ["referrer"] => string(54) "https://www.metacouncil.com/admin.php?forum/rules//add"
  ["_GET"] => array(1) {
    ["forum/rules/0/save"] => string(0) ""
  }
  ["_POST"] => array(10) {
    ["title"] => string(12) "MCtermsrules"
    ["viewing_forum"] => string(1) "1"
    ["viewing_thread"] => string(1) "1"
    ["create_thread"] => string(1) "1"
    ["wait_time"] => string(2) "10"
    ["rule"] => string(13) "testing rules"
    ["excluded_user_group_ids"] => array(3) {
      [0] => string(1) "3"
      [1] => string(1) "2"
      [2] => string(1) "1"
    }
    ["excluded_node_ids"] => array(1) {
      [0] => string(0) ""
    }
    ["active"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
  }
}
 
Top Bottom