We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Quote from: kickass at Mar 25, 2006, 04:31 PM

    My pledge donation has been made via the donations link up top . . . THANKS!

    Okay, now what’s next on the wishlist that we can get motivated like this . . .
    How about, complete content localization, content revisioning and rollback, a lightweight PHP4/5 compatible object model/API that can be used outside of the MODx site (think a MODx WordPress or other 3rd party system plugin that can call and generate a DropMenu snippet), and even more? Any one got money for that? LOL
      • 15826
      • 160 Posts
      Geez, and I thought my list was gonna be long . . .
        "I’d love to change the world but I can’t find the source code . . ."

        Custom ModX Templates
        • 3505
        • 9 Posts
        In case anyone might need some help, if you are not sure whether your forum base path is correct, you can copy the one you’ll find in your forum admin panel -> server settings -> path to smf.
          • 15645
          • 2 Posts
          Hi all,

          was hoping that someone might be able to help with this problem.

          I have tried to integrate SSI.php into my templates however no success yet. I must confess that my approach of learning is more of a hack-approach.. *stick things together and see if it works, then optimize it as much as possible*.

          http://www.simplemachines.org/community/ssi_examples.php

          Anyway i was wondering if this is the best way of integrating SMF SSI.php Functions into modx is via templates or should I be using a snippets approach? Which would be generally the better way of doing it?

          thanks.
          Kenny
            • 22221
            • 283 Posts
            I’ve install this module with my login and my password (I’m the admin of the forum wink)
            And I notice that since I’ve activate this module, I was unable to logout when I’m using the SMF forum.

            Is there anything to do (except deactivate the module) to logout ?

            EDIT : This bug concerns all the registered member. When the mod is active I’m unable to logout (with the admin login or with a simple member login too) !!!
              • 4195
              • 398 Posts
              If i try to run the module i get a blank screen saying:

              Hacking attempt...

              ???

              - I installed and configured the module step by step using the smf_readme.doc provided with the download.

              edit:

              the error is generated by one of the SMF includes:
              if (!defined('SMF')) 
                 die('Hacking attempt...');
              


              extra information:
              I’m using MODx 0.9.1 (+ the logparser file from the smfconnect download). The SMF install i’m using is 1.1 RC2 and the forum directory is physically located on the same level as the modx manager directory. Modx uses www.domain.ext as the virtual root and my SMF configuration will force the usage of forum.domain.ext instead of www.domain.ext/forum but both are usable. Hosting panel used is Direct Admin 1.26.4 (Linux+apache)

              Am I the only one with this error? sad
                Armand Pondman
                MODx Coding Team
                :: Jot :: PHx
                • 9583
                • 25 Posts
                Regarding logout, it would appear that you always need to login and logout with MODX. Which means you need to set the Module’s "Login page" and "Logout page" as required. Using the out-of-the-box test site as an example, that would be document ID#4 for both. That makes the main SMF toolbar login/logout buttons redirect to the MODX login/logout page.

                And do NOT use the "quick login" on the SMF templates!

                "Hide Forms" doesn’t seem to have any effect.

                I’ve found when playing around that they can get out of sync, especially if you don’t set the "Logout page" correctly. And double-especially if you use the SMF "quick login" form on the standard template. To get back in sync, you need to log out of MODX, then log back in to MODX as the same user. Then go to the forum, click logout, and it should be in sync. Maybe... smiley Or, just trying it again now, maybe not. sad

                Hmm, I guess when I thought I got it to work before, it was actually just the cookie expiring. I can switch to a different user using the correct login/logout procedure, but then it just reverts me to the previously-logged in user. tongue


                I guess the first order of buisness is to get rid of that "quick login"...

                  • 14267
                  • 113 Posts
                  Quote from: kennylovesyou at Mar 26, 2006, 08:52 PM

                  Anyway i was wondering if this is the best way of integrating SMF SSI.php Functions into modx is via templates or should I be using a snippets approach? Which would be generally the better way of doing it?
                  Kenny, you do want to put your code in snippets, and put snippet calls, template variables and placeholders in your templates (or chunks).

                  For example, here’s a basic snippet that can be used as a simple single-page blog:
                  include "forum/SSI.php";
                  $topicarray = ssi_boardNews($id, 10, null, null, 'array');
                  $bloglinks="<h3>blog posts</h3>
                  <ul id='LM_level_1'>";
                  //print_r($array);
                  	foreach ($topicarray as $blog)
                  	{
                  	      $output.="<a name='".$blog['time']."'></a><div class='ssi_table'><div style='float:right'>".$blog['time']."</div><span class='heading1'>". $blog['subject'] ."</span><br /><br />";
                  	      $output.=$blog['body']."<br /><br />";
                                $output.=$blog['link']."  |  ". $blog['new_comment'] ."<br /><br />";
                                $output.="</div><br />";
                                $bloglinks.="<li><a href='#".$blog['time']."'>".$blog['subject']."</a></li>";
                  	}
                  $bloglinks.="</ul>";
                  $modx->setplaceholder('otherlinks',$bloglinks);
                  return $output;

                  Note that this sets a placeholder, [+otherlinks+] that you can put in a sidebar in another part of your template.

                  Note also that this snippet doesn’t separate content from presentation. A pure approach would use a separate chunk, called using $modx->getChunk(’chunkName’).

                    • 15645
                    • 2 Posts
                    thank you jlarson,

                    I kind of suspected that i should have been using snippets, lesson learned i guess tongue


                    thanks again.

                    [edit]
                    wow, im truly amazed at power of snippets, it makes modx so much better when compared to other cms i have tried and used.. laugh
                    • Quote from: kennylovesyou at Mar 27, 2006, 09:53 PM

                      wow, im truly amazed at power of snippets, it makes modx so much better when compared to other cms i have tried and used.. laugh

                      Wait until you start working with TVs. Like a cross between snippets and chunks, only better. Very very powerful, and I am barely beginning to understand their uses.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org