Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: EliTe_ThuT on March 17, 2009, 06:00:51 PM

Title: Board/Topic Coding SSI
Post by: EliTe_ThuT on March 17, 2009, 06:00:51 PM
Hi !!

I would need a little help here !  :D

I have page "A" that contains :

<?php
  $array
= ssi_boardNews(2, 5, null, 200, 'array');
  foreach (
$array as $news)
  {
     echo
'
<li class="menu"><a href="B.php?id='
, $news['id'], '">
<img alt="News" src="thumbs/notepad.png" /><span class="name">'
, $news['subject'], '</span><span class="comment">', $news['time'], '</span><span class="arrow"></span></a></li>
'
;

     if (!
$news['is_last'])
        echo
'';
  }
?>


Notice that the link in this piece of code is linking to B.php?id=$news['id']

In this page "B", I have a
<?php
if(isset(
$_GET["id"])) {$id=$_GET["id"]} ;

?>


That's about as far as I can go... Now I want to retrieve the body of the first post of the topic's id that I have retrieved in my GET. HELP !  :o

Am I doing it the right way ?


Thanks a lot! Any help appreciated !

Title: Re: Board/Topic Coding SSI
Post by: onepiece on March 18, 2009, 08:49:24 AM
Have a look at this (http://www.simplemachines.org/community/index.php?topic=299379.msg1980734#msg1980734) post.
Title: Re: Board/Topic Coding SSI
Post by: EliTe_ThuT on March 18, 2009, 07:43:30 PM
works great!

Thanks a lot