We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23072
    • 150 Posts
    The problem is your cookie path has to be / or the cookie can’t be read outside of the /forum/ folder, and your MODx folder is outisde the forum folder.

    You should only get the errors you mentioned until you delete your forum cookie.
      Notanotherdotcom Ltd

      Web | Print | Marketing
      • 28033
      • 925 Posts
      Quote from: Pete at Jan 06, 2007, 07:52 PM

      The problem is your cookie path has to be / or the cookie can’t be read outside of the /forum/ folder, and your MODx folder is outisde the forum folder.

      You should only get the errors you mentioned until you delete your forum cookie.

      You’re talking about logging off of the forum, clearing my cache, then relogining in, right? That’s what I did before, and that’s how I got those errors.

      Do you mean clearing it in the forum’s cache itself? I didn’t see an option for that, but I could have easily missed it (since there’s so many of them there XD).

      I’ll go and check and see if I can find one...

      EDIT: After changing the cookie to /, and emptying Opera’s cache, I get this...

      Fatal error: Call to undefined function: latestposts() in /hsphere/local/home/tales/tales.rpgplanet.gamespy.com/reala/manager/includes/document.parser.class.inc.php(748) : eval()'d code on line 42


      And Firefox2 and IE7 just give a blank page. I know the cookie was wiped, since I checked my cookies beforehand, and none were there.

      (I think I’ll just reset the forum cookie to /forum/ for now, and try it again once it’s moved back to the root folder. I’ll let you know if I encounter any errors when I do that. Thanks for all of your help. smiley ).
        My Snippets
        -> PopUpChunk v1.0
        • 23072
        • 150 Posts
        Depending on your browser’s settings, clearing your cache might not delete your cookie, but it’s just your cookie for your forums you need to delete as far as I’m aware.
          Notanotherdotcom Ltd

          Web | Print | Marketing
          • 23072
          • 150 Posts
          Uh-oh. Now I’m getting an error or two on one of my sites.

          It’s different to yours, but in my case if I’ve logged into the Manager and it’s saved a cookie for that, it gives me an error as it’s getting database prefixes muddled up (looking for MyBB tables on my MODx database).

          Hmm... Looks like I’ve got some tinkering to do to get this working right sad
            Notanotherdotcom Ltd

            Web | Print | Marketing
            • 23072
            • 150 Posts
            Okay - it looks like you did have it set up roght the first time and Ijust missed a small bit of code off my instructions.

            Basically I forgot to call a global - how embarrassing sad wink

            Go to edit your mybb snippet and change the following:

            // Required globals to make this work
            global $mybb, $db, $cache, $plugins, $displaygroupfields, $grouppermignore, $groupzerogreater, $lang;


            to

            // Required globals to make this work
            global $mybb, $db, $cache, $plugins, $displaygroupfields, $grouppermignore, $groupzerogreater, $lang, $fpermfields;


            That should fix your problem, though you may need to log out of your MODx manager to get rid of the error message, which leads on to my next issue below...

            I’ve found a solution to my other problem - basically being logged into the MODx Manager whilst viewing a site page using this snippet threw up an error, as the MyBB database prefix was overriding the MODx database prefix. To solve this additional issue, you must install MODx and MyBB on the same database.

            I’ve tried finding a way to select the right database after calling the snippet but it’s just not having it unfortunately. Still, it’s no major problem really.
              Notanotherdotcom Ltd

              Web | Print | Marketing
              • 7923
              • 4,213 Posts
              Quote from: Pete at Jan 07, 2007, 01:48 PM

              Go to edit your mybb snippet and change the following:

              // Required globals to make this work
              global $mybb, $db, $cache, $plugins, $displaygroupfields, $grouppermignore, $groupzerogreater, $lang, $fpermfields;


              to

              // Required globals to make this work
              global $mybb, $db, $cache, $plugins, $displaygroupfields, $grouppermignore, $groupzerogreater, $lang, $fpermfields;


              What is different in those two above code lines?

              Quote from: Pete at Jan 07, 2007, 01:48 PM

              I’ve found a solution to my other problem - basically being logged into the MODx Manager whilst viewing a site page using this snippet threw up an error, as the MyBB database prefix was overriding the MODx database prefix. To solve this additional issue, you must install MODx and MyBB on the same database.

              I’ve tried finding a way to select the right database after calling the snippet but it’s just not having it unfortunately. Still, it’s no major problem really.

              Have you seen this: http://wiki.modxcms.com/index.php/Access_another_database_from_MODx


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 23072
                • 150 Posts
                Cheers doze - altered my previous post as I’d accidentally repeated myself on those two bits of code wink

                As for the database issue - basically the MyBB installation is doing a mysql_select and changing the selected database from teh MODx to the MyBB database, and I can’t get MODx to select the MODx database again at the end of the snippet.

                I can’t really change the MyBB code either as the mysql_select code is deep inside the MyBB functions and the point of this mod is not to have to alter either MODx or MyBB core code, so I’m a bit stuck there.

                Having them both installed on the same database seems to work though so it’s not the end of the world.

                Cheers for your help though, and if you’ve got any more suggestions let me know smiley
                  Notanotherdotcom Ltd

                  Web | Print | Marketing
                  • 28033
                  • 925 Posts
                  When pHX is enabled, MyBB Bolt-On cannot work correctly (I guess pHX overrides it).

                  I’m going to mess around and see if I can get it to work, though.
                    My Snippets
                    -> PopUpChunk v1.0
                    • 23072
                    • 150 Posts
                    It’s possible a class name is the same in both applications.

                    I had a bit of trouble at an early stage since both MODx and MyBB’s error handling functions were called the same thing, so I think I just didn’t load MyBB’s function for it.

                    Might be a similar conflict.
                      Notanotherdotcom Ltd

                      Web | Print | Marketing
                      • 28033
                      • 925 Posts
                      Pete, is it possible to extend the "Recent Posts" part of the plugin to allow for selecting certain FID’s, instead of just getting every post from the forum?
                        My Snippets
                        -> PopUpChunk v1.0