moodle-an-hochschulen / moodle-local_staticpage

Moodle plugin which displays static information pages which exist outside any course, imprint or faq pages for example, complete with Moodle navigation and theme
GNU General Public License v3.0
46 stars 27 forks source link

compatibility with filtercodes plugin #42

Closed orionrush closed 3 years ago

orionrush commented 4 years ago

Hi, and thanks for this great piece of work!

I suspect that it may be challenging to pass the HTML templates back through PHP in order to process the moustache syntax of the filtercodes plugin, but it would be a welcome addition.

One use case would be to combine your plugin with the local contact forms plugin and thefiltercodes plugin to make contact forms with reCaptcha as described in the Contact Forms docs.

At the moment we can get the contact forms to work if we manually code the markup and hardcode a the submit path. It would be better if we could get some filtercodes in there, however, for reCapture and more.

Kind regards, and again many thanks for the great plugin.

abias commented 4 years ago

Hi @orionrush ,

I see the benefit of the combination of local_staticpage and filter_filtercodes which you describe.

Do you have to filtercodes filter enables on system level and did you have a look at the local_staticpage | processfilters setting (See https://github.com/moodleuulm/moodle-local_staticpage#24-process-content for more details about this setting) and set it to yes? I don't have an installation of filter_filtercodes at hand to test it myself now, but to my understand the filtercodes markup should be parsed by local_staticpage if both conditions are fulfilled.

Looking forward for your feedback.

Cheers, Alex

orionrush commented 4 years ago

@abias Thanks for getting back to me, It was indeed that I'd activated the filtercodes plugin, but not enabled it in filter settings. . . It now works as expected. Sorry and thanks so much for your time.

michael-milette commented 3 years ago

For anyone else having trouble getting this to work...

How to: Creating a Contact Us webmail form in Static Pages

The Static Pages, Contact Form and FilterCodes plugins work well together. However there are a few things you should know.

  1. Before getting started, you will need to confirm the correct configuration of a couple of settings in Static Pages:
  1. Ensure that the following plugins are installed and enabled in your Moodle site:
  1. Use a text editor to create a file called contact.html and copy in the following HTML code:
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Contact Us</title>
</head>
<body>
    <h1>Contact Us</h1>
    {formcontactus}
</body>
</html>
  1. Upload the file you just created into Static Pages.

This example has been tested using the latest version of Static Page when combine with Boost, Adaptable and several other themes in Moodle up to v3.9. You should be able to adapt the example to your specific requirements.

Hope you find this useful. If it is still not working for you, please consult the README.md files included with Contact Form and FilterCodes for more troubleshooting steps.

Michael Milette, Developer Contact Form for Moodle and FilterCodes for Moodle

abias commented 3 years ago

Hey @orionrush ,

I am happy to you were able to solve your goal with existing settings.


Hey @michael-milette ,

thanks for adding your important notes about using all plugins together. I could imagine that it may be helpful to have this additional information in this plugin's README, similar to the "Adding images to static pages" and "Add blocks to static pages" sections in README.md.

If you agree, I would be happy to merge a pull request from you.

Cheers, Alex