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

Home » FUDforum Development » Plugins and Code Hacks » My News hack
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
My News hack [message #162735] Sat, 10 July 2010 09:26 Go to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
I don't know if anyone could make any use of this, but this is what I am using and it works fine for me.

One change that I have been to lazy to do, is that the defined forum for news items could be a GLOBALS variable. I have just entered it directly into the code on line 190 and 191 in news.php.t

The code is surely poor and most likely unsafe, but it works for me!



What it does is:
It takes the first post in each topic created in a specified forum and displays them, offering links to comment on the news article.

The read/unread icon on the comments is wrong at the moment, it only checks against "Mark all forums read" clicks. I'll fix that some year.


I have a bunch of specializations done in my other template files depending on what forum is being browsed, in my news forum, i have one layout for a post depending if its the root_msg and one if its a post that follows, this is a little bit trickier to share, since its so dependant on my own CSS and layouts etc.

Anyways, this code SHOULD work off the bat to at least emulate a news page.
  • Attachment: news.zip
    (Size: 5.43KB, Downloaded 773 times)


[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: New plugin call hook type & OpenID plugin
Next Topic: Search for Attachments
Goto Forum:
  

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

Current Time: Fri May 10 05:25:46 GMT 2024

Total time taken to generate the page: 0.03791 seconds