We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28203
    • 26 Posts
    Thanks for your reply dev_cw, for a moment I felt like Keanu Reeves in that scene in the Devil’s Advocate, where he is alone in New York City.. shocked

    Quote from: dev_cw at Apr 18, 2008, 06:30 AM

    I have never used this snippet but I will try to point out potential problems:

    1) did you add the TV tag to your template? If you create a TV named "smf_commnets" you need to add a corresponding [*smf_commnets*]. You need to add this either directly in the template or you can simply place it in the content field.

    Yes, thats why I asked here how exactly should I configure the TV, since I’m kinda new to MODx, but I think I figured it out, and I added the TV in the content field on the place where {Comments} was, but its still the same. I didn’t know I can put it directly in the template, thanks for that.

    Quote from: dev_cw at Apr 18, 2008, 06:30 AM

    2) did you remove the extra <?php ?> tags when copying the snippet code?

    I thought I should remove the php tags in the document, but since the document in which I have been trying this out didn’t contain any php tags, I assumed that I’m not supposed to do that. Anyway I have tried removing the php tags from the snippet and again its the same deal sad

    Quote from: dev_cw at Apr 18, 2008, 06:30 AM

    3) did you check the paths in #4:


    4. The path back to the forum login is also hardcoded, so if you have the forum install in a sub-directory or under a different folder name then this will need editing in the snippet code as well.

    Yes, I left the paths as they are (forum/SSI.php) because I have SMF installed in a subfolder called forum.


    Everything with this plugin is somehow acting very weird. There are a few cases which I have experienced while trying to refresh/delete cache and cookies or trying to change some values and stuff:

    1. Sometimes it appears like it does work, when I’m logged in at the forums, the comment box appears and I can write comments, but they don’t get registered, and don’t appear, and when I’m not logged at the forums the comment box does not appear and it simply says you have to be logged in to leave comments.

    2. Other times the comment box is always present whether I’m logged or not, but the comments does not appear.

    3. ANOTHER times, the message: to leave comments you must be logged in is always present whether I’m logged in or not.

    4. and at a few times, I managed to leave a comment once as anonymous and another time as a user logged in the forums, but after that it didn’t worked, it was all the same. I don’t know how this really happened, but it is very strange to me.

    Its a very useful and clean snippet, but if not help, I need at least a conformation from someone that it works as it is.


    Now, as I have it working I think its everything according to the manual, but it still won’t let me enter comments.

    The two comments I have entered are displayed and the message: "You must be logged into the forums to comment. Please login" appears below them. It is case number 4 which I have mentioned previously.
      • 7231
      • 4,205 Posts
      Sorry, I can’t help further without being more familiar with it and SMF. Based on the post by Cx2 it may be that recent updates to SMF have broken this feature.

      Snippets need <?php ?> tags in them, however sometimes the files get copied with existing php tags witch lead to having double tags which will break the snippet. Make sure that snippets have one set of php tags.

      Also double check to see if you did the step below.
      2. Log into SMF and check the following setting in the admin (I found this caused a few issues with my setup):
      * Configuration->Server Settings->Feature Configuration Tab->Enable local storage of cookies: Set to off.

      Also, this is always a good idea to try, if you are using cached [[ ]] snippet calls try using the uncached [! !].

        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 28203
        • 26 Posts
        Quote from: dev_cw at Apr 19, 2008, 06:40 AM

        Sorry, I can’t help further without being more familiar with it and SMF. Based on the post by Cx2 it may be that recent updates to SMF have broken this feature.

        Snippets need <?php ?> tags in them, however sometimes the files get copied with existing php tags witch lead to having double tags which will break the snippet. Make sure that snippets have one set of php tags.

        Also double check to see if you did the step below.
        2. Log into SMF and check the following setting in the admin (I found this caused a few issues with my setup):
        * Configuration->Server Settings->Feature Configuration Tab->Enable local storage of cookies: Set to off.

        Also, this is always a good idea to try, if you are using cached [[ ]] snippet calls try using the uncached [! !].


        I have tried the [! !] but its exactly the same. I think I got it working, actually I’m so close, but one thing I noticed is that it only works for one time, right after I do a change in MODx panel.

        For example:

        1. I click Save(on whatever document or change I have made through the MODx manager)

        2. I try to write comment at my site through this snippet

        3. Comment is written successfully!

        4. I try to write another one and nothing happens.

        5. Then I do another change in the manager panel

        6. Try to write comment at the site, again it works, but only one time?!


        I’m sure there is some easy explanation for this, but can someone please give any hints of what this might be?

        Thanks

          • 7231
          • 4,205 Posts
          What you describe sounds like a cache issue. Try turning off the cache on that document completely and use [! !].
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don&#39;t know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 28203
            • 26 Posts
            Hey yeah!

            It actually was a cache issue, finally got it working ! smiley

            Thanks for the suggestions dev-cw !

            Now there is only one thing left, it seems that the username always appears as anonymous. I’ve tried changing [+user+] with [+forumuser+] but again it appears only anonymous.

            I’ve managed to leave some comment from time to time with the forum username while I was trying it out before with cacheable switched on, but now they are posted only with anonymous.

            Any suggestions about this?

            Thanks again, now this gave me some motivation smiley
              • 11042
              • 10 Posts
              Hmm,

              I have this working in SMF 1.1.5 and Modx 0.9.6.1 however, I found that a lot of the SSI functionality is lost.

              How would you do the following as an example using this snippet?

              ssi_boardNews($board = 1.0, $limit = 5, $start = null, $length = 250, $output_method = 'echo');


              Or to be a little more advanced, as I dont want the icons

              <?php
              
                 $array = ssi_boardNews(1.0, 5, null, 250, 'array');
              
                 foreach ($array as $news)
                 {
                    echo '
                       <table border="0" width="100%" align="center" class="ssi_table">
                          <tr>
                             <td><b>', $news['subject'], '</b></td>
                          </tr>
                          <tr>
                             <td>', $news['body'], '<br /><br /></td>
                          </tr>
                       </table>
                       <br />';
              
                    if (!$news['is_last'])
                       echo '
                       <hr width="100%" />
                       <br />';
                 }
              
              ?>


              Many thanks,
                • 11042
                • 10 Posts
                No-one knows?

                And I take it the original author of the snippet is no longer attending the forums....
                  • 37272
                  • 216 Posts
                  Hi

                  I posted a couple of week ago about how this snippet does not play well with the SMFssi snippet: http://modxcms.com/forums/index.php/topic,8620.msg281878.html#msg281878. I’ve received no feedback on the SMFssi comments thread - maybe a reader of this thread can help?

                  Additionally, submited comments are resubmitted if the page is refreshed. Can someone help me with a solution?

                  Thanks.