Jump to content

New Topic Rules


Adriano Faria
 Share

Recommended Posts

9 minutes ago, Adriano Faria said:

Well, the description is pretty clear:

On 08/02/2016 at 9:39 PM, Adriano Faria said:

This plugin will create a specific rule for the forums you want, so users of specific groups, set by the administrator, must agree before they are able to create topics.

You could do that on main form page :p

6 minutes ago, Adriano Faria said:

You can ask of course... I just don't have any ETA now. Working in other things.

OK, here it is :p

Would be nice if we can display rule content directly in the topic with optionnal mandatory checkbox and for every topic (without cookie).

Thank You !

EDIT : I know this is the New Topic Rules but for me those rules apply to new responses too. Would be great if they were diplayed before the response form too :)

Edited by Li3D
Link to comment
Share on other sites

  • 2 months later...
On 2/9/2016 at 0:45 PM, Adriano Faria said:

I'll take a look for a new resource. I don't want to mix things here.

Hello Adriano - do you think you could make an option - or maybe better as mentioned above - a new plugin - so that users must accept a rule before beeing able to post in a spesific topic? I still have this topic with thousands of posts that always gets off-topic...

Link to comment
Share on other sites

  • 6 months later...
  • 4 weeks later...

Just bought this plugin and when I tried to save rules, I've got this error:

UPDATE `forums_forums` forums_forums  SET `parent_id`=3,`icon`=(IPS\File\FileSystem::__set_state(array(
   'temporaryFilePath' => NULL,
   'configuration' => 
  array (
    'dir' => '/var/www/forum.vw-passat.pl/httpdocs/uploads',
    'url' => 'uploads',
  ),
   'configurationId' => 1,
   'storageExtension' => 'forums_Icons',
   'originalFilename' => 'forum_old-48.png',
   'filename' => 'forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
   'container' => 'monthly_2017_09',
   'contents' => NULL,
   'url' => 
  IPS\Http\Url\Internal::__set_state(array(
     'base' => 'none',
     'isInternal' => true,
     'isFriendly' => false,
     'url' => 'https://forum.vw-passat.pl/uploads/monthly_2017_09/forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
     'data' => 
    array (
      'scheme' => 'https',
      'host' => 'forum.vw-passat.pl',
      'port' => NULL,
      'user' => NULL,
      'pass' => NULL,
      'path' => '/uploads/monthly_2017_09/forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
      'query' => '',
      'fragment' => NULL,
    ),
     'queryString' => 
    array (
    ),
     'hiddenQueryString' => 
    array (
    ),
  )),
   'tempId' => NULL,
   'attachmentThumbnailUrl' => NULL,
   'thumbnailName' => NULL,
   'thumbnailContainer' => NULL,
))),`skin_id`='0',`can_view_others`=true,`permission_showtopic`=false,`show_rules`='0',`forum_allow_rating`=true,`disable_sharelinks`=false,`inc_postcount`=true,`allow_poll`=true,`tag_predefined`='',`show_prefix_in_desc`=false,`topicrules_onoff`=true,`topicrules_tipo`='ipsMessage_info ipsMessage_information',`sub_can_post`=true,`redirect_on`=false WHERE id=33 
IPS\Db\Exception: Data too long for column 'topicrules_tipo' at row 1 (1406)
#0 /var/www/forum.vw-passat.pl/httpdocs/system/Db/Db.php(990): IPS\_Db->preparedQuery('/*IPS\\Node\\_Mod...', Array)
#1 /var/www/forum.vw-passat.pl/httpdocs/system/Patterns/ActiveRecord.php(492): IPS\_Db->update('`forums_forums`...', '`parent_id`=?,`...', 'WHERE id=?')
#2 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Model.php(2237): IPS\Patterns\_ActiveRecord->save()
#3 [internal function]: IPS\Node\_Model->save()
#4 /var/www/forum.vw-passat.pl/httpdocs/init.php(448) : eval()'d code(217): call_user_func_array('parent::save', Array)
#5 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Model.php(3021): IPS\Node\advancedtagsprefixes_hook_nodeModel->save()
#6 [internal function]: IPS\Node\_Model->saveForm(Array)
#7 /var/www/forum.vw-passat.pl/httpdocs/init.php(448) : eval()'d code(145): call_user_func_array('parent::saveFor...', Array)
#8 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Controller.php(391): IPS\Node\advancedtagsprefixes_hook_nodeModel->saveForm(Array)
#9 /var/www/forum.vw-passat.pl/httpdocs/applications/forums/modules/admin/forums/forums.php(123): IPS\Node\_Controller->form()
#10 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Controller.php(85): IPS\forums\modules\admin\forums\_forums->form()
#11 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute()
#12 /var/www/forum.vw-passat.pl/httpdocs/applications/forums/modules/admin/forums/forums.php(39): IPS\Node\_Controller->execute()
#13 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Dispatcher.php(146): IPS\forums\modules\admin\forums\_forums->execute()
#14 /var/www/forum.vw-passat.pl/httpdocs/admin/index.php(13): IPS\_Dispatcher->run()
#15 {main}

 

Link to comment
Share on other sites

33 minutes ago, Andrzej Pindor said:

Just bought this plugin and when I tried to save rules, I've got this error:


UPDATE `forums_forums` forums_forums  SET `parent_id`=3,`icon`=(IPS\File\FileSystem::__set_state(array(
   'temporaryFilePath' => NULL,
   'configuration' => 
  array (
    'dir' => '/var/www/forum.vw-passat.pl/httpdocs/uploads',
    'url' => 'uploads',
  ),
   'configurationId' => 1,
   'storageExtension' => 'forums_Icons',
   'originalFilename' => 'forum_old-48.png',
   'filename' => 'forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
   'container' => 'monthly_2017_09',
   'contents' => NULL,
   'url' => 
  IPS\Http\Url\Internal::__set_state(array(
     'base' => 'none',
     'isInternal' => true,
     'isFriendly' => false,
     'url' => 'https://forum.vw-passat.pl/uploads/monthly_2017_09/forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
     'data' => 
    array (
      'scheme' => 'https',
      'host' => 'forum.vw-passat.pl',
      'port' => NULL,
      'user' => NULL,
      'pass' => NULL,
      'path' => '/uploads/monthly_2017_09/forum_old-48.png.d48ca786900d618a3c495c66230b6ad1.png',
      'query' => '',
      'fragment' => NULL,
    ),
     'queryString' => 
    array (
    ),
     'hiddenQueryString' => 
    array (
    ),
  )),
   'tempId' => NULL,
   'attachmentThumbnailUrl' => NULL,
   'thumbnailName' => NULL,
   'thumbnailContainer' => NULL,
))),`skin_id`='0',`can_view_others`=true,`permission_showtopic`=false,`show_rules`='0',`forum_allow_rating`=true,`disable_sharelinks`=false,`inc_postcount`=true,`allow_poll`=true,`tag_predefined`='',`show_prefix_in_desc`=false,`topicrules_onoff`=true,`topicrules_tipo`='ipsMessage_info ipsMessage_information',`sub_can_post`=true,`redirect_on`=false WHERE id=33 
IPS\Db\Exception: Data too long for column 'topicrules_tipo' at row 1 (1406)
#0 /var/www/forum.vw-passat.pl/httpdocs/system/Db/Db.php(990): IPS\_Db->preparedQuery('/*IPS\\Node\\_Mod...', Array)
#1 /var/www/forum.vw-passat.pl/httpdocs/system/Patterns/ActiveRecord.php(492): IPS\_Db->update('`forums_forums`...', '`parent_id`=?,`...', 'WHERE id=?')
#2 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Model.php(2237): IPS\Patterns\_ActiveRecord->save()
#3 [internal function]: IPS\Node\_Model->save()
#4 /var/www/forum.vw-passat.pl/httpdocs/init.php(448) : eval()'d code(217): call_user_func_array('parent::save', Array)
#5 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Model.php(3021): IPS\Node\advancedtagsprefixes_hook_nodeModel->save()
#6 [internal function]: IPS\Node\_Model->saveForm(Array)
#7 /var/www/forum.vw-passat.pl/httpdocs/init.php(448) : eval()'d code(145): call_user_func_array('parent::saveFor...', Array)
#8 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Controller.php(391): IPS\Node\advancedtagsprefixes_hook_nodeModel->saveForm(Array)
#9 /var/www/forum.vw-passat.pl/httpdocs/applications/forums/modules/admin/forums/forums.php(123): IPS\Node\_Controller->form()
#10 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Controller.php(85): IPS\forums\modules\admin\forums\_forums->form()
#11 /var/www/forum.vw-passat.pl/httpdocs/system/Node/Controller.php(62): IPS\Dispatcher\_Controller->execute()
#12 /var/www/forum.vw-passat.pl/httpdocs/applications/forums/modules/admin/forums/forums.php(39): IPS\Node\_Controller->execute()
#13 /var/www/forum.vw-passat.pl/httpdocs/system/Dispatcher/Dispatcher.php(146): IPS\forums\modules\admin\forums\_forums->execute()
#14 /var/www/forum.vw-passat.pl/httpdocs/admin/index.php(13): IPS\_Dispatcher->run()
#15 {main}

 

Data too long for column 'topicrules_tipo'

Let me see what has changed. 

Edited by Adriano Faria
Link to comment
Share on other sites

Hi,

css from your plugin breaks default IPS styles:

image.png.ad84036bee6d5db036a16aeece22a3cf.png

You must adjust padding in this style:

Quote

.ipsMessage {
    padding: 3px 15px 15px 45px;
    border-radius: 2px;
    position: relative;
    margin-bottom: 10px;
}

I had to add this to my custom.css:

Quote

.ipsMessage{
  padding: 15px 45px !important;
}

to display correctly

Edited by Andrzej Pindor
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

I made some modifications to the plugin.  Here they are if you want them and you know what you're modifying.  Obviously, if you change stuff, make sure you change things back if there is an update.

Normal Message instead of warning:

Template: core/global/plugins/newTopicRulesForm

<!--- MODIFICATION START --->
<div class='ipsType_normal ipsType_richText ipsSpacer_bottom'>
	<div class="ipsAreaBackground ipsPad ipsPad_double">
		{$msg|raw}
    </div>  
</div>
<div class='ipsType_normal ipsType_richText'>
	<div class="ipsAreaBackground ipsPad">
		{$form|raw}
	</div>
</div>
<!--- MODIFICATION END --->

Tip:  Always include the Modification(s) so you can search your template for modifications you made.

You might also have to remove / delete the css file for the plugin.

Use at your own risk and all that fun stuff.

Edited by Bluto
Link to comment
Share on other sites

1 minute ago, Bluto said:

I made some modifications to the plugin.  Here they are if you want them and you know what you're modifying.  Obviously, if you change stuff, make sure you change things back if there is an update.

Normal Message instead of warning:

Template: core/global/plugins/newTopicRulesForm


<!--- MODIFICATION START --->
<div class='ipsType_normal ipsType_richText ipsSpacer_bottom'>
	<div class="ipsAreaBackground ipsPad ipsPad_double">
		{$msg|raw}
    </div>  
</div>
<div class='ipsType_normal ipsType_richText'>
	<div class="ipsAreaBackground ipsPad">
		{$form|raw}
	</div>
</div>
<!--- MODIFICATION END --->

Tip:  Always include the Modification(s) so you can search your template for modifications you made.

You might also have to remove / delete the css file for the plugin.

Use at your own risk and all that fun stuff.

A screenshot?

Link to comment
Share on other sites

@Adriano Faria Just an FYI.  Wiping the cache will delete all the settings for the plugin (cooke expire after and cookie prefix) and result in an error on the front end.  

I have Spacious ACP and just wiped the cache and got an error trying to add something in the forum I set this up for.

Edited by Bluto
Link to comment
Share on other sites

There's nothing wrong with the settings in this plugin. It is as it is in any other plugin. There's a discussion topic in Contributor Chat regarding this issue with settings: https://invisioncommunity.com/forums/topic/442431-what-could-cause-plugin-settings-to-be-wiped/

I'll link your post to it to make sure IPS will be aware.

Link to comment
Share on other sites

Thanks for the info!  I can't read the thread, but it's good to know it's on IPSs end - well maybe it's not that good to know ;) - I'll disable this for now.  Let me know if IPS ends up fixing the issue and I'll re-enable it after that.  I'm afraid I'd wipe the caches and forget to add back the cookie settings.

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...