[[++forums_css_framework:notempty=` `:default=` [[- Will eventually download and combine]] `]]
We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
[[-+discuss.user.id:notempty=`
[[+discuss.user.username]]'s Avatar

[[%discuss.recent_activity]][[%discuss.ndash]] [[+discuss.user.unread_posts]][[%discuss.sep]] [[+discuss.user.unread_messages]][[%discuss.sep]] [[+discuss.user.new_replies]]
[[+discuss.user.no_replies_count:gte=`1`:then=` [[+discuss.user.unanswered_questions_count:gte=`1`:then=` [[%discuss.help_answer]] [[+discuss.user.unanswered_questions]] [[%discuss.participate_discussions]] [[+discuss.user.no_replies]]. `:else=` [[%discuss.participate_discussions_solo]] [[+discuss.user.no_replies]]. `]] `:else=` [[+discuss.user.unanswered_questions_count:gte=`1`:then=` [[%discuss.participate_discussions_solo]] [[+discuss.user.new_unanswered_questions]]. `:else=` [[%discuss.no_unanswered_questions_or_discussions]] `]] `]]

`]]
    • 23094
    • 59 Posts
    I have still no solution. I get some data by Curl (html+js), this code contains "[[" (JSON data). I call snippet in site template which include class than retrieve data by Curl. Because retrieved data was corrupted I changed CURLOPT_RETURNTRANSFER option to true and before displaying I change "[[" to "[ [" by str_replace. It is better now, most data is correct but some data is still corrupted. When I run it out of Modx all is OK. I can’t find solution, is there any other way to workaround problem witch JSON data displaying? I was hope the problem will gone when upgrade to Revo but there is still the same "[[" problem witch JSON data sad
      • 23094
      • 59 Posts
      As "some data is still corrupted" I mean "not displayed" at all. JSON data is now OK but there is problem with other part of data. Maybe Curl data don’t like str_replace? I don’t know sad
        • 23094
        • 59 Posts
        OK, I finally found solution. No modifying scripts, no big scripts in snippet. Snippet now only include oryginal script (working out of MODX) and str_replace before output:

        <?php
        ob_start();
        include "my_oryginal_working_script.php";
        $rt = str_replace('[[','[ [',ob_get_contents());
        ob_end_clean();
        return $rt;
        ?>


        Now all works OK!
        [[$thread-login-post]]
        [[*beforeClose]]