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

XF 1.4 Last Posts on the sidebar.

Discussion in 'XenForo Questions and Support' started by Bala, Dec 31, 2014.

  1. Bala

    Bala Member

    I wan to show the last posts in the sidebar on the index page.
    I would like this to be done without the use of any addons, ie via template edits and using the xenforo helper functions to do so. Kindly please assist me on how to proceed.
    Thankyou.
     
  2. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    I don't think you will be able to do it without using an add-on as you'll need to fetch the 'latest' posts from the database...
    Or do you want something like fetch all the last post from each of the nodes from the main node list and display them in the sidebar block?
     
  3. Bala

    Bala Member

    Okay if it is an addon, can you recommend me a free one?

    If it is case-2 how do I do that?
     
  4. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    Bala likes this.
  5. Bala

    Bala Member

    I dont want to put any extra queries. MyBB had a variable to output the latest threads. I am waiting for @Brogan or @Jake to comment if Xenforo does have some equivalent feature.
     
  6. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    Want me to create 'case 2' that wont use any queries? :D
     
  7. Bala

    Bala Member

    Sure mate. Why not. Rather than you creating I would love if you can teach me bro. I am a budding web developer and well xenforo is just a day old to me.
     
  8. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay... so you have to port into XenForo_ViewPublic_Forum_List and extend renderHtml and get the list of recent posts from there. And then create a template modification to add a new sidebar block where the recent posts will be shown (you will need to stylize the look).
     
  9. Bala

    Bala Member

    Can you explain it to me with the help of a code? it will be great. Thanks mate.
     
  10. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    How much do you know about creating add-ons in XenForo? :)
     
  11. Bala

    Bala Member

    Literally nothing. Its just 3 days since I started working with XF.
     
  12. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

Share This Page