Recent Topics

Display recent topics on custom page - Recent Topics

Display recent topics on custom page

by Stoker 4.0 » Sun May 03, 2015 8:15 am

How can I display recent topics on a custom page?
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: Display recent topics on custom page

by Stoker 4.0 » Thu May 28, 2015 3:50 am

up :)
User avatar
Stoker 4.0
Registered User
Posts: 1487
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen
Contact:

Re: Display recent topics on custom page

by Panda04 » Mon Sep 28, 2015 11:23 am

Any ideas?
Panda04
Registered User
Posts: 21
Joined: Mon Nov 03, 2014 12:50 am
Contact:

Re: Display recent topics on custom page

by hasanmak » Wed Sep 30, 2015 6:44 am

This feature would be great.
hasanmak
Registered User
Posts: 8
Joined: Wed Mar 25, 2015 8:42 am
Contact:

Re: Display recent topics on custom page

by lddd » Tue Apr 05, 2016 9:56 pm

Is it only possible to have recent topics shown by default on the index page or not? Would be much more useful if we could set up a custom menu link and show up recent topics on what ever page.
lddd
Registered User
Posts: 2
Joined: Sat Apr 02, 2016 8:06 pm
Contact:

Re: Display recent topics on custom page

by mykee » Mon Apr 10, 2017 7:26 am

Ok, here is my solution if you want add this to your extension!

1. Add to your listener these lines:
- for class:

Code: Select all

/* @var recenttopics */
	protected $rt_functions;

/** @var \phpbb\config\config */
	protected $config;

/** @var string phpEx */
	protected $request;
- for __construct:

Code: Select all

\paybas\recenttopics\core\recenttopics $functions, \phpbb\config\config $config,\phpbb\request\request $request
- to __construct:

Code: Select all

		$this->rt_functions = $functions;
		$this->config = $config;
		$this->request = $request;
- and add this to getSubscribedEvents()

Code: Select all

'core.page_header'				=> 'add_page_header_link',
- create a public function with this content, where '(your path)' is your routing path:

Code: Select all

public function page_header_after($event)
	{
	
		$mainpath = $this->request->server('PATH_INFO');
		

		if($mainpath === '/(your path)' && isset($this->config['rt_index']) && $this->config['rt_index'])
		{
			$this->rt_functions->display_recent_topics();
		}
	}
2. Add your services.yml these services for your listener:
- '@paybas.recenttopics.functions'
- '@config'
- '@request'

3. Add to your template this code:

Code: Select all

<!-- INCLUDE @paybas_recenttopics/recent_topics_body_topbottom.html -->
And that's all! Test it!

WARNING! If recent topics extension doesn't installed, then forum send an error and ALL extension will disable! Need install recent topics extension install first, and then your custom extension!
Last edited by mykee on Fri May 05, 2017 4:48 am
mykee
Registered User
Posts: 271
Joined: Thu Jun 07, 2007 9:46 pm
Contact:

Re: Display recent topics on custom page

by GoesOn » Thu May 04, 2017 8:56 pm

Has anyone tested this and does it work?
English is not my native language :!:
GoesOn
Registered User
Posts: 413
Joined: Sun Mar 05, 2017 7:31 pm
Contact:

Re: Display recent topics on custom page

by mykee » Fri May 05, 2017 4:46 am

I found a simpliest solution too:
- add your custom page template an EVENT where you need insert this extension. Example:

Code: Select all

<!-- EVENT custom_plugin_place -->
- create an event html, name like this: custom_plugin_place.html
- edit this html, place your code what you want, but add author link to INCLUDE section like this:

Code: Select all

<div id="recenttopicsbottom">
<!-- INCLUDE @paybas_recenttopics/recent_topics_body_topbottom.html -->

</div>
- after save html, copy this to ext/paybas/recenttopics/styles/all/template/event folder
That's all! Test it!
mykee
Registered User
Posts: 271
Joined: Thu Jun 07, 2007 9:46 pm
Contact:

Re: Display recent topics on custom page

by edukasdev » Thu Dec 28, 2017 9:48 am

Has anyone been able to get this to work?

I've been trying both methods listed above, however I can't get the topic list to display.
Basically, I'm trying to get the recent topic side list to appear within a specific div location on my forum.
edukasdev
Registered User
Posts: 3
Joined: Sun Jul 31, 2016 11:57 pm
Contact:

Re: Display recent topics on custom page

by tofino » Mon Apr 16, 2018 2:16 pm

I was just looking on how to use on custom page.
Anything further happened with this option yet.

THX
tofino
Registered User
Posts: 55
Joined: Fri Nov 06, 2015 1:55 pm
Contact:

Re: Display recent topics on custom page

by morbidmama » Fri Apr 20, 2018 9:37 pm

The dev lists the use of a custom page with the following phrase:

can view all recent topics on a special page /app.php/rt (as of 2.2.7)

and again:

Recent topics has a custom page, you can acess it via /app.php/rt.
Other than that, the embed code below is put in the event index_body_markforums_after.html

<div id="recenttopicstop">
{% INCLUDE 'recent_topics_body_topbottom.html' %}
</div>


Can anyone tell me how to make the above information work? How do I access it via /app.php.rt

Or - what does the second entry mean - how and where do I put that code - and if I have to ask that question, is this something I am better off not trying?
morbidmama
Registered User
Posts: 4
Joined: Thu Apr 06, 2017 12:46 am
Contact:

Re: Display recent topics on custom page

by Kami-sama » Mon Jun 18, 2018 8:44 pm

morbidmama wrote:The dev lists the use of a custom page with the following phrase:

can view all recent topics on a special page /app.php/rt (as of 2.2.7)

and again:

Recent topics has a custom page, you can acess it via /app.php/rt.
Other than that, the embed code below is put in the event index_body_markforums_after.html

<div id="recenttopicstop">
{% INCLUDE 'recent_topics_body_topbottom.html' %}
</div>


Can anyone tell me how to make the above information work? How do I access it via /app.php.rt

Or - what does the second entry mean - how and where do I put that code - and if I have to ask that question, is this something I am better off not trying?

First, enable Recent Topics to show on index
Then, type url: YOURFORUMurl/app.php/rt
Example: https://www.phpbb.com/app.php/rt
User avatar
Kami-sama
Registered User
Posts: 137
Joined: Sat May 26, 2018 3:07 pm
Contact:

Re: Display recent topics on custom page

by Dabony » Fri Oct 25, 2019 8:01 pm

mykee wrote:I found a simpliest solution too:
- add your custom page template an EVENT where you need insert this extension. Example:

Code: Select all

<!-- EVENT custom_plugin_place -->
- create an event html, name like this: custom_plugin_place.html
- edit this html, place your code what you want, but add author link to INCLUDE section like this:

Code: Select all

<div id="recenttopicsbottom">
<!-- INCLUDE @paybas_recenttopics/recent_topics_body_topbottom.html -->

</div>
- after save html, copy this to ext/paybas/recenttopics/styles/all/template/event folder
That's all! Test it!
I've tried this but I just get a box saying "RT_NO_TOPICS".

Any idea what I'm doing wrong? Sorry, I'm really new to this.
User avatar
Dabony
Registered User
Posts: 10
Joined: Tue Oct 01, 2019 3:15 am
Name: Emily Figgins
Contact:

Re: Display recent topics on custom page

by Boardtalk.net » Tue Oct 29, 2019 10:23 pm

Dabony wrote:
I've tried this but I just get a box saying "RT_NO_TOPICS".

Any idea what I'm doing wrong? Sorry, I'm really new to this.
You could try this option. I've taken the Recent Topics extension and hacked it - not pretty - and created a second little extension to pop a link in the header to show a visible link to a list of recent topics on their own page - visible on mobile and desktop. Follow the instructions to edit the extension 'boardtalk/link' and pop in the URL for your forum.

Hope it helps.

Download: http://boardtalk.org/forum/viewtopic.php?f=6&t=16425

Demo =
Username: Tester
Password: 1234567
User avatar
Boardtalk.net
Registered User
Posts: 1243
Joined: Fri Jun 05, 2009 8:12 pm
Location: Ireland
Name: Colette
Contact:

Re: Display recent topics on custom page

by Nick225 » Fri Dec 27, 2019 7:29 pm

Boardtalk.net wrote: You could try this option. I've taken the Recent Topics extension and hacked it - not pretty - and created a second little extension to pop a link in the header to show a visible link to a list of recent topics on their own page - visible on mobile and desktop. Follow the instructions to edit the extension 'boardtalk/link' and pop in the URL for your forum.

Hope it helps.

Download: http://boardtalk.org/forum/viewtopic.php?f=6&t=16425

Demo =
Username: Tester
Password: 1234567
This is excellent. It works great. But for some reason, Guests can't see the link or the list of latest topics via app.php/rt.
I checked the configuration and made sure to select that option. But to no avail. Anyway if that doesn't work, I still like this a great deal. Excellent Job, my friend.
Maybe the query should be updated to list only the topics to which the user has access. That would not leave Guests out of the cold.
Nick225
Registered User
Posts: 131
Joined: Sat Nov 24, 2018 7:48 pm
Contact: