How to read informations from xenforo database

Discussion in 'XenForo' started by arpamonni, Nov 29, 2014.

  1. #1
    Hi,

    I have a :
    • "HTML" page as my main page >> wwww.mysite.com
    • "Xeforo Forum" as my forum >>> www.forum.mysite.com
    Now, I want to show these informations in my HTML page:
    • Number of users in my forum
    • Number of posts in my forum
    • Last 10 topics in my forums
    How can I do that? What codes should I put in my HTML page?
    Thanks
     
    Solved! View solution.
    arpamonni, Nov 29, 2014 IP
  2. #2
    i have never workf with xenforo, bu if you want to do it by yourself it you can use php with mysql requests
    here some php function to work with mysql
    http://php.net/manual/en/book.mysql.php


    Number of users in my forum
    select count(1) from xf_user;
    Code (markup):
    Number of posts in my forum
    select count(1) from xf_posts;
    Code (markup):
    Last 10 topics in my forums
    select * from xf_posts order by 1 desc Limit 10;
    Code (markup):
    here you have to join other tables that you need
     
    shureg, Dec 2, 2014 IP