Creating a Module - Unity3D Integration

So, restarting my adventures in integrating Unity3D with a Compo.sr based back-end. I'd like to keep my queries together, if that is ok, so if I come up on many different issues, I do apologise.
So today I made a start catching up on things Module related, and was going through the tutorial in the codebook when I ran into 3 problems:
- the get_page_title() function is not recognised by my compo.sr install :(
- what do I need to do to prevent or satisfy this security warning: A POST request was made without a security token; this has been blocked as it represents a security threat.
- my Addons page in the Admin panel gives me a syntax error when my module is present: "Parse error: syntax error, unexpected 'return' (T_RETURN), expecting function (T_FUNCTION) or const (T_CONST) in <snip>/site/sources/zones2.php(794) : eval()'d code on line 37"
Any thoughts out there please?
Kind Regards
Steve
Last edit: by Steven Gilson



It turns out the Code Book example is pretty outdated, sorry about that. I'm updating it now. It should go live later today.
(We used to maintain this as a separate document outside the main code repository so it tended to get forgotten)
get_page_title should be get_screen_title.
The form element needs to have {$INSERT_SPAMMER_BLACKHOLE} inside it to add the CSRF token.
The PHP error may be due to code formatting, I'm checking that.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.

Thank You for your response! The Example is now working, just my addon page now

Now to dig into the Compo.sr manual……
Steve


Also if you want certain formatting errors in modules to not lead to nasty parse errors, this hot-fix will resolve that:
0004609: Don't allow formatting errors in block/module code to cause errors - Composr CMS feature tracker
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.

May I suggest a further docs edit to include this learning?
Regards
Steve


May I suggest a further docs edit to include this learning?
All hot-fixes get rolled into the next patch release, so there's no need to explain it - it just won't give an error in the future.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.