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: 561
  • Total: 561

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.

IchBin

You could try in a phpbox to:

include('path/to/other/SSI.php');
Your recentopics code here



khoking

Instead of using bullet, can it have line (hr) to separate each thread?

denis

Ok. I am 3 months late  ;) but I am finally ready to try this. Unfortunately I do not know how to do this so I have a few questions.


  • 1 - Do I create a new block or do I change the existing "Recent Topics"? 
  • 2 - Is there a way to make sure that the latest "Recent Topics" come first?(Remember I have 6 SMF/TP instances working so I want the lastest from all of these forums to appear first)
  • 3 - I found this article : http://www.tinyportal.net/index.php?topic=1234.msg81842#msg81842. Is this the best code to do the "Recent Topics"

Thank's
Ps.: I will try to do this myself but I am sure I will be back for more questions

snoopy_inc

I have a question... maybe i should post this in a new thread but i thought i would give it a bash here first.

I want to have a recent board that scrolls like an rss feed... that way i can use the same space the it would take for 5 recents but have 30 in it scrolling.... allows for more activity and such.... also a feature that disables it per profile so if the people dont like it they can stop it.

Is there something like this? if not can one do it?

falguni1



spurry

hi all i am using this code in a php block


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

$result=ssi_recentTopics_Include(10,array(1,2),'return');

foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];

  // is this topic new? (assume they are logged in)
if (!$my['new'] && $context['user']['is_logged'])
        echo ' <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['new_from'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';
echo ' in ', $my['board']['link'];
echo ' by ', $my['poster']['link'];
echo ' posted ', $my['time'];
echo '<br />';

}
echo '</span>';


but i dont want it to show this  Forum Help And Chat by ## posted Today at 01:15:36

could some one help me edit it out please?


spurry

ok dont worry i am stupid :uglystupid2:


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

$result=ssi_recentTopics_Include(10,array(32),'return');

foreach($result as $my){
  echo "$bullet";
  echo '<span class="smalltext">'.$my['link'];

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

}
echo '</span>';



This website is proudly hosted on Crocweb Cloud Website Hosting.