SSI Functions

Started by karlh1, February 15, 2012, 05:03:08 PM

Previous topic - Next topic

karlh1

I am using the ssi function recent topics and I don't know what to put in the (exlude board=null) and (include board=null)
If I leave them as null recent topics of all boards come up. What do I need to put in place of null.

Suki

Depends on what you want, do you want to exclude some boards or you just want to include some boards?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

karlh1

Thanks Suki,
that turned out to be pretty obvious. I got that to work, but after validating my website I had to declare a doctype to get my layout to work on all browsers.
After doing that, my recent topics don't post on my website anymore. I've tried a lot of different doctypes but none of them work unless I take it out completely.
Any ideas? This is the code I have at the beginning.

<?php require("../forum/SSI.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd [nofollow]">
<html>

Suki

What is the error you're getting?

SSI functions should provide valid xhtml
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

karlh1

I'm not getting any errors. when i validate my only errors are in the code for the facebook like button which i copied directly  from facebook so i left it.
but the recent posts still doesn't post.

Suki

copy/paste here the whole code you're using.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

karlh1

Here it is. The thing i just realized is the welcome function works and comes up on the page every time.

<?php require("../forum/SSI.php"); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd [nofollow]">
<html>

   <head>
   <title>Alcona County Lakes </title>
   
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
   <link rel="stylesheet" type="text/css" href="../style.css">
   </head>
   

   <body>
   <div id="container">
      <p id="county">
      Alcona County
      </p>


   <h1> 
   <img src="../logo.jpg" alt="FishMich.com">
   </h1>



<div class="like1">
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id [nofollow] = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"; [nofollow]
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-like" data-href="http://www.fishmich.com/counties/alcona.php [nofollow]" data-send="true" data-width="450" data-show-faces="true"></div>
</div>

   <p id="store">
   <a href="../store.html"title="Store">Michigan <br>Store</a>
         </P>

   <p id="advertise">
   <a href="../advertise.html"title="Advertise">Advertise</a>
         </P>
   <p id="home">
   <a href="../index.php"title="Home">Home</a>
         </P>

   <p id="welcome"><?php ssi_welcome(); ?>
         </p>



   <p id="ftitle">
   <a href="../forum/index.php?board=8.0"title="Fishing Forum">Fishing Forum</a><br>
   </p>


   <p id="finstruct">
   Ask questions, share knowledge or just chat with your fishing buddy.
      </p>


   
   <p id="forum">
<?php ssi_recentTopics($num_recent = 5, $exclude_boards = null, $include_boards = 8.0, $output_method = 'echo'); ?>
   </p>
      
</div>
   </body>
</html>

karlh1

I figured it out. Thank you for your help.
Just changed <p id="forum"> to <div class="forum>
and it works.

Advertisement: