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

Featured Forum Post

Discussion in 'XenForo Development Discussions' started by LPH, Jan 5, 2012.

  1. LPH

    LPH Well-Known Member

    I am curious if someone has code to grab content from a specic forum post.

    I'd like to show a "featured" post on the front page [on a WordPress install]. The idea is to take the first post in the thread, show the content, and link to the thread.

    I guess this could become a plugin but for now just the MySQL would be a start and this placed in the theme's front page.

    Thank you in advance.

    [update for clarity]
  2. LPH

    LPH Well-Known Member

    I'm not a coder but opening up phpMyAdmin gave me an SQL statement and I'm just making things up as I go. Feel free to chime in ... ;)

    $featured $this->_getDb()->fetchAll("
                SELECT message
                FROM `xf_post`
                WHERE`post_id` = 1839217
    where post_id can be made into a variable and selected.

    Now I just need to figure out how to show the contents of that post id.
  3. LPH

    LPH Well-Known Member

  4. Hyperion

    Hyperion Active Member

  5. SchmitzIT

    SchmitzIT Well-Known Member

    XenPorta offers the ability to promote a thread or post to the frontpage. Not sure if that satisfies your needs?
  6. LPH

    LPH Well-Known Member

    Thank you. I noticed that last night but the challenge is my front page is WordPress. Would that work?
  7. SchmitzIT

    SchmitzIT Well-Known Member

    Then, no. I must have missed it was for WP. Sorry.
  8. LPH

    LPH Well-Known Member

    That's okay. I liked your idea anyway :)

    I've installed the portal and had it place recent threads on the top of the forum index. This works out well. Now, I'm playing with the options but can't find a promote thread button that others are writing about for the add-on. Oh well. I'm also thinking there might be a nice way to place this on the front end ... but that thread is WAY too long. It needs to be cut into announcements of changes and a support thread with FAQs, etc. Man - that would take some work :whistle:
  9. SchmitzIT

    SchmitzIT Well-Known Member

    You should be able to configure the right to promote threads by assigning permissions in the AdminCP to the usergroups that you want to allow to promote stuff. You can also configure the individual blocks to limit the amount of characters shown :)
    LPH likes this.
  10. LPH

    LPH Well-Known Member

    Based on your answer I was able to find the permissions in the panel. :)


    Sadly, some of the popups now fail and the option to promote is still no where to be found ..

    I've gone ahead and posted here since that is the support thread. I appreciate all of your help.


Share This Page