1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Loading XF Content on a Standalone page?

Discussion in 'XenForo Development Discussions' started by san00b, Aug 3, 2011.

  1. san00b

    san00b Member

    I wasn't sure if this should be posted in here, or the Development section. If it's wrong, my apologies!

    I'm wanting to make my index page have a different look than our XF forums, but I still need to load content from the forums (a News forum, and the thread content). I'm not sure what the easiest way to do this would be: a standalone page, or could I make a XF page that hooks into this and does not use any of the XF style properties?

    If someone could just point me in the right direction, I'd greatly appreciate it.
     
  2. Floris

    Floris Guest

    It's just data in the database.

    Check out http://mycoffeecupisempty.com <-- my html5/css3 , but content is from a XenForo instance.
    No hooks, just a config.php?engine=xenforo telling my code to establish a connection to xenforo and get the thread ids from a forum. And whatever else is needed to display it. Sometimes the simpl answer is just that .. t's just data in a database, you want a standalone solution? just query the content and display it. If you want full functionality like commenting etc it might just be easier to use a portal/frontpage/cms plugin for and use that.
     
  3. san00b

    san00b Member

    Thanks for the reply.

    Could you give me a bit more info as to how you're loading the data from XenForo, or link me to a reference? (the "config.php?engine=xenforo" bit I'm confused about). I thought about just running a query, but for simplicities sake I was hoping to simply tie the page in with XF, like you have done.
     
  4. Floris

    Floris Guest

    It's stand alone .. so

    connect to your sql database that is xenforo, query the right table for the data you want, go through the array result and echo it out to the page (or parse through your custom template).

    my site uses different engine options, so when i deploy the layout to wordpress, drupal, xenforo, etc .. that's what i tell my config.php that has the info and switch to load the right database.

    you said it is all stand alone, so .. you're writing it all yourself i assume.

    connect to sql db from xf, and query the right table for the day and display it.
     
  5. san00b

    san00b Member

    Oh, right. Sorry. I thought you meant that you were somehow hooking into XenForo through an API system, not through the database directly.

    I'll just query the database directly. Appreciate the help!
     
  6. Dean

    Dean Well-Known Member

Share This Page