News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SSI question

Started by kbarg, January 31, 2017, 09:47:31 PM

Previous topic - Next topic

kbarg

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>

Kindred

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...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: