Featured Forum Post

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]
 
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 ... ;)

PHP:
$featured = $this->_getDb()->fetchAll("
            SELECT message
            FROM `xf_post`
            WHERE`post_id` = 1839217
            ");
 
        return $featured;

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.
 
XenPorta offers the ability to promote a thread or post to the frontpage. Not sure if that satisfies your needs?
 
XenPorta offers the ability to promote a thread or post to the frontpage. Not sure if that satisfies your needs?

Thank you. I noticed that last night but the challenge is my front page is WordPress. Would that work?
 
Then, no. I must have missed it was for WP. Sorry.

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:
 
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 :)
 
  • Like
Reactions: LPH
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 :)

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

admin.php?user-group-permissions/administrative.3/

[Update]
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.

http://xenforo.com/community/threads/8wayrun-com-xenporta-portal.7586/page-193#post-309795
 
Top Bottom