FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » "News"
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
"News" [message #37899] Sun, 01 July 2007 20:02 Go to next message
Starcitsura is currently offline  Starcitsura   Canada
Messages: 9
Registered: February 2007
Karma: 0
Junior Member
Before I switched to FUD, I was using phpBB, and I had a "News Feed" on the main page of my site, which took the 5 most recently made threads in a particular board. From those 5 threads it took the first post of each, showed the title, the post, and how many responses had been made to it.

I would like to do the same with FUD, but I really have no idea where to start.
Re: "News" [message #38651 is a reply to message #37899] Tue, 21 August 2007 19:24 Go to previous messageGo to next message
zushiba is currently offline  zushiba   United States
Messages: 20
Registered: May 2003
Karma: 0
Junior Member
I wrestled with it for months, the RDF feed just won't do it :/
It's easier just to use another system for your news.

The RDF Feed thinger will grab the most recent posts but that includes replies.

[Updated on: Tue, 21 August 2007 19:25]

Report message to a moderator

Re: "News" [message #39077 is a reply to message #38651] Tue, 25 September 2007 15:10 Go to previous messageGo to next message
Marticus   United States
Messages: 272
Registered: June 2002
Karma: 1
Senior Member
I've always not cared for this. I would rather distinguish a new topic from its replies so that a popular title doesn't fill up the max slots in a "latest topics" listing. That and the fact that rdf seems to include topics in non-public forums as well as restricted I find very irritating.
Re: "News" [message #39189 is a reply to message #37899] Mon, 08 October 2007 18:56 Go to previous messageGo to next message
Starcitsura is currently offline  Starcitsura   Canada
Messages: 9
Registered: February 2007
Karma: 0
Junior Member
Months later and still no solution? Sad
Re: "News" [message #39206 is a reply to message #39189] Wed, 10 October 2007 00:00 Go to previous messageGo to next message
pgregg is currently offline  pgregg   United Kingdom
Messages: 14
Registered: July 2006
Karma: 0
Junior Member
maybe half a solution - I posted this a few days in the (previously) most recently updated thread in this section:
http://fudforum.org/forum/index.php?t=msg&th=7701&start=0#msg_num_6

It'll post the most recent messages in a forum/category, and ignore subsequent messages from the same thread. Kinda the reverse of what you want - but it could be something worth looking further into - such as using the RDF to pull mode t to just get topics, then loop and count the number of messages in that topic.

Regards,
PG
Re: "News" [message #40000 is a reply to message #37899] Tue, 01 January 2008 19:48 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Perhaps you are looking for something like this:
http://www.ginnunga.org/forums/index.php?t=thread&frm_id=118

What I did was to add simple IF statements in the templates. In this case my code (you cant really use this, but it can give you a hint) looks like this:

Thread.tmpl -> thread_list and replace
{TEMPLATE-DATA: thread_list_table_data}

with
{IF: ($frm->id == 118)} <!-- IF NEWS -->
<tr><td style=""><img src="{THEME_IMAGE_ROOT}/news2.png" alt="News" align="left"><hr style="position: relative; left: -18px;top: 18px;border: 0px;border-bottom:1px dotted #aaaaaa;height: 1px;"><span style="font-size: 15pt; color: #660000;position: relative;top: -12px;">&nbsp;Ginnunga news&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
{TEMPLATE-DATA: thread_list_news_data}
{ELSE}
{IF: ($frm->id == 124)} <!-- IF DOWNLOADS -->
<tr><td style=""><img src="{THEME_IMAGE_ROOT}/news2.png" alt="News" align="left"><hr style="position: relative; left: -18px;top: 18px;border: 0px;border-bottom:1px dotted #aaaaaa;height: 1px;"><span style="font-size: 15pt; color: #660000;position: relative;top: -12px;">&nbsp;Ginnunga Downloads&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
{TEMPLATE-DATA: thread_list_downloads_data}
{ELSE} <!-- REGULAR FORUM -->
{TEMPLATE-DATA: thread_list_table_data}
{END}{END}


I also edited thread.php.t and after this line
	$thread_list_table_data .= '{TEMPLATE: thread_row}';

added this:
			$thread_list_news_data .= '{TEMPLATE: thread_news}';
			$thread_list_downloads_data .= '{TEMPLATE: thread_downloads}';


Then I just went ahead and created subsections in thread.tmpl which were copies of thread_list and just renamed them to thread_downloads and thread_news and modified them to fit my needs.


Re: "News" [message #160560 is a reply to message #38651] Tue, 29 September 2009 10:54 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
zushiba wrote on Tue, 21 August 2007 21:24
The RDF Feed thinger will grab the most recent posts but that includes replies.


Replies are excluded in topics mode (mode=t). As a result you can use any aggregator program to show your news or quickly roll your own.
Re: "News" [message #160566 is a reply to message #160560] Tue, 29 September 2009 19:43 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yet another solution would be to use FUDAPI. See example at http://cvs.prohost.org/index.php/FUDAPI
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Zshare Embedding Plugin
Next Topic: API hooks into post moderation?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 01:47:53 GMT 2024

Total time taken to generate the page: 0.03819 seconds