Is there any way to show only some threads and not all theads from a forum? Just select the ones that I want
Thanks
Where?
Front page or in a block.
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);
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!
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. :)
As a normal forum post.
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.
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.
no news on this?
When you answer the questions I ask, I'll start working on it.
I'll try to explain it a bit more.
First of all here is my portal, as you can see it shows all threads from a specific forum and every answer to the thread as comments.
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg377.imageshack.us%2Fimg377%2F2262%2Ftiny1uu9.jpg&hash=ef439bf7d935038d1491af9663ba894e15e37f2b)
But what i want is that from a specific forum to show only SOME threads not all of them
This image shows my forum, here is the category
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg377.imageshack.us%2Fimg377%2F6118%2Ftiny2zv5.jpg&hash=d4470597fe56a9dfef3d3e81611c7d4e4493426e)
I enter that category, and here is what i see
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg329.imageshack.us%2Fimg329%2F6519%2Ftiny3vu4.jpg&hash=444a96410435bd7df6b4703ebb8a3b5691f9ee89)
And this threads are the ones that are show on my portal and it's answers (posts) are show as comments.
But what I want it's to select which ones of this threads are show from an specific category, and show as they are now.
Is it clear now?
I can't see a thing from those images. As the name says, they are *tiny*. I can't read them. Well, the first one is. The other two didn't even load.
I'm not sure why you don't want to answer the questions I asked, but if you're going to ask for someone to write free custom code for you, you might consider giving them enough information to actually write the code. I'm pretty talented, if I do say so myself, but I'm not a mind-reader.
But how do you want them displayed?
As a normal thread on the portal, the first post of the thread is the news and answers to the thread (posts) are show as comments
Do you want the topic title?
Yes
The poster's name?
Yes
The time it was posted?
Yes
Everythins as it is now
Are you using only the default theme, which hasn't been altered in any way?
It's the classic theme adapted to tiny (I founded it in this forum) I only changed the colors.
Also, you have not answered my questions about what posts you want to include. First post, all posts, last post, random post?
All posts
I think that you call posts to threads, but posts in a forum are answers to the threads. Example this is a post the thread is the whole discussion.
Post=message. This is a post that I'm typing now. The first message in this topic (http://www.tinyportal.net/index.php?topic=22865.msg185456#msg185456) is a post. Each response to that original post was also a post.
Topic=thread. This topic/thread is called "Show specific thread from forum"
Theme=the colors and graphics that are used on a site and has nothing whatever to do with what anyone has posted on the forum.
These are not just words that I happen to use. These are the words that are used in the SMF database for posts and topics.
I'll see about getting to this after I finish another custom code that I've bee working on for someone else.
thanks we finally undestand each other, I'm glad because it would be a great function for tiny portal.
I though of something it's a little bit complicated but it would be great, to add a button or a link to smf like when you put a thread sticky but to show as news.
Quoteto add a button or a link to smf like when you put a thread sticky but to show as news.
That would be an SMF function, not a TP one.
yes i know but it would be great
Now that the images are actually readable, I can see what you have. It would be much easier for everyone if you just create another board and move the topics you want to show on the front page into that board. No need for any custom coding at all.
I know I can do that but is no comfortable for me to have it like that.
It's not comfortable for me to write unnecessary code. Maybe someone else will be willing to do it.
For you is unnecessary not for me. Nevermind, I'll find help somewhere else.