Skip to main content

How to use Code Snippets in Fluent Community?

I have noticed that I am having a very difficult time adding a Code Snippet that works in Fluent Community. I spent a while testing with ChatGPT:
https://chatgpt.com/share/68b29c28-27ac-8013-8964-26af22b415e6
The result is that using a plugin such as Code Snippet Pro to adjust something in Fluent Community does not work. I have also earlier tested adding a code snippet to Fluent Auth and that did not work as well.

I am hoping that in general for Fluent products that we will be able to extend/adjust using Code Snippets. As I have over a few months now been spending a lot of time getting various code to work working with ChatGPT. This likely means making sure all API's have docs letting us or AI know how to insert PHP/JS code snippets into a Fluent product. As there are always something we would like to extend. Using a code snippet would be a good way to do so. Thank you.

add_action('fluent_community/portal_head', function() {
    ?>
    <style>

    </style>
    <?php
});
add_action('fluent_community/portal_footer', function() {
    ?>
    <script>

    </script>
    <?php
});

Kevin HeinrichsΒ Great! I actually got Claude ai to show a blue box as a test in Fluent Community, so something is atleast moving forward.

Paal Joachim RomdahlΒ enjoy the process :D

Ross FCA

Paal Joachim RomdahlΒ I would use Fluent Snippets for adding your code. https://fluentsnippets.com/

Mat β€Ž

When it comes to fCommunity plugin it is build a bit different - it is build for a speed and efficiency - it is a SPA (Single Page Application). You can feed that post content to ChatGPT and ask for explanation what does it mean when it comes to using custom code snippets.

Check this post explaining the Technical Design of FluentCommunity Plugin:

https://community.wpmanageninja.com/portal/space/community-meta/post/the-technical-design-of-fluentcommunity-plugin-some-confusions-cleared

For fCommunity API check Github repo:

https://github.com/WPManageNinja/fluent-community-docs

Other fPlugins also have docs for devs.

Reviewed your code. The feature you are implementing is very sensitive. The way, AI is handling is not the right way. Using JavaScript to hide the name should not be implemented. Anyone can view the real user's details from REST API response. Also the PHP codes are all wrong and halucinating codes.

Thanks Shahjahan Jewel . In general I just meant this as a test in developing a code snippet to be used in Fluent Community. Thank you for the feedback.Β