We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23072
    • 150 Posts
    This is an auto-generated support/comment thread for MyBB Bolt-On.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    The MyBB Forum Bolt-On snippet makes certain functionality available to use in MODx.
      Notanotherdotcom Ltd

      Web | Print | Marketing
      • 2762
      • 1,198 Posts
      Nice snippet! another great forum board integrated with modx wink
        Free MODx Graphic resources and Templates www.tattoocms.it
        -----------------------------------------------------

        MODx IT  www.modx.it
        -----------------------------------------------------

        bubuna.com - Web & Multimedia Design
        • 2762
        • 1,198 Posts
        mmm tongue are you working for a ipb integration too?
          Free MODx Graphic resources and Templates www.tattoocms.it
          -----------------------------------------------------

          MODx IT  www.modx.it
          -----------------------------------------------------

          bubuna.com - Web & Multimedia Design
          • 23072
          • 150 Posts
          Well I’m doing a MyTopix version next and I’ll see how the IPB one goes.

          I’m only doing the IPB one as I need it for one of my sites. I’m not sure how release-able it is though as it’s a MUCH more complex system but I’ll see when I get there.

          Thanks for the comments smiley
            Notanotherdotcom Ltd

            Web | Print | Marketing
            • 7923
            • 4,213 Posts
            Good job, Thanks for contributing!! smiley


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 28033
              • 925 Posts
              http://tales.rpgplanet.gamespy.com/reala/

              1/4/07 - After some testing, I think I know why it’s acting up. It can’t get the cookie information, so it says I’m a guest. And therefore, because of that, it will give me this error, because of that setting (which is still weird, since I don’t remember setting it like that).

              « MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
              « PHP Parse Error »
               
              PHP error debug
                Error: 	Invalid argument supplied for foreach()	 
                Error type/ Nr.: 	Warning - 2	 
                File: 	/hsphere/local/home/tales/tales.rpgplanet.gamespy.com/forum/inc/functions.php	 
                Line: 	834	 
                Line 834 source: 	foreach($fpermfields as $perm) 	 
               
              Parser timing
                MySQL: 	0.0266 s	(4 Requests)
                PHP: 	0.3901 s	 
                Total: 	0.4167 s	 


              The one that got the userinfo was fine, since it recognized me as a Guest. Only thing I can guess it that the cookie information is bad (so it only works on the forum URL), so that’s why it can’t recognize me.
                My Snippets
                -> PopUpChunk v1.0
                • 23072
                • 150 Posts
                I had a few cookie errors during testing which were solved simply by deleting the forum cookie. Once I did that after adding all the bits in that I wanted, it worked fine.

                For some reason, editing the snippet code interferes with the MyBB cookie which I really can’t explain, so just deleting the cookie should fix it if that’s your problem. Once you log in again you shouldn’t see the error.


                However I’m a bit confused by this line in the error you posted:

                /hsphere/local/home/tales/tales.rpgplanet.gamespy.com/forum/inc/functions.php


                I vaguely remember Gamespy’s paths being a bit weird, but are you sure that’s right? It looks like half URL and half path. Could you check it against the config in MODx? Tools -> Configuration -> Interface and Features and the assets path is labelled Resource Path.
                  Notanotherdotcom Ltd

                  Web | Print | Marketing
                  • 28033
                  • 925 Posts
                  The resource path, according to ModX, is...

                  /hsphere/local/home/tales/tales.rpgplanet.gamespy.com/reala/assets/


                  Which is the same address used as the $mybb_path (sands the reala/assets part).

                  If the

                  $snippet_path = $modx->config['base_path'] . "assets/snippets/mybb/";


                  is like that, could that maybe mean that it’s making an assets/assets/ URL. I’m assuming a no, since it wouldn’t know to get the functions.php file, though.

                  Anyways, it might look a little weird since Gamespy moved to the HSphere program recently, so the base URL got messed up in the process.

                  As for the cookie issue, does it have anything to do with having the URL like this...

                  Cookie Domain: .tales.rpgplanet.gamespy.com
                  Cookie Path: /forum/
                  


                  I think that might be why, since ModX is in a folder, instead of in the root (so ModX might be looking for a cookie at /reala/forum/, when none actually exists).

                  Thanks for helping me. I really appreciate it.
                    My Snippets
                    -> PopUpChunk v1.0
                    • 23072
                    • 150 Posts
                    That’ll be it. The cookie is only available in the forums folder by the looks of it.

                    If you change the cookie path so that it’s just / instead of /forum/ it should be fine.

                    Failing that, try also clearing anything in the cookie domain box in your settings as well. These aren’t generally needed and since the Gamespy path looks like it’s already isolating your account from any others, it shouldn’t have any adverse affect.

                    You may also have to clear your browser’s cookie for your site though, but I’m not sure. It may just overwrite the other one.
                    Hope this helps smiley
                      Notanotherdotcom Ltd

                      Web | Print | Marketing
                      • 28033
                      • 925 Posts
                      I tried making the forum cookie path / intsead of /forum/, but that gave errors from the document.parser.... file in the /includes/ folder of ModX, in every single chunk. It got stopped at the ModX file, instead of getting far enough to get to MyBB like before.

                      Going back to the normal cookie path, I can get things like the Recent Events and News Headlines to work, but then I get the foreach() errors in stuff like Latest Posts, again.

                      In MyBB’s ACP, it says for the forum cookie path, to use a full path. Is /forum/ a full one? The only other thing I could think of is to have it maybe show .../forum/, which would get it out of the /reala/ dir?

                      All of this dosen’t make any sense, since the example you use for the instructions is similar folder-wise to my issue, so in theory, it should work. x_x

                      Do you happen to know what the foreach() error means? Maybe asking the MyBB developers might be a good idea...
                        My Snippets
                        -> PopUpChunk v1.0