Liam Davis wrote: Wed Feb 16, 2022 4:05 pm
What do I need to change in ajax.php file please ?
Naguissa wrote: Wed Feb 16, 2022 7:20 am
It's possible to do so, but then it whould be only compatible with phpBB 3.3.5-RC1 and newer versions.
You can do it by yourself:
Rename file: ext/naguissa/thanksforposts/styles/all/template/event/
viewtopic_body_postrow_post_notices_after.html
to: ext/naguissa/thanksforposts/styles/all/template/event/
viewtopic_body_postrow_signature_after.html
For AJAX support (default: on) you also need change a reference to that file:
Change it at: ext/naguissa/thanksforposts/controller/ajax.php [line 159]
Then, enter in ACP, upload changes and clear cache.
For AJAX support (default: on) you also need change a reference to that file:
Change it at: ext/naguissa/thanksforposts/controller/ajax.php [line 159]
----------
In that line, delete viewtopic_body_postrow_post_notices_after and write viewtopic_body_postrow_signature_after
Just that text change, to match new file name. Remember to copy-paste the name, as it needs to be exactly it.
But this change only affects to AJAX system, all other operations remains the same (as load a thread and see all info in correct place -now correct place should be after user's signature- should be working even without this change).
If you don't do this change everything should work OK but that info section would be changed to "garbage" when you use AJAX thanks/remove-thanks. In my case it was returning a capital A, but I don't know why, it could fail, return blank, but... an "A"? Who knows....
-----------------------------
More info, only for tech enthusiasts: I've implemented a "render this part of the forum" system (called "partials") to be able to reuse same templates. This means that AJAX call renders same parts of the extension as a normal call, and then I don't have to duplicate templates. Even if anyone customizes any part (i.e.: custom styles with weird styles), it the person customizes the main template, it will continue working withoun any extra adaption. The other way to do so is to re-implement template in JavaScript, and then any change to template need to be done twice: JavaScript and Twig phpBB's template.
But as I reference partial template file by name, if you change one file name you need to change same name in AJAX controller too.