1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XenForo and CodeIgniter Integration

Discussion in 'Add-on Releases [Archive]' started by Jerry, Dec 14, 2010.

  1. Jerry

    Jerry Well-Known Member

    simbolo, Iversia, Panupat and 13 others like this.
  2. SneakyDave

    SneakyDave Well-Known Member

    Thanks for this!
  3. Digital Doctor

    Digital Doctor Well-Known Member

    Jerry: why is CodeIgniter easier than ZendF ?
  4. Jerry

    Jerry Well-Known Member

    Much more lightweight, easier to learn, no auto code generation so you know what's in there - because you wrote it - it's less capable with regard to libraries and community support and expansion I'd say.

    Though for 80% of what people do, DX auth/tank auth/a3m & CodeIgniter and you're good to go.

    ZF is very expansive and slow to get going on for most coders I've talked with about it.
    Darkimmortal likes this.
  5. Digital Doctor

    Digital Doctor Well-Known Member

    Lightweight is good :)
  6. Jerry

    Jerry Well-Known Member

    Dean likes this.
  7. CroNiX

    CroNiX Active Member

    Awesome. I have done the same type of thing with vb3 and also vb4 and was going to check this out. Thanks!
  8. DroidHost

    DroidHost Well-Known Member

    it is really easy to understand this framework and easy to code
  9. Floris

    Floris Guest

    Jerry, for the epic win.
    Now let's hope IB didn't have a CI+XenForo integration planned for vB5 !!
  10. RickM

    RickM Well-Known Member

    Sorry to bump up a year old thread. I'm trying to use Jerry's code on a Codeigniter based site however it looks like any code igniter commands that are run after loading in the xf_auth library dont work, as it is trying to run them as part of xenforo.

    For example, a simple test controller in CI:

    class Test extends Public_Controller
        public function 
    "You're logged in to XenForo !" .
    " User id :: " $this->xf_auth->getUserId() .
    " username :: " $this->xf_auth->get('username') .
    " email :: " $this->xf_auth->get('email');
    "You are not logged in";
    With that model line there, I get this error:
    You're logged in to XenForo ! User id :: 1 username :: Rick email :: xxxxxx@xxxxxx.com
    An exception occurred: Only variables should be passed by reference in /Volumes/User Drive/htdocs/xxxxxxxxxx/site/system/cms/libraries/MX/Loader.php on line 178
    XenForo_Application::handlePhpError() in /Volumes/User Drive/htdocs/xxxxxxxxxx/site/system/cms/libraries/MX/Loader.php at line 178
    MX_Loader->model() in /Volumes/User Drive/htdocs/xxxxxxxxxx/site/addons/shared_addons/modules/xxx/controllers/test.php at line 37
    call_user_func_array() in /Volumes/User Drive/htdocs/xxxxxxxxxx/site/system/codeigniter/core/CodeIgniter.php at line 352
    require_once() in /Volumes/User Drive/htdocs/xxxxxxxxxx/site/index.php at line 259
    Any ideas? Completely stumped. The XenForo integration seems to be working, but anything after that fails.

Share This Page