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

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 1 Guest are viewing this topic.

JPDeni

It's hard to tell, because I can't tell what the code actually is. The code was posted in quote tags instead of code tags, which could very well have changed what the code was originally supposed to be. For example, in the line


echo '
                                                <a href="', $scripturl, '?topic=', $my['topic'], '.from', $my['newtime'], '#new"><img src="',
$settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" />[/url]';


Notice the [/url] at the end. That's BBC and should not be anywhere in php. It would take a whole lot of study to try to figure out what the original poster intended before they used the wrong tags. I would see if I could find something that was posted correctly.

alhaudhie


JPDeni

I can't solve anything unless I can see the code as it's supposed to be. When I said

QuoteI would see if I could find something that was posted correctly.
I meant, "If I were you, I would see ..." IOW, this is something you need to do before I can help you.

alhaudhie

nope... the code is in latest post i send bofore...

the topic go correctly in FF but not in IE.
In IE the topic go smaller after one topic(small) and topic(smaller) and topic(smallest)

JPDeni


villano666

I'm using this code
$result=ssi_recentTopics(5, array('34'), return);
echo'<right>';
echo '<ul style="padding-left: 15px;">';
foreach($result as $my){
echo '<Li>'.$my['link'].'</Li>';
if(!$my['new'])
echo '<a href="'.$my['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a>';

}
echo '</UL>';
echo'</center>';
echo '<span class="smalltext"></span>';


I can't make it to show specific boards, it always shows every board there is

IchBin

If you are only getting it from one board, you don't need to use array. Also, if you do use an array with the board id's, the board id does not need single quotes around it because its a number.

$results=ssi_recentTopics(5, 34, 'array');

Or

$results=ssi_recentTopics(5, array(4,12,34), 'array');

villano666

Thanks

Now it's showing this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND 1
AND ms.ID_MSG = t.ID_FIRST_MSG
ORDER BY t.ID_LAS
File: /home/jk000489/public_html/foros/SSI.php
Line: 368

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.8, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.


JPDeni

Wait a second. The code you're using, with ssi_recentTopics only excludes boards. So, if you have


$result=ssi_recentTopics(5, array('34'), return);


it means "Show the five most recent topics from every board except board 34." The whole point of this topic is that the original poster wrote code that allows you to display just the topics from the board or boards you specify.

You'll need to reread the topic.

This website is proudly hosted on Crocweb Cloud Website Hosting.