Advertisement:

Author Topic: SSI question  (Read 3336 times)

Offline theLink

  • Semi-Newbie
  • *
  • Posts: 25
  • Gender: Male
  • Hero of Time
SSI question
« 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:

Code: [Select]

<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>

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,810
  • Gender: Male
    • Kindred-999 on GitHub
Re: SSI question
« Reply #1 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...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.