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

Pulling Xenforo Threads, Avatars, Etc. Frontside Onto Wordpress Based Site?

Discussion in 'Off Topic' started by Deepmartini, Mar 19, 2013.

  1. Deepmartini

    Deepmartini Well-Known Member

    Does anyone know how of any widgets for wordpress which can pull xenforo info frontside onto a wordpress based site? Widgets such as: recent posts, who's online, unanswered posts, most popular posts, etc.

    This would be great to be able to show off what's happening in the community on other areas of the site.
     
  2. euantor

    euantor Well-Known Member

    Recent posts could be done using an RSS widget in all likelihood. The others would need a custom XF integration plugin of some sort.
     
    0xym0r0n likes this.
  3. Digital Doctor

    Digital Doctor Well-Known Member

    http://xenforo.com/community/search...ress&t=resource_update&o=date&c[title_only]=1 (then click search)

    WordPress Display Online Members 1.2.5b
    WordPress Display Forum Stats 1.2.5
    WordPress get the Lastest Forum Posts 1.4.0
     
  4. LPH

    LPH Well-Known Member

    Latest posts may be pulled by using the following:

    PHP:
    <div class="forum_posts">
     
        <h3>The following posts are from our community</h3>
     
        <?php
     
        
    /* Script to pull the latest posts from the XF Forum */
       
        
    $db XenForo_Application::getDb();
     
        if (!
    $db) {
     
            die(
    'This script did not connect to the database' mysql_error());
     
        }
     
        
    $thread_qry "
                SELECT * FROM `xf_thread`
                ORDER BY `last_post_date` DESC
                LIMIT 5
     
        "
    ;
     
        
    $threads XenForo_Application::get('db')->fetchAll($thread_qry);
     
        foreach (
    $threads AS $thread)
        {
     
                echo (
    "<div class='entry-meta'><a href='/community/" XenForo_Link::buildPublicLink('threads'$thread) .    "' >" $thread['title'] . "</a> Viewed: "  .$thread['view_count'] .      "<br /></div>"); // Echo the title with a link.
     
        
    }
     
        
    ?>
     
    </div><!-- Latest Forum Posts -->
    Hope this helps.
     
  5. craigiri

    craigiri Well-Known Member

Share This Page