TinyPortal

Development => Support => Topic started by: villano666 on April 01, 2008, 12:01:56 AM

Title: Show specific thread from forum
Post by: villano666 on April 01, 2008, 12:01:56 AM
Is there any way to show only some threads and not all theads from a forum? Just select the ones that I want
Thanks
Title: Re: Show specific thread from forum
Post by: JPDeni on April 01, 2008, 12:22:30 AM
Where?
Title: Re: Show specific thread from forum
Post by: villano666 on April 01, 2008, 12:39:05 AM
Front page or in a block.
Title: Re: Show specific thread from forum
Post by: JPDeni on April 01, 2008, 01:01:27 AM
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);
Title: Re: Show specific thread from forum
Post by: villano666 on April 01, 2008, 02:42:04 AM
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!
Title: Re: Show specific thread from forum
Post by: JPDeni on April 01, 2008, 05:27:18 AM
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. :)
Title: Re: Show specific thread from forum
Post by: villano666 on April 01, 2008, 01:47:24 PM
As a normal forum post.
Title: Re: Show specific thread from forum
Post by: JPDeni on April 01, 2008, 01:54:16 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 01, 2008, 02:06:07 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 08, 2008, 02:24:07 AM
no news on this?
Title: Re: Show specific thread from forum
Post by: JPDeni on April 08, 2008, 03:19:10 AM
When you answer the questions I ask, I'll start working on it.
Title: Re: Show specific thread from forum
Post by: villano666 on April 13, 2008, 07:24:42 PM
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?
Title: Re: Show specific thread from forum
Post by: JPDeni on April 13, 2008, 07:39:03 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 13, 2008, 07:46:08 PM
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.
Title: Re: Show specific thread from forum
Post by: JPDeni on April 13, 2008, 07:58:07 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 13, 2008, 10:36:57 PM
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.
Title: Re: Show specific thread from forum
Post by: JPDeni on April 13, 2008, 11:11:36 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 13, 2008, 11:13:34 PM
yes i know but it would be great
Title: Re: Show specific thread from forum
Post by: JPDeni on April 16, 2008, 04:43:23 PM
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.
Title: Re: Show specific thread from forum
Post by: villano666 on April 16, 2008, 04:51:57 PM
I know I can do that but is no comfortable for me to have it like that.
Title: Re: Show specific thread from forum
Post by: JPDeni on April 16, 2008, 04:55:22 PM
It's not comfortable for me to write unnecessary code. Maybe someone else will be willing to do it.
Title: Re: Show specific thread from forum
Post by: villano666 on April 16, 2008, 05:10:27 PM
For you is unnecessary not for me. Nevermind, I'll find help somewhere else.