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: 1
  • Guests: 211
  • Total: 212
  • lurkalot

Show specific thread from forum

Started by villano666, April 01, 2008, 12:01:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

villano666

Is there any way to show only some threads and not all theads from a forum? Just select the ones that I want
Thanks


villano666


JPDeni

You would need to know the topic number and enter it into the php code.

Would you want the whole topic, the first post from the topic or the last post from the topic? Or maybe a random post from the topic?

How do you want it displayed? Give me details. Examples would be great.

I need to know what you want before I can write the code. I like to know it all up front if possible so that I don't write the code and then have to start over because the person wants something different.

This is what I have so far. It doesn't display anything because I don't know what you want displayed. I just find that it's easier for me if I post the code as I'm working on it so I don't lose track of what I'm doing.


$topic_numbers = (2,841,73);

$result = db_query("
    SELECT *
    FROM {$db_prefix}messages
    WHERE ID_TOPIC IN ($topic_numbers)", __FILE__, __LINE__);

while ($row= mysql_fetch_assoc($result))
{

}
mysql_free_result($result);

villano666

First of all, thanks for answering me.
Now I'll explain a bit more. The system of showing threads and it's answers as comments as it is by default is great, but sometimes I don't won't that all threads of a specific forums to be displayed, just a few because sometimes some topics are very silly and I don't wont them to be published in the front page. So I was wondering of a mod or something that let's you choose which threads of a specific forum to display.
Is it clear now?

Thanks again!

JPDeni

I understand that. But how do you want them displayed? Do you want the topic title? The poster's name? The time it was posted? What, very specifically, do you want? I'll be happy to write the code for you, but I need to know where I'm going before I get into the car. :)

villano666


JPDeni

As if it was in a forum? Are you using only the default theme, which hasn't been altered in any way?

Also, you have not answered my questions about what posts you want to include. First post, all posts, last post, random post?

When you can answer my questions, i'll get back to you.

villano666

#8
As it is now you can choose a whole forum to show posts as news on the front page, I want to select some posts from a forum not just the whole forum.
And I want to be shown asi it is now, the first as a news and the rest of the posts as comments, but all of them.

villano666


This website is proudly hosted on Crocweb Cloud Website Hosting.