Creating a Module - Unity3D Integration
Posted
#6740
(In Topic #1552)
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
Posted
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.
Posted
Thank You for your response! The Example is now working, just my addon page now
Now to dig into the Compo.sr manual……
Steve
Posted
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
Posted
May I suggest a further docs edit to include this learning?
Regards
Steve
Posted
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.
1 guest and 0 members have recently viewed this.
