PDA

View Full Version : Showing a thread from any forum


ukers
08-22-2004, 05:27 AM
Is there a hack that would allow me to select a thread from any forum to display on my homepage?
Thanks for your help

banana
08-23-2004, 07:32 PM
I agree. Rather than having a seperate forum for news and/or polls it would be very useful (for some boards at least) to flag the threads and poll to be displayed.

Otherwise - excellent work!

Our Sponsors
 

Slave
01-23-2005, 12:32 PM
Yes .. I'd like to see this ..

Instead of having to specify which forums to show (which if you have a lot of subjects to cover can mean a lot of news sub forums) .. you'd just have a tick box when you add a thread to any of your forums .. once ticked it would show as a new news item.

rbl
01-23-2005, 12:48 PM
You could easily hack your forum/modules/news.php to display a selected thread if you prefer that to its current way of working.

Our Sponsors
 

banana
01-23-2005, 12:50 PM
Good news it's easy!

Can you easily do it then and post it for us lesser mortals - thanks!!!!

rbl
01-23-2005, 01:00 PM
Sure =)

rbl
01-23-2005, 01:49 PM
Here you go, a "not-so-quick-and-dirty" hack:
Open your forum/modules/news.php and line 70 should be:
WHERE forumid IN($vba_options[portal_news_forumid]) AND thread.visible = 1 AND thread.open != 10 $notdeleted
change to
WHERE thread.threadid = $vba_options[portal_news_maxposts]
line 73 should be:
$newslimit");
change to:
LIMIT 1");

Now, go to your admincp -> vBa CMPS -> Default Settings and in the "News Options" section, enter your desired threadid in the "News Posts Maximum" box.
Go to wherever your News module appears and voilá!

In case you are wondering why did I use the "News Posts Maximum" field to insert the threadid, the answer is simple: you need the "News Forum ID" for your News Archive module, in case you use it.

Slave
01-23-2005, 07:48 PM
Thanks for that .. :)

But ..

Am I not right in thinking that would only show one thread? and every time you want a different news item you need to go to the news options and change the thread id?

What about when you want to show more than one news item? .. from a different forum at the same time?

That's why I suggested having a tick box "Make this a news item" when you're creating a thread .. that way you could have more than one news item from more than one forum showing on your news page at the same time.

Now if you're able to show us how to do that .. I'd be very happy .. :)

Following on from that I have seen the following ..

http://www.vbulletin.org/forum/showthread.php?t=73507

Which just about does what I'm looking for (and he does sort of say how to make it work with vBa) .. however the way he adds it to vBa isn't as a module which is the way I would prefer TBH .. any chance you could have a look at it and let us know how to make it a module?

rbl
01-24-2005, 05:27 AM
Am I not right in thinking that would only show one thread? and every time you want a different news item you need to go to the news options and change the thread id?
What about when you want to show more than one news item? .. from a different forum at the same time?


Yes, but you can change "LIMIT 1" to whatever number suits you.
Yes.
I guess threadid, threadid, threadid would work just fine if you change the "LIMIT 1" value first.

That's why I suggested having a tick box "Make this a news item" when you're creating a thread .. that way you could have more than one news item from more than one forum showing on your news page at the same time.
This does exactly the same thing except you don't tick threads on creation or after, you enter their id in a text field.

Now if you're able to show us how to do that .. I'd be very happy .. :)
...
any chance you could have a look at it and let us know how to make it a module
This mod's concept is easy for even someone like me do it, hence my first comment, and I'm not a programmer.
The kind of interface you want involves changing (at least) a handful of templates, probably some php files and can't see it done without some database changes. It's way above my league and it would take a lot of time to do it.

Slave
01-24-2005, 08:59 AM
Fair enough .. :)

Slave
02-01-2005, 06:03 AM
For those wanting a hack like above .. goto the following thread ..

http://www.vbadvanced.com/forum/showthread.php?p=28236