Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
how to show post content with sp_RecentPostsTag()
Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2012 - 12:43 am

i am using the sp_RecentPostsTag(); to show the recent posts of the forum.

and it is showing the recent posts in FTUD order.

but i want to show the content of that post also.

i have checked the all arguments of this function. there is many arguments to show the text before and after the topic.

but i want to show the content of that post with the post title.

is there is any other function or arguments to do so?

please help.

thanks.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 1, 2012 - 2:54 am

No - we have not included the post content as an option - just as you see it in the tooltip - which is an excerpted and sanitised version. This is available to the function of course. I would not be against adding a filter to, say, the end of the current item display, so that you could add the content there. And we can consider adding trhe content extract in as a display option in the future.

andy-signature.png
YELLOW
SWORDFISH
Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2012 - 4:50 am

is there any other way to show post content. any manual code which i can use .

any link where i can find something related to it.

please give me. it is very necessary for me.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 1, 2012 - 5:29 am

There are currently no template tags that will automatically display the post content I am afraid.

andy-signature.png
YELLOW
SWORDFISH
Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2012 - 7:23 am

ok, np

one other thing i want to show the "Unread and recently updated topics" in to the sidebar widget area.

what we will use for this.

please help,

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 1, 2012 - 7:44 am

There is a widget for this available in the template tags SP plugin.

andy-signature.png
YELLOW
SWORDFISH
Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 1, 2012 - 11:49 pm

yes, there is a widget in template tag plugin.

but this is a recent posts widget.

we need the area just like we have now in forum page under the forums "Unread and recently updated topics".screenshot.pngImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 2, 2012 - 5:13 am

Well - fist off I can tell you that the area beneath the group view uses the same sql selection logic - actually uses the same code - as the sidebar widget. They perform the same task except for the fact that the widget is specifically designed and coded to be displayed outside of the forum page.

Does that information make any difference to your thinking or do you want the code to display the list view elsewhere?

andy-signature.png
YELLOW
SWORDFISH
Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 2, 2012 - 7:23 am

if you can give code then it will better for me.

please send me the code.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 2, 2012 - 8:54 am

Well - bear in mind I have not tried this so at the moment this is largely theory.

If being displayed outside of a forum page then making a call to:

sp_forum_api_support();

should set up the necessary support.

Then calling the actual template function used in the spGroupView.php template would be:

sp_RecentPostList('show=10', 'Unread and recently updated topics');

The 'show' argument dictates the maximum number of items to display. The other parameter is the text used above the list.

The following is a list of the possible arguments with their default values, any of which can be overridden in the argument string:

'tagId' => 'spRecentPostList'
'tagClass' => 'spRecentPostSection'
'labelClass' => 'spMessage'
'template' => 'spListView.php'
'show' => 20
'group' => 0
'admins' => 0
'mods' => 1
'get' => 0

As I say - untested but should work I believe.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626