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
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
May 2, 2012 - 11:22 pm

That does work but there is no CSS styling for the output. If you wanted to match the look that you see in the forum pages you would need to load your SP theme's CSS style on the page the you use this on.

Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 3, 2012 - 1:28 am

thanks for this code, its working fine.

can you also tell me where is the spListView.php file exist.

means in which folder i will find it.

i want to customize it to show the post updated date instead of text "3-days ago"

here you can see the screenshot what i am doing.

and just want to replace the post date with the text " days ago"

recenttopic.pngImage Enlarger

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

It is a template in whatever SP theme you are using. This in turn makes the call to the display function sp_ListLastPost() and you can change the arguments to that for the 'nicedate', 'date' and, time'. Using 'nicedate=0&date=1&time=1' will change it to display the full date and time of the post.

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

i am using this function

sp_RecentPostList('show=10', 'Recent Topics')

and when i am using these arguments in to it

sp_RecentPostList('show=10&nicedate=0&date=1&time=1', 'Recent Topics')

it is not changing the date format.

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

No - as I said above - all that function does is create the data object and call the template. The display work is performed in the template and you need to change the arguments in the function I named.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 3, 2012 - 9:16 pm

ie, as said in post #13, you add that arguments to that function, sp_ListLastPost()

Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 4, 2012 - 12:23 am

ohhh ,yes it is working.

thanks,

can you tell me how can i list the most popular topics .

means the 5 most viewable topic.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 4, 2012 - 12:28 am

you have the template tags plugin, right?  the available tags are in there...  hot topics, based on our formula, is by sp_HotTopicsTag();

available options:

    $defs = array('tagId'        => 'spHotTopicsTag',
                  'tagClass'     => 'spHotTopicsTag',
                  'listClass'    => 'spListItemTag',
                  'textClass'    => 'spHotTopicTextTag',
                  'listTags'    => 1,
                  'forumIds'    => 0,
                  'limit'        => 5,
                  'days'        => 30,
                  'showForum'    => 1,
                  'textForum'    => __('posted in', 'sp-ttags'),
                  'showCount'    => 1,
                  'textCount'    => __('recent posts', 'sp-ttags'),
                  'showHotness'    => 1,
                  'textHotness'    => __('hotness', 'sp-ttags'),
                  'echo'        => 1
                  );

Avatar
vikash tiwary
Member
Free Members
sp_UserOfflineSmall Offline
May 4, 2012 - 12:37 am

yes, i have tamplate tags plugin installed.

and i also using this sp_HotTopicsTag() to show the hottest topic.

but now i want to show the list of topics according to their views count.

is the most viewed topics are the same as hot topics?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 4, 2012 - 12:41 am

no, we dont have any facility or tag for that kind of display... you will have to generate the database query yourself and display if you want it...

hot topics is more about what topics are current, trending or hot now vs all time...  its more keyed towards topics that are getting lots of posts now vs over all of history...

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: 621
Members: 17368
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79627