Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: DEK24 on December 18, 2007, 02:02:27 PM

Title: 10 most recent posts
Post by: DEK24 on December 18, 2007, 02:02:27 PM
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!
Title: Re: 10 most recent posts
Post by: jossanaijr on December 18, 2007, 02:23:07 PM
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.
Title: Re: 10 most recent posts
Post by: DEK24 on December 18, 2007, 02:44:28 PM
I want to display it on a separate webpage though sorry I didn't phrase it properly
Title: Re: 10 most recent posts
Post by: Kindred on December 18, 2007, 04:21:35 PM
ssi_recentPosts();
Title: Re: 10 most recent posts
Post by: DEK24 on December 19, 2007, 06:24:00 PM
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?
Title: Re: 10 most recent posts
Post by: 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.
Title: Re: 10 most recent posts
Post by: PoliticalBear on December 19, 2007, 09:37:24 PM
I want my 3 most recent posts to show up like ssi_boardNews  how do I code this?
Title: Re: 10 most recent posts
Post by: Kindred on December 20, 2007, 08:06:03 AM
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);
Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 01:30:35 PM
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.
Title: Re: 10 most recent posts
Post by: Orstio on December 20, 2007, 01:36:31 PM
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"); ?>

Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 01:50:48 PM
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?
Title: Re: 10 most recent posts
Post by: Orstio on December 20, 2007, 02:42:08 PM
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".
Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 03:38:10 PM
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.
Title: Re: 10 most recent posts
Post by: Orstio on December 20, 2007, 04:09:58 PM
Yes, except instead of all that code you posted, you really only need what Kindred gave you:

<?php ssi_recentPosts(); ?>
Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 08:23:51 PM
I'm so confused

What do I put now and where do I put it?
Title: Re: 10 most recent posts
Post by: Orstio on December 20, 2007, 09:58:43 PM
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(); ?>
Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 10:16:50 PM
ok i think we are misunderstanding each other.

I want the recent posts to appear on a totally different website
Title: Re: 10 most recent posts
Post by: Dragooon on December 20, 2007, 10:18:56 PM
You mean the other site is on a different server?
Title: Re: 10 most recent posts
Post by: DEK24 on December 20, 2007, 10:36:25 PM
I want to show the recent posts on the main page of my website

www.johnnyjungle.com


from my forum

www.johnnyjungle.com/forum
Title: Re: 10 most recent posts
Post by: Orstio on December 20, 2007, 10:37:48 PM
Then you can do what I posted above.
Title: Re: 10 most recent posts
Post by: DEK24 on December 21, 2007, 12:06:24 AM
ok i just tried to toss this into my html page and the page went nuts with no recent posts.

I use a program iweb to design my site and it allows you to insert html snippets, usually what I do when I add ads or a youtube video. Is there anyway to do something like this to add the recent posts?
Title: Re: 10 most recent posts
Post by: Orstio on December 21, 2007, 06:35:37 AM
"page went nuts" doesn't really help to determine where you went wrong.

Did you get error messages?  If so, what error messages did you get?
Title: Re: 10 most recent posts
Post by: PFDWM on December 21, 2007, 06:35:52 PM
Hello I just followed instructions here and nothing showed up, Page didnt go nuts but nothing showed up.  No error messages.  But I am using a HTML website, does it have to be XHTML or something else?
Title: Re: 10 most recent posts
Post by: Orstio on December 21, 2007, 07:37:18 PM
And you used the path from the "SMF directory" field in your SMF admin panel, server settings?
Title: Re: 10 most recent posts
Post by: PFDWM on December 21, 2007, 08:05:15 PM
yeah its a shared server from godaddy /home/content/u/s/e/username/html/

subsituted username : for real info
Title: Re: 10 most recent posts
Post by: Orstio on December 21, 2007, 08:20:17 PM
So this is what you have above your <html> tag?

<?php require("/home/content/u/s/e/username/html/SSI.php"); ?>
Title: Re: 10 most recent posts
Post by: PFDWM on December 21, 2007, 08:26:40 PM
You got it
Title: Re: 10 most recent posts
Post by: Orstio on December 21, 2007, 08:49:27 PM
And your forum is here:

/home/content/u/s/e/username/html/

And not in a subdirectory, like this?

/home/content/u/s/e/username/html/forum/
Title: Re: 10 most recent posts
Post by: PFDWM on December 21, 2007, 08:54:11 PM
sorry yes it is in a sub directory /pfd forum/
Title: Re: 10 most recent posts
Post by: Orstio on December 21, 2007, 08:55:31 PM
So then the code should be this?

<?php require("/home/content/u/s/e/username/html/pfd forum/SSI.php"); ?>
Title: Re: 10 most recent posts
Post by: PFDWM on December 21, 2007, 09:02:21 PM
Yeah Im sorry I did do that sorry should ahve stated that
/home/content/..../pfd forum/ssi.php
Title: Re: 10 most recent posts
Post by: DEK24 on December 22, 2007, 01:01:42 AM
Quote from: Orstio on December 21, 2007, 06:35:37 AM
"page went nuts" doesn't really help to determine where you went wrong.

Did you get error messages?  If so, what error messages did you get?

everything on the page went blurry out of order and it looked like it was being covered by the matrix
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 08:00:08 AM
Quoteeverything on the page went blurry out of order and it looked like it was being covered by the matrix

You don't happen to be using something like FrontPage or DreamWeaver to edit the file?
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:12:25 AM
ummmm Yeah :(
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:14:32 AM
Try using Notepad instead.  Or, if you want something with colour highlights, use NotePad++.  FrontPage and DreamWeaver can do strange things with PHP code.
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:17:54 AM
ok I will try it... But im going to need the button i guess in the future
you going to be around in case things go arye
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:29:41 AM
Hmm well I edited it with note pad put
Quote<?php require("/home/content/u/s/e/username/html/Patterson Fire Dept Forum/SSI.php"); ?>
on line 1

Quote<?php ssi_recentPosts(8 ); ?>

where I want the post to show up
Note: had to put a space between 8 )  when posting b/c it went to smiley

But still no luck with it showing up
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:31:35 AM
Can I see the URL?
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:32:49 AM
Not showing up

the site is www.pattersonfiredept.org (http://www.pattersonfiredept.org)
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:34:03 AM
What happens if you change the name of index.htm to index.php?

Also, if I go to your forum:

http://www.pattersonfiredept.org/Patterson%20Fire%20Dept%20Forum/

There are no posts visible to guests, so there won't be anything in your recent posts...
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:36:06 AM
hmmm...using fp will that make a difference
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:38:07 AM
fp?
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:39:08 AM
frontpage,  but it worked check it out i need help figuring how to fix this please www.pattersonfiredept.org/index.php (http://www.pattersonfiredept.org/index.php)
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:43:49 AM
That explains why your page source is so messed up. 

Can you copy your page code and paste it here?
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:49:14 AM
<?php require("/home/content/u/s/e/username/html/Patterson Fire Dept Forum/SSI.php"); ?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Patterson Fire Department No. 1 Inc.</title>
<table border="0" cellpadding="2" cellspacing="0" width="900" height="1748">
<!-- MSTableType="layout" -->
<tr>
<th valign="top" colspan="4" height="167">
<!-- MSCellType="ContentHead" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="1" -->
<tr>
<td bgcolor="#000000" nowrap height="144" valign="middle">
<!-- MSCellFormattingType="header" -->
<p align="center">
<img border="0" src="flame.gif" width="72" height="136"><img border="0" src="coollogo_com_320745977.gif" width="739" height="81"><img border="0" src="flame.gif" width="72" height="136"><br>
<br>
<i><font color="#FFFFFF">Est. 1921</font><font color="#FF0000"> <br>
&nbsp;</font></i></td>
</tr>
</table>
</th>
</tr>
<tr>
<th valign="top" colspan="4" height="69">
<!-- MSCellType="ContentHead" -->
<form method="POST" action="index.php" onSubmit="" webbot-action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="D:\My Web Sites\Patterson Fire Departmant\_private\form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan -->
<!--webbot CLIENTSIDE
bot="Ws4FpEx" MODULEID="'Default (Project)\elements_hnavbar_off.xws'" PREVIEW="<img src='elements_hnavbar.gif?00ACC445' editor='Webstyle4' border='0'>" startspan  --><script src="xaramenu.js"></script><script Webstyle4 src="elements_hnavbar.js"></script><noscript><img src="elements_hnavbar.gif?00ACC445" editor="Webstyle4"></noscript>
<!--webbot
bot="Ws4FpEx" endspan  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
  <LINK REL="StyleSheet" HREF="file:///D:/My%20Web%20Sites/Patterson%20Fire%20Departmant/menu.css">
  <script language="javascript" src="file:///D:/My%20Web%20Sites/Patterson%20Fire%20Departmant/menu.js"></script>
</head>
</html>
<html>

<head>
</head>
</html>
<html>

<head>
  <br>
</head>
</html><b><font face="Arial" color="#000000">
<marquee bgcolor="#FFFF00">Welcome to the Patterson Fire Departments Website&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ****&nbsp; Please bare with us as our web site is updated&nbsp; ****</marquee></font></b><html><head></head><body style="text-align: center" bgcolor="#000000"></body></html></th>
</tr>
<tr>
<td valign="top" rowspan="3" width="133">
<!-- MSCellType="NavBody" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="3" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<p align="center">
<br>
<img border="0" src="AnimatedAmericanFlag.gif" width="68" height="50"><p align="center">
<img border="0" src="IMG_0757.jpg" width="152" height="223"><p align="center">
<br>
<a href="http://www.pattersonfiredept.org/Patterson%20Fire%20Dept%20Forum/">
<img border="0" src="FORUM.gif" width="114" height="78"></a><p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
&nbsp;<p align="center">
<br>
<br>
<img border="0" src="Candle.gif" width="114" height="115"><br>
<font color="#FFFFFF">L.O.D.D <br>
<b>Mathew P. Lamb</b><br>
11-08-2007<br>
Carmel FD &amp;<br>
Carmel V.A.C.<br>
</font>
<img border="0" src="Mattlambblackbackground%20copy.jpg" width="151" height="150"></td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
<td valign="top" colspan="2" height="481">
<!-- MSCellType="ContentHead2" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="4" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<p align="center">&nbsp;</p>
<p align="center">
<img border="0" src="iUnderConstruction.GIF" width="222" height="167"></p>
<h3 align="center">
<img border="0" src="100_4429.JPG" width="569" height="345"><br>
<font size="2"><span style="font-weight: 400"><i>Open House 2007</i></span></font></h3>
</td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
<td valign="top" rowspan="3" width="150">
<!-- MSCellType="NavBody2" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="7" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<p align="center"><br>
<font face="Arial" size="2"><font color="#FF0000"><u><b>Chief</b></u><br>
</font>
<i><font color="#FFFFFF">Frank Smith</font></i><font color="#FFFFFF"><u><b><br>
</b></u>
</font>
</font><u><b><font face="Arial" size="1"><br>
</font><font face="Arial" size="2" color="#FF0000">1st Asst. Chief</font></b></u><font face="Arial" size="2"><br>
<i><font color="#FFFFFF">James Fredericks<br>
</font>
</i><u><b><br>
<font color="#FF0000">2nd Asst. Chief</font></b></u><font color="#FF0000"><br>
</font>
<font color="#FFFFFF">
<i>Edward O'Connell<br>
</i></font></font><font face="Arial"><u><b><font size="2"><br>
<font color="#0000FF">President</font></font></b></u><font size="2" color="#0000FF"><br>
</font></font><font color="#FFFFFF"><i><font size="2" face="Arial">Paul Smith</font></i></font><u><b><font size="2" face="Arial"><font color="#FFFFFF"><br>
</font>
<br>
<font color="#0000FF">Vice President</font></font></b></u><font face="Arial"><font size="2" color="#0000FF"><br>
</font><font color="#FFFFFF"><i><font size="2">Bert Gonci</font></i></font></font><u><b><font size="2" face="Arial"><font color="#FFFFFF"><br>
</font>
<br>
<font color="#0000FF">2nd Vice President</font></font></b></u><font face="Arial"><font size="2" color="#0000FF"><br>
</font><i><font size="2" color="#FFFFFF">Cindy Covell</font></i></font></p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" height="320" align="center">
<!-- MSCellType="ContentBody" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="6" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<h3 align="center">
<font color="#FFFFFF" face="Arial"><u><br>
<font size="3">About the Patterson Fire
Department</font></u></font></h3>
<p align="center">
<font color="#FFFFFF">The Patterson Fire Department, located in Putnam
County, NY, provides&nbsp;fire, rescue, and
EMS&nbsp;protection to almost 7,000 residents in the
Patterson Fire District, one of two Fire
Districts in the Town of Patterson.&nbsp;&nbsp;The
Patterson Fire Department is a 100% Volunteer
Fire Department; its 60 active members respond
to over 500 fire and EMS emergencies every year.</font><font size="2" color="#FFFFFF" face="Arial"> </font>
<font size="2" color="#FFFFFF">&nbsp;</font><h3 align="center">
<font color="#FFFFFF" face="Arial" size="3"><u>
Interested In Becoming A Member?</u></font></h3>
<p align="center">
<font color="#FFFFFF" face="Arial" size="2">Stop
by during a regular drill or work detail and
pick up an application!&nbsp; Volunteers are
always needed.&nbsp; Click here to fill out an
application, and drop it off at the firehouse.
<br>
</font>
<font color="#FFFF00" face="Arial" size="2">
Regular Drill: Thursday's 7:00pm<br>
Work Detail: Sunday's 10:00am</font><p align="center">
&nbsp;</td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
<td valign="top" width="300">
<!-- MSCellType="ContentBody2" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="5" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="middle" width="100%">
<!-- MSCellFormattingType="content" -->
<p align="center">
<img border="0" src="IMG_0753.jpg" width="280" height="250"><br>
<br>
<b><font color="#00FF00">Happy Holidays !!!!</font></b></p>
</td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="301" height="336">
<!-- MSCellType="ContentBody" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="9" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<h3 align="center">
<br><?php ssi_recentPosts(5); ?>
                                                                <font color="#FFFFFF">
<br>
&nbsp;</font></h3></td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
<td valign="top" width="300" height="336">
<!-- MSCellType="ContentBody2" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="2" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<p align="center"><br>
<font color="#FF0000"><b>VIDEO!<br>
Structural Fire Training<br>
Sherman, CT<br>
</b><i>(Click on Picture)</i></font></p>
<p align="center">
<a href="http://www.pattersonfiredept.org/SHERMAN%20BURNS.wmv">
<img border="0" src="22112514[1].JPG" width="290" height="222"></a></p>
<p align="center"><font size="2"><i>Note: Video could take up to 5mins
to load!</i></font></td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="4" height="368">
<!-- MSCellType="ContentFoot" -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<!-- MSCellFormattingTableID="8" -->
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
<td valign="top" width="100%">
<!-- MSCellFormattingType="content" -->
<h3 align="center">
<p align="center">
<br>
<img src="http://www.attractive-hit-counters.com/cgi-bin/image.pl?URL=www.pattersonfiredept.org"  border="0" align="center" ><br>
<br>
<span style="font-weight: 400"><font color="#FFFFFF" face="Arial">
<img border="0" src="911logo.gif" width="155" height="62"><br>
</font><font face="Arial" size="2" color="#FFFFFF">Non
Emergency Phone: 845-878-6047<br>
Corporate Fax: 845-878-7829<br>
Fire Fax: 845-878-2211<br>
</font><font face="Arial" size="2">
<a href="mailto:[email protected]">Corporate Email</a><br>
<a href="mailto:[email protected]">Fire Email</a><br>
<a href="mailto:[email protected]">Rescue/Ambulance Email</a></font></span></p>
</h3>
<p align="center">
All Content Contained Within This Website Is Copyrighted <br>
© 2007 Patterson Fire Department No.1, Inc.<br>
Web Design by Website Committee</td>
<td bgcolor="#FFFFFF" height="100%" width="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" colspan="3" height="1">
<p align="center">
<img alt="" width="1" height="1" src="MsSpacer.gif"></td>
</tr>
</table>
</td>
</tr>
</table><style>HTML,BODY{cursor: url("http://downloads.totallyfreecursors.com/cursor_files/FireOrange.ani"), url("http://downloads.totallyfreecursors.com/thumbnails/FireOrange.gif"), auto;}</style>
<p align="center">&nbsp;
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 09:51:06 AM
but like i said it worked but how do i get the links not to crunch up?
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 09:55:00 AM
I would remove them from the <h3> tags, for a start:

<td valign="top" width="100%">
               <!-- MSCellFormattingType="content" -->
                        <h3 align="center">
                        <br><?php ssi_recentPosts(5); ?>
                                                                <font color="#FFFFFF">
                        <br>
                        &nbsp;</font></h3></td>


Change to:

<td valign="top" width="100%">
               <!-- MSCellFormattingType="content" -->
                 
                        <br><?php ssi_recentPosts(5); ?>
                                                                <font color="#FFFFFF">
                        <br>
                        &nbsp;</font></td>
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 10:00:11 AM
did that but nothing different
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 10:15:56 AM
Ok So I figured my problem
- the date text is black (my BG is black)
-text is to big all together, is there a way to change that?

Quote[Up Coming Events]  Heartsaver AED Course by pfdwc  Today at 12:46:45 AM 
[Up Coming Events]  BLS CPR Course by pfdwc  Today at 12:42:39 AM 
[Downloads & Documents]  NYS EMT Pilot Refresher Forms by pfdwc  Today at 12:08:31 AM 
[Downloads & Documents]  Putnam County BES Forms by pfdwc  December 21, 2007, 11:20:12 PM 
[Downloads & Documents]  Fire Drill Schedule by pfdwc  December 21, 2007, 

as you see its throwing my whole page out of wack
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 10:31:12 AM
<td valign="top" width="100%">
               <!-- MSCellFormattingType="content" -->
                 
                        <br><font size="8pt"><?php ssi_recentPosts(5); ?></font>
                                                                <font color="#FFFFFF">
                        <br>
                        &nbsp;</font></td>
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 10:36:07 AM
Quote<tr>
               <td bgcolor="#FFFFFF" width="1">
               <img alt="" width="1" height="1" src="MsSpacer.gif"></td>
               <td valign="top" width="100%">
               <!-- MSCellFormattingType="content" -->
                         <h3 align="Center"><br><font color="#FFFF00">
<u>Current Forum Topics</u><br>
<span style="font-weight: 400"><i><font size="2">Note: Topics will not show if
have not logged into the forums!</font></i></span></font>
                        <br><font size="8pt"><?php ssi_recentPosts(5); ?></font>

                                                                <font color="#FFFFFF">
                        <br>
                        &nbsp;</font></h3></td>
               <td bgcolor="#FFFFFF" height="100%" width="1">
               <img alt="" width="1" height="1" src="MsSpacer.gif"></td>
            </tr>

No change
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 10:41:04 AM
You need to remove it from in between the <h3> tags.  Until you do that, it will be too big.
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 10:47:37 AM
ok thought it did that, my fault
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 11:14:36 AM
OK got it where I want Color still wrong I added
Quote<font color="#FFFF00"><font size="8pt"><?php ssi_recentPosts(5); ?></font></font>

It's not in the <h3> tags

but no size change or color change

sorry i'm really not good at this but you have gotten me further than I would have gotten by myself
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 11:41:14 AM
I would suggest some style with CSS, but with as messed up as FrontPage has made your source, I can't guarantee that it will work.

You need to change the colour of a:link, not the font colour.
Title: Re: 10 most recent posts
Post by: DEK24 on December 22, 2007, 01:13:07 PM
Is there anyway to do this without doing all this code and using something like front page?
Title: Re: 10 most recent posts
Post by: Orstio on December 22, 2007, 02:14:04 PM
The best way is to not use FrontPage.  The best way is to use Notepad.

There is not a lot of code.  Just those two lines I posted on page 1 of this topic.


Quote from: Orstio on December 20, 2007, 09:58:43 PM
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(); ?>
Title: Re: 10 most recent posts
Post by: PFDWM on December 22, 2007, 02:57:37 PM
Well the link color is fine its the date stamp... Seems to be the wrong color ill try changing the color of the link ill let you know  Thanks a bunch

PS.  FP (frontpage) won't let you save this ext (.php) has to be done in Dreamweaver or Notepad (found that out the hard way)  WOOHOO I learned something
Title: Re: 10 most recent posts
Post by: Kindred on December 24, 2007, 11:12:48 PM
once again...   it is highly recommended that you do not use frontpage or dreamweaver...

Use a text editor. Notepad++, ConText, EditPlus, UltraEdit all have code-colouring...  and none of them mess up your pages like FP or DW...
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 10:16:07 AM
Hi all,
i have the some problem, to put in my home page html some of SSi.php, but i can't find the path to the SSi, maybe i have wrong something on the control panel of server.
i found this:
- the url of the forum: my site/forum
- Directory of SMF: c:\domains\my site\wwwroot\forum
- Directory of source: c:\domains\my site\wwwroot\forum

how can be "C:" ???
Title: Re: 10 most recent posts
Post by: Kindred on December 27, 2007, 10:19:13 AM
are you running from your local computer?
Are you running on Windows IIS?
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 10:28:11 AM
not from local

this is my home page : my site/index.html
and the forum: my site/forum/
thinx for answer
Title: Re: 10 most recent posts
Post by: Kindred on December 27, 2007, 10:41:34 AM
Quote from: Kindred on December 27, 2007, 10:19:13 AM
Are you (Is your host) running on Windows IIS?
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 10:44:33 AM
yes it is, but not in local so i don't understand why i have this "c:" and i do not changing nothing while installing SMF.
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 10:48:29 AM
i put this on my home page,
but i have no answer
<?php require("/domains/my site/forum/SSI.php"); ?>
Title: Re: 10 most recent posts
Post by: Orstio on December 27, 2007, 10:58:46 AM
c:\domains\my site\wwwroot\forum

That is correct.  You are on a Windows server.
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 11:10:04 AM
so??
what i have to write on php code???
i mean this: <?php require("/domains/my site/forum/SSI.php"); ?>
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 11:33:24 AM
no way to do it on windows server?
please help
Title: Re: 10 most recent posts
Post by: Kindred on December 27, 2007, 11:53:22 AM
Orsito just told you...

<?php require("c:\domains\my site\wwwroot\forum\SSI.php"); ?>
Title: Re: 10 most recent posts
Post by: thejackal on December 27, 2007, 11:58:34 AM
nothing :(
i have no message error. Here is my home page:


<?php require("c:\domains\my site\wwwroot\forum\SSI.php"); ?>
<head>
<title>****************</title>
<LINK REL="SHORTCUT ICON" HREF="************">
<style>
* { font-family: verdana; font-size: 10pt; COLOR: gray; }
b { font-weight: bold; }
table { height: 50%; border: 1px solid gray;}
td { text-align: center; padding: 25;}

</style>
</head>
<body>
<center>
<br><br><br><br>
<table>
<tr>

      <td>Benvenuto nel sito di <b>********</b></td>
    </tr>
<tr>
      <td><img src="/forum/Themes/default/images/MAROCCO_LOGO.gif" width="400" height="88"></td>
    </tr>
<tr>
      <td style="font-size: 8pt"><p>Stiamo allestendo a nuovo tutto il sito</p>

        <p><a href="/forum/index.php"><strong><font size="5">FORUM</font></strong></a></p></td>
    </tr>
</table>
  <p>&nbsp;</p>
</center>
<?php ssi_recentTopics(); ?>
</body>

</html>

thinx for answer
Title: Re: 10 most recent posts
Post by: Kindred on December 27, 2007, 01:23:22 PM
two things...

1- where is the opening <html> tag?
2- What is the file saved as?
(name and extension)

as a note: Please use the [ code] tags to enclose code like that
Title: Re: 10 most recent posts
Post by: thejackal on December 28, 2007, 03:09:31 AM
hi Kindred,
sorry about the code space, i'm new.
so, for the number one: i don't understand the question, i have just this in the home page, so maybe this opening <html> my problem, and if it is, what can i have to do.
the second, the name of file is index.html
think you very much
P.s: i put this on the second line but still nothing <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Title: Re: 10 most recent posts
Post by: Kindred on December 28, 2007, 08:30:49 AM
try this...   and name it index.php


<?php require("c:\domains\my site\wwwroot\forum\SSI.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>****************</title>
  <LINK REL="SHORTCUT ICON" HREF="************">
  <style>
    * { font-family: verdana; font-size: 10pt; COLOR: gray; }
    b { font-weight: bold; }
    table { height: 50%; border: 1px solid gray;}
    td { text-align: center; padding: 25;}
  </style>
</head>
<body style="text-align:center;">
  <br /><br /><br /><br />
  <div class="logoTable">
    <table>
      <tr><td>Benvenuto nel sito di <b>********</b></td></tr>
      <tr><td><img src="/forum/Themes/default/images/MAROCCO_LOGO.gif" width="400" height="88"></td></tr>
      <tr>
        <td style="font-size: 8pt">
           <p>Stiamo allestendo a nuovo tutto il sito</p>
           <p><a href="/forum/index.php"><strong><font size="5">FORUM</font></strong></a></p>
        </td>
      </tr>
    </table>
  </div>
  <div class="showRecent">
    <?php ssi_recentTopics(); ?>
  </div>
</body>
</html>
Title: Re: 10 most recent posts
Post by: thejackal on December 28, 2007, 08:50:06 AM
think you very much, with Php it's ok, but i would like to do it with HTml that i know how to work with.
i'll try to work with this, hope will be easy.
thinks again and happy new year
Title: Re: 10 most recent posts
Post by: Kindred on December 28, 2007, 11:16:46 AM

I don't understand what you mean "you would like to do it with HTML"...
the file is NAMED index.php, but most of the contents are (as you see) HTML.

The only PHP in that file are the sections within the  <?php ...  ?> tags.

One side note: If you plan to run a PHP based forum, I suggest you start learning some php. :)