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,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 556
  • Total: 556

custom "Recent Topics from Board X, Y, Z only" php block

Started by iowamf, November 04, 2005, 09:47:16 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

villano666

So, if I want to show only one forum I should include all the other ones in the code?

JPDeni

Yes. That's the way the original function was written. In the SSI.php file (which is where the function is), that array is named $exclude_boards.

villano666

#132
Thanks, I see how it works now :)
Another question, how can I do so that the "new" image appears next to the title and not below?

alhaudhie

#133
echo '
<table cellspacing="1" cellpadding="1" border="1" align="" width="200" summary="">
   <tbody>
       <tr>
           <td> </td>
           <td> </td>
       </tr>
       <tr>
           <td> </td>
           <td> </td>
       </tr>
   </tbody>
</table></td>';


with this table above i want to put this code below in each/every table.. how can i make it? its because i want to put multiple results for every tables thats only change in $result=ssi_recentTopics_NEW(10,array(26),'return');
i want to put it in custom page to show all boards with the newest topic.


global $context, $scripturl;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';
$result=ssi_recentTopics_NEW(10,array(26),'return');

echo'<table border="0" width="100%" id="table1" cellpadding="2" style="border-collapse: collapse">
<tr><td width="692px"><div class="titlebg" align="center">New Topic In First Board</td></tr><tr>
<td>';
echo '<left>';
foreach($result as $my){

echo'<span class="smalltext3"><img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" /><nbsp;>'.$my['link'];
 echo "<br>";

}
echo '</span>';
echo'</td><td>';

echo'</td></td></tr>

</table>';




JPDeni

I'll write back what I think you want and you tell me if I'm right, okay? :)

You want to have a link with the name of the topic that has the most recent post for each board on your forum. (Or maybe you want the topics with the 10 most recent posts. I'm not sure.) You want the links to print out in two columns.

alhaudhie

The second is nearly right... i want to make to colums that show two different board for every colums.

JPDeni

You can give this a try. You'll need to put the numbers of the boards into the $boards array.


global $context, $scripturl;
$bullet = '<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />';

// List the numbers of the boards you want to be displayed in this array
$boards = array(26, 25, 24, 23);

$new_row = 1;
echo '<table border="0" width="100%" id="table1" cellpadding="2" style="border-collapse: collapse">';

foreach ($boards as $board) {
if ($new_row)
echo '<tr>';
echo '
<td>';
$result=ssi_recentTopics_NEW(10,array($board),'return');
foreach($result as $my){

echo '
<span class="smalltext3">
<img src="'.$settings['images_url'].'/TPdivider3.gif" alt="" border="0" style="margin:0 2px 0 0;" />
<nbsp;>' . $my['link'] . '
</span><br>';
}
echo'
<td>';
if (!$new_row)
echo '</tr>';
$new_row = !$new_row;
}

echo '</table>';


I haven't really tested this because I don't have that function installed.

alhaudhie

#137
Yes.. very nice help. TQ

Soo hope i can to another one.

1- How can i put the manual board/category in the top of every new topics list?

2- also i want to alignment the text topic to not go below the second button when the topic create two row like attach. i want the second row of topic to go below the topic itself

3- i want to show for board with three colums and two rows.

TQ for help.

JPDeni

QuoteHow can i put the manual board/category in the top of every new topics list?

Do you mean that you want the name of the board at the beginning of the list?

Quotealso i want to alignment the text topic to not go below the second button when the topic create two row like attach. i want the second row of topic to go below the topic itself

So you want the program to shorten the name of the topic? That's going to mean a lot more programming.

Quotei want to show for board with three colums and two rows.

I wish you would have said three columns to start with. It means that I have to redo much of the code. As for rows, that would depend on how many boards you list.

If there's anything else you want, you need to tell me now.

alhaudhie

Do you mean that you want the name of the board at the beginning of the list?

Yes.. I want to put the name of board in the begining of list.

So you want the program to shorten the name of the topic? That's going to mean a lot more programming.

Nice ... but is not really what i think.. ok.. what i want is like what i write down

(button)When the topic is soo long.. its become
automatically go to second row.

(button)When the topic is soo long.. its become
           automatically go to second row. (this what i mean)

last.. with code you wrote.. there is no problem with row. but with colums when i try to make 3 colums.
tq

This website is proudly hosted on Crocweb Cloud Website Hosting.