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

Using other code inside Xenforo templates

Discussion in 'Styling and Customization Questions' started by ibenick, Dec 3, 2012.

  1. ibenick

    ibenick Active Member

    This may be a stupid question, but I'm not t0tally sure if/how XF and regular web technologies can play together without special coding and am hoping someone could tell me.

    I really want to create a star rating system that I can integrate into pages (not posts). Since this doesn't exist in the XF add-on community, I've been looking at other options like purchasing this code:


    I would have no problem installing and setting something like this up in a typical environment, I'm just curious if it's possible to do inside of Xenforo or if the way XF works would break something like this or require special coding that is beyond my capability.
  2. Chris D

    Chris D XenForo Developer Staff Member

    Well at its core, XenForo is a load of PHP with a connection to a MySQL database (as you know). So theoretically you could integrate any other script that uses PHP and MySQL but it all depends on having the skill and knowledge to do so.

    XenForo does have particular ways of formatting code and extending the code using the appropriate code event listeners is recommended and has a bit of a learning curve.

    In your case, if you want these ratings on every page you'd be looking to extend the pages controller.
    Jake Bunce and ibenick like this.
  3. ibenick

    ibenick Active Member

    Thank you, Chris. That helps a lot!

Share This Page