Simple Machines Community Forum

General Community => Scripting Help => Topic started by: kbarg on January 31, 2017, 09:47:31 PM

Title: SSI question
Post by: kbarg on January 31, 2017, 09:47:31 PM
I have used

<?php ssi_news(); ?>

a lot in the past to include my "news" to the front page of my website, but my question is how do I go about theming it? TO customize the css and everything to how I want it.

Example:


<div style="background-image:url('../img/themes/footer.jpg'); background-repeat:repeat-x; width="600px">
   <div style="height:55px;">
     <div style="padding-top: 2px; float: left; height: 48px; width: 48px;">{avatar}</div>
     <div style="font-family: 'Trebuchet MS', Helvetica, sans-serif; font-size:26px; font-weight:bold; height:32px;">&nbsp;{title}</div>
     <div style="font-size:10px;">&nbsp;&nbsp;&nbsp;Posted by {author} - {date}</div>
   </div>
   <div style="padding-left: 5px; padding-right: 5px;"><br>{message}</div>
 
  </div>
<br>
<div style="background-image:url('../img/themes/breadcrumb2.jpg'); background-repeat:repeat-x; height:19px;"></div>
Title: Re: SSI question
Post by: Kindred on January 31, 2017, 11:42:50 PM
read the ssi function into an array
then call out the contents in html/php with css...

Code (like so) Select

<?php 
require_once('SSI.php');
global 
$context;
$the_news ssi_news('array');
foreach (
$the_news as $newsline {
echo 
'<div style="somestylecss here">'$newsline ,'</div>';
}




although, the ssi_news function has very little actual choice...