News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

10 most recent posts

Started by DEK24, December 18, 2007, 02:02:27 PM

Previous topic - Next topic

DEK24

I am looking to add them into my main page into a sub box so people can see what is going on in the forum when clicking onto main page....I've been scrolling through here for quite some time looking for something.

I found this http://custom.simplemachines.org/mods/index.php?mod=751

But I also run 1.1.4 and I'm a bit confused by the directions. I'm very very new and could use some help. Please!

jossanaijr

You can setup at
ADMIN > Current Theme > Theme and Settings > Theme Options and Preferences > Number of recent posts to display on board index:

You do not need a MOD for this.

DEK24

I want to display it on a separate webpage though sorry I didn't phrase it properly

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DEK24

Quote from: Kindred on December 18, 2007, 04:21:35 PM
ssi_recentPosts();

what does that mean? Like I said before I'm very very new to all this. Could you please clarify?

Kindred

take a look at ssi_examples.php in your forum directory...

you can use functions out of SSI.php...  including ssi_recentPosts(); which allows you to display the most recent posts from your forum on another page.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

PoliticalBear

I want my 3 most recent posts to show up like ssi_boardNews  how do I code this?

Kindred

did you even bother to try taking a look at ssi_recentPosts in SSI.php?

function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $output_method = 'echo')


So... ssi_recentPosts(3);
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DEK24

Quote from: Kindred on December 19, 2007, 06:27:39 PM
take a look at ssi_examples.php in your forum directory...

you can use functions out of SSI.php...  including ssi_recentPosts(); which allows you to display the most recent posts from your forum on another page.

Thats pretty cool I was checking this out but what do I have to add to

<hr />

         <h3>Recent Posts Function: &lt;?php ssi_recentPosts(); ?&gt;</h3>
         <?php ssi_recentPosts(); flush(); ?>


In order to make it work? I was a bit confused reading the beginning of the examples page. Any help would be appreciated.

Orstio

Quote from: ssi_examples.phpTo use SSI.php in your page add at the very top of your page before the <html> tag on line 1:

<?php require("SSI.php"); ?>


DEK24

then i just plop what i had before in after that?

How does it know its from my forum? is there something else to add in?

Orstio

I guess more precisely, the include should be:

<?php require("/path/to/SSI.php"); ?>

Where the /path/to is the absolute path to your forum.  You can find that in your SMF admin panel, server settings, in the field labelled "SMF directory".

DEK24

so i put that in then i put

<?php require("/path/to/SSI.php"); ?>

I just take out the "/path/to" and insert my SMF Directory? Am I understanding this correctly

then i put....

<hr />

         <h3>Recent Posts Function: &lt;?php ssi_recentPosts(); ?&gt;</h3>
         <?php ssi_recentPosts(); flush(); ?>


Then what do I do? You are really helping and I appreciate it so much. I know I sound like a big idiot asking all these questions.

Orstio

Yes, except instead of all that code you posted, you really only need what Kindred gave you:

<?php ssi_recentPosts(); ?>

DEK24

I'm so confused

What do I put now and where do I put it?

Orstio

This goes above your <html> tag:

<?php require("/path/to/SSI.php"); ?>

This goes wherever you want the recent posts to appear:

<?php ssi_recentPosts(); ?>

DEK24

ok i think we are misunderstanding each other.

I want the recent posts to appear on a totally different website

Dragooon

You mean the other site is on a different server?

DEK24

I want to show the recent posts on the main page of my website

www.johnnyjungle.com


from my forum

www.johnnyjungle.com/forum

Orstio

Then you can do what I posted above.

Advertisement: