• Welcome to Simple Machines Community Forum. Please login or sign up.
October 28, 2021, 02:19:08 AM

News:

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


Need SSI Help Please.

Started by rsderrick, August 14, 2009, 12:21:00 AM

Previous topic - Next topic

rsderrick

Hi Everyone,

First off I"m NOT a coder and am not good at pretending to be. I appreciate any help someone could give me.

I am trying to add recent threads from smf to my webpage. I've followed the directions (as best I  could) from various boards and had no luck. Probably because I'm not doing it correctly.

Here is my website. Notice the red block about halfway down the page. That is the error I'm getting. http://www.3d-mafia.com/master_template.shtml [nofollow]

I've inserted the code for shtml type sites:

This is what I have above the head:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "hxxp:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd [nonactive]">
<?php require("/path/to/forum/SSI.php"); ?>
<html xmlns="hxxp:www.w3.org/1999/xhtml [nonactive]">
<head>

This is what I have in the box called "Recent Forum Posts":

<!--#include virtual="./SSI.php?ssi_function=recentPosts" -->

Can someone tell me what I'm missing?


Arantor

If you have SSI.php included in regular PHP at the top of the page, you don't need to use the SHTML declaration.

You should be able to just replace that <!--#include --> with:

<?php ssi_recentPosts(); ?>
No good deed goes unpunished
All helpful urges should be circumvented

rsderrick

OK...this is really strange. I did as you said and saved the file. When I FTP'ed it up to the server I got nothing. I looked at the source behind the page I had just uploaded and it didn't have any of the code in the page. I double checked the page to make sure it was saved in Dreamweaver and it was. I then deleted and uploaded again and still nothing. I'm going to upload the file here. Can someone take a look at it at tell me what I'm doing wrong please.

Thanks in advance.

Kays

That's a shtml page and unless you've got it set to parse php, what you have won't work.

Remove that php include statement at the top. Then where you want the recent posts to appear, remove the php line there and add the following:

<!--#include virtual="forum/SSI.php?ssi_function=recentPosts" -->

If this page isn't at the root of your site , then you'll need to change the path to SSI.php

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

rsderrick

Kays

Thanks so very much for the solution. It is working great. I'm not a programmer and truly don't pretend to be very well. It's great people like you that are helping broaden my knowledge. I appreciate your help.

Kays

Glad I could help. :)

My suggestion would be not to use shtml and try to use php pages instead. There's a lot more which you can do with php than with shtml.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: