TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 515
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 206
  • Total: 206

Pulling forum post to front page

Started by jawd, August 03, 2006, 10:59:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jawd

Well, literally all I done was get the first one working as you described.  Then created a new block.  Called news 2 etc, and copied that last piece of code into it.  Changed the board number (in this case from 32 to 36).

iwyen

I probably am going to sound lame, but could you post both block codes? Thanks

jawd

#12
Course I can! I appreciate your input here:

Block 1 - this one works

$array = ssi_boardNews(32, 1, null, 500, 'array');

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td><b>', $news['subject'], '</b></td>
</tr>
<tr>
<td>', $news['body'], '<br /><br /></td>
</tr>
</table>
<br />';

if (!$news['is_last'])
echo '
<hr width="100%" />
<br />';
}


Block 2 - Shows block name but no content (also block 3 does this)

$array = ssi_boardNews(36, 1, null, 1000, 'array');

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td><b>', $news['subject'], '</b></td>
</tr>
<tr>
<td>', $news['body'], '<br /><br /></td>
</tr>
</table>
<br />';

if (!$news['is_last'])
echo '
<hr width="100%" />
<br />';
}





G6Cad

jawd, thanks for the code, but when you post code, please use the code icon so it wraps in a code block, it is esier for us to both view and copy the code that way ;)

I edited your post and wrapped it in a code box

jawd

Ah got it, the hash icon.  Will do, and cheers.

iwyen

jawd, the codes are working fine for me. silly checklist:

- make sure it's a phpbox
- make sure the board id exist and has appropriate view permission

jawd

 :o

How dim do I feel.

Make sure you have given guest permissions in order to display news (walks away repeating to self.....)


Cheers Iwyen..

iwyen

Oh.. considering I woke up 37.5 hours ago, I'm glad I could be of some help, though I was wondering why you were looking at your own site as a guest. That's so careful! I usually wait for someone to scream at me hee hee :D

jawd

Oh I was looking as a guest myself, I hadnt enabled guests to view the board.  I think Im right in saying for this feature to work, the guests box has to be ticked.

iwyen

if guests are not suppose to see the posts, then don't allow them to see the block so you'll get 1 block for guests and 3 blocks for logged in users

This website is proudly hosted on Crocweb Cloud Website Hosting.