Closed (fixed)
Project:
Tribune
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 Mar 2009 at 00:52 UTC
Updated:
25 Apr 2009 at 01:20 UTC
I would like to show my users the latest message posted in a block. This block wouldn't auto update, just show the latest at time of page load. Is it possible to do this? Thanks.
Comments
Comment #1
SeeSchloss commentedIn 2.x you can use the
tribune_get_last_posts($node, $nb)function to retrieve the $nb latest posts from the tribune $node. It isget_last_posts($nb)in the 1.x version of the tribune module.So your block's code could be something like
I mark this as fixed, but tell me if you have any issue with that
Comment #3
Flying Drupalist commentedThank you very much. I want to avoid the php filter if I can, but still give admins the ability to choose what node to get such a message from.
I'm humbly requesting a block from where the admin can choose the node from an interface. Thanks.
Comment #4
SeeSchloss commentedI have added a "readonly" checkbox to the blocks settings, so now you could add a block and choose the tribune node you want to display, "1" for how many posts to show, and check readonly to avoid showing the form for posting messages. The CSS and JS will still be included as they may be necessary depending on the filters you have enabled.
Is it the kind of feature you wanted ?
Comment #5
Flying Drupalist commentedThanks, but not exactly, because it's still reloading. Can you also add an option to make it not refresh?
Thanks.
Comment #6
SeeSchloss commentedOkay, I have also added a "reload delay" setting, so you can set it to 0 and it won't reload anymore.
Anything else ? :)
Comment #7
Flying Drupalist commentedThanks a lot! :) You're the best. :)