@PitaJ Thank you!
Show newest topics for nodeBB in my site
-
Hi,I want to show the newest topics in my site use a widget,but I don't know how do this,could anyone give me some help,thanks
-
@xiaoxin Admin> Extend> Widgets
Click home.tpl or category.tpl at the top, and drag the recent topics widget where you want it (sidebar for example)
Then if you want it in some form of container, scroll down slightly, and drag one of those containers into the container box.
-
@a_5mith hmm,I know that,but I want to get topics in nodebb and show them in my another site.
-
@xiaoxin said:
@a_5mith hmm,I know that,but I want to get topics in nodebb and show them in my another site.
Ahh, language barrier, I misinterpreted what you said.
Erm, ok, well you could use the api to actually get the recent topics, that's not a problem.
It depends on what language/software you're using as to what you do. But the gist is you would send a get request to https://community.nodebb.org/api/recent or https://community.nodebb.org/api/recent/week (You'll want to link to your own NodeBB here for obvious reasons)
You would then loop through and grab
topics.title
&topics.slug
and display them as you wanted.Google will no doubt tell you how to grab info from an API in your chosen software/language though.
-
@a_5mith thank u very much,it helps lot