TinyPortal

Development => International => Scandinavian => Topic started by: johanlm on May 10, 2006, 06:58:21 PM

Title: "Recent topics" block kod av Bloc. Modifierad av JohanLM.
Post by: johanlm on May 10, 2006, 06:58:21 PM
recent topics" in SMF style = Bloc= code credit.
Direkt lÃÆ'Ã,¤nk till org. post : <KLICKA HÃÆ'ââ,¬Å¾R> (http://www.tinyportal.net/smf/index.php?topic=596.0)

FUNKTIONER:

MINA ÃÆ'ââ,¬Å¾NDRINGAR:

TANKEN BAKOM / MÖJLIGHETER:
Om man har ett vÃÆ'Ã,¤ldigt aktivt forum med olika rum sÃÆ'Ã,Â¥ kan detta vara en fördel.
Speciellt om man har ett rum dÃÆ'Ã,¤r enbart viktiga saker diskuteras och ett annat dÃÆ'Ã,¤r det ÃÆ'Ã,¤r enbart chitchat babbel.
De "viktiga posterna" har en tendens att vara en minoritet i jÃÆ'Ã,¤mförelse med "babbel" poster.
Om de bÃÆ'Ã,Â¥da rummen delar "Recent post" listan sÃÆ'Ã,Â¥ kan folk som inte ÃÆ'Ã,¤r inne sÃÆ'Ã,Â¥ ofta missa de "viktiga" dÃÆ'Ã,Â¥ "babblet" trycker ner den i rask takt. ;)
DÃÆ'Ã,¤r kan det vara bra att ha 2 olika "Recent topics" PHP block pÃÆ'Ã,Â¥ frontsidan dÃÆ'Ã,¤r man kan sÃÆ'Ã,¤ra pÃÆ'Ã,Â¥ dem.
PHP block 1 = Viktiga
PHP block 2 = babbel


HUR MAN FÃÆ'ââ,¬Â¦R IGÃÆ'ââ,¬Â¦NG BLOCK + PHP SCRIPT:

"BUGGAR":


global $scripturl; echo '

<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor"> ';

// To show more posts change the number at recentTopics('8', to the amount you want.

// To hide specific rooms from the PHPscript replace the """, NULL,""" with """, array('7','56'),""" as an example.
// The numbers at the array = the rooms ID number. To find out what ID number the room you want to hide is, just klick on it.
// Then see what number it is at the end of the url. For example: /index.php?board=7.0 is the same as number 7

//This is the codeline you alter to change the amount of topics to show + hide rooms.
$what=ssi_recentTopics('10', NULL, 'array');

foreach ($what as $topic){echo '

<tr>
<td class="windowbg" valign="middle">

<span class="smalltext">', $topic['link'];

// Is this topic new? (assuming they are logged in!)
if (!$topic['new'] && $context['user']['is_logged']) echo '
<a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['new_from'], '#new">
<img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

echo '
<br>
<span class="smalltext"> ', $topic['time'],'
<br>
Poster: ', $topic['poster']['link'], '
</span>
</span>
</td>
</tr>
';}echo '
</table>
';



HUR MAN UTÖKAR ANTAL VISADE POSTER:


HUR MAN DÖLJER POSTER(rum):
Title: Re: "Recent topics" block kod av Bloc. Modifierad av JohanLM.
Post by: G6Cad on May 10, 2006, 07:46:31 PM
Kalas bra :)
Title: Re: "Recent topics" block kod av Bloc. Modifierad av JohanLM.
Post by: erikman on May 12, 2006, 06:31:07 AM
Takk for det :) Det var nyttig.