Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => SMF Feedback and Discussion => Topic started by: gibilisco69 on April 07, 2013, 04:50:31 PM

Title: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 04:50:31 PM
On my home page I would advertise the last posts of the forum.
Is there a way to build such box/table that contains links to the posts?
Title: Re: Box to show last posts out of the forum
Post by: Chalky on April 07, 2013, 04:52:30 PM
You might want to try a portal.  Have a look on the mod site  :)
Title: Re: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 04:59:08 PM
You mean the name of function I am searching for is known as "portal"?
Title: Re: Box to show last posts out of the forum
Post by: mashby on April 07, 2013, 05:05:48 PM
Yep, there's even a category to choose one from:
http://custom.simplemachines.org/mods/index.php?action=search;type=17
Title: Re: Box to show last posts out of the forum
Post by: Vector’s Shadow on April 07, 2013, 05:10:28 PM
Quote from: gibilisco69 on April 07, 2013, 04:59:08 PM
You mean the name of function I am searching for is known as "portal"?

No, it's not the name of a function. It's a modification to the board that turns it into a web portal of sorts.
Title: Re: Box to show last posts out of the forum
Post by: Chalky on April 07, 2013, 05:14:16 PM
It's a very versatile bit of kit that lets you put blocks where you want on your forum with either preprogrammed or custom content.  Adding a recent posts block with a portal is usually as easy as clicking Add Block and selecting its type as "recent posts"  :)
Title: Re: Box to show last posts out of the forum
Post by: Kindred on April 07, 2013, 05:22:24 PM
Alternatively, if you understand a little bit about html and php and have your own homepage already, you can include the forum content using SSI.php

(see ssi_examples.php on your own forum/site)
Title: Re: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 05:25:57 PM
Quote from: Vector's Shadow on April 07, 2013, 05:10:28 PM
No, it's not the name of a function. It's a modification to the board that turns it into a web portal of sorts.
Thanks for the info, but I do not want to modify my board. I only want to add a little box on my personal template.php
Title: Re: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 05:28:12 PM
Quote from: ChalkCat on April 07, 2013, 05:14:16 PM
It's a very versatile bit of kit that lets you put blocks where you want on your forum with either preprogrammed or custom content.  Adding a recent posts block with a portal is usually as easy as clicking Add Block and selecting its type as "recent posts"  :)
Thank you for the info, but I do not want to add anything to my forum. I have my forum under /forum while my home page is /index.php

I need to add a box-links on /index.php that point to the forum's posts
Title: Re: Box to show last posts out of the forum
Post by: Arantor on April 07, 2013, 05:30:47 PM
In which case you need to look at SSI.php as Kindred suggested to manually include SSI.php and call ssi_recentPosts() with the options you require.
Title: Re: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 05:31:21 PM
Quote from: Kindred on April 07, 2013, 05:22:24 PM
Alternatively, if you understand a little bit about html and php and have your own homepage already, you can include the forum content using SSI.php

(see ssi_examples.php on your own forum/site)
BINGO  ;D

Thank you Kindred
Title: Re: Box to show last posts out of the forum
Post by: gibilisco69 on April 07, 2013, 05:32:59 PM
Quote from: Arantor on April 07, 2013, 05:30:47 PM
In which case you need to look at SSI.php as Kindred suggested to manually include SSI.php and call ssi_recentPosts() with the options you require.
Thanks Arantor. I believed to copy some text from ssi_examples.php, but it seems a little more hard. Anyway now I know where to search for.
Title: Re: Box to show last posts out of the forum
Post by: Colin on April 07, 2013, 06:48:50 PM
If you are just using the example code it really should work nearly out of the box. Do let us know if you run into trouble though.