recent topics custom page

User avatar
clight77
Vip
Vip
Posts: 75
Joined: Thu Oct 15, 2015 12:33 pm
Status: Online
Screen Resolution: 1920x1080
  • Windows 10 Chrome

recent topics custom page

May 2018 03 01:31

Post by clight77 » Thu May 03, 2018 1:31 am

Post by clight77 by clight77 May 2018 03 01:31

Recent topics custom page

Can't wrap my head around getting html to use the existing php that seems to be a stand alone.
https://www.nzbforyou.com/recent.php
You do not have the required permissions to view the files attached to this post.

User avatar
Martin
Founder
Founder
Posts: 964
Joined: Sun May 24, 2015 3:14 pm
Status: Offline
Screen Resolution: 1920x1080
  • Ubuntu Chrome

Re: recent topics custom page

May 2018 03 07:11

Post by Martin » Thu May 03, 2018 7:11 am

Post by Martin by Martin May 2018 03 07:11

3.1 you sure ?
Image

Save page loads and make pages shorter find it here. Show user sig once in a page
Use this to install an ext on your board no more ftp or path making.
Path too install this ext is ext/boardtools/upload https://www.phpbb.com/community/viewtop ... #p13700571

User avatar
clight77
Vip
Vip
Posts: 75
Joined: Thu Oct 15, 2015 12:33 pm
Status: Online
Screen Resolution: 1920x1080
  • Windows 10 Chrome

Re: recent topics custom page

May 2018 03 13:15

Post by clight77 » Thu May 03, 2018 1:15 pm

Post by clight77 by clight77 May 2018 03 13:15

Martin wrote:
Thu May 03, 2018 7:11 am
3.1 you sure ?
No,I see I posted this in the wrong section. :(

User avatar
Sniper_E
Site Admin
Site Admin
Posts: 300
Joined: Mon May 25, 2015 9:27 pm
Status: Offline
Screen Resolution: 1920x1080
  • Windows 10 Firefox

Re: recent topics custom page

May 2018 04 00:26

Post by Sniper_E » Fri May 04, 2018 12:26 am

Post by Sniper_E by Sniper_E May 2018 04 00:26

Still working with the core file to define variables for the template.
sniper_recent_topics.zip
You do not have the required permissions to view the files attached to this post.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!™

User avatar
clight77
Vip
Vip
Posts: 75
Joined: Thu Oct 15, 2015 12:33 pm
Status: Online
Screen Resolution: 1920x1080
  • Windows 10 Chrome

Re: recent topics custom page

May 2018 11 02:16

Post by clight77 » Fri May 11, 2018 2:16 am

Post by clight77 by clight77 May 2018 11 02:16

Sniper_E wrote:
Fri May 04, 2018 12:26 am
Still working with the core file to define variables for the template.
sniper_recent_topics.zip
I can't get the php to work in html.

User avatar
Sniper_E
Site Admin
Site Admin
Posts: 300
Joined: Mon May 25, 2015 9:27 pm
Status: Offline
Screen Resolution: 1920x1080
  • Windows 10 Firefox

Re: recent topics custom page

May 2018 17 22:25

Post by Sniper_E » Thu May 17, 2018 10:25 pm

Post by Sniper_E by Sniper_E May 2018 17 22:25

I installed phpbb-extensions/pages
and created a new page in acp.
recent-topics1.gif
You see above I used a iframe bbcode in the page content to run your recent.php file.
recent-topics2.gif
And then I created a iframe bbcode.
recent-topics3.gif
And I placed your recent.php file in the root of the forum.

Code: Select all

<?php

    define('IN_PHPBB', true);
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
	  
    // Start session management
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('');

    page_header('Recent');

    $template->set_filenames(array(
        'body' => 'recent.html',
    ));

        $urlPath = "../";
        include 'config.php';

        $table_topics = $table_prefix. "topics";
        $table_forums = $table_prefix. "forums";
        $table_posts = $table_prefix. "posts";
        $table_users = $table_prefix. "users";
        $link = mysqli_connect("$dbhost", "$dbuser", "$dbpasswd", "$dbname") or die("Could not connect");
        
        $query = "SELECT t.topic_id, t.topic_title, t.topic_first_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, p.post_text,u.username
        FROM $table_topics t, $table_forums f, $table_posts p, $table_users u
        WHERE t.topic_id = p.topic_id AND
        f.forum_id = t.forum_id AND
		f.forum_id <> '8' AND 
        p.post_id = t.topic_first_post_id AND
        p.poster_id = u.user_id
        ORDER BY p.post_id DESC LIMIT 70";
        $result = mysqli_query($link, $query) or die("Query failed");                           
		$num=mysqli_num_rows($result);
			if ($num == "0") {
				echo "<li>There are currently no related topics in our forums. <a href='{{ ROOT_PATH }}'>Post a new forum topic now</a>.</li>";
			}
			else {
				$num=0;
				print "<h4>";
				while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
					$posttext = substr(strip_tags($row["post_text"]), 0, 0);
						echo  "<b><a href=\"/viewtopic.php?t=$row[topic_id]\">" .
						$row["topic_title"] . "</a>" . $posttext . "  " . "</b><br />";
						$num++;
					}
				print "</h4>";
				}
        mysqli_free_result($result);
        mysqli_close($link);
		
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
	
?>
You do not have the required permissions to view the files attached to this post.

User avatar
clight77
Vip
Vip
Posts: 75
Joined: Thu Oct 15, 2015 12:33 pm
Status: Online
Screen Resolution: 1920x1080
  • Windows 10 Chrome

Re: recent topics custom page

May 2018 17 23:07

Post by clight77 » Thu May 17, 2018 10:26 pm

Post by clight77 by clight77 May 2018 17 23:07

I try :)
THX :)

Double posted the time between posts was 41 minutes :
Not work for me, do I need tha html file in styles also ?

User avatar
Martin
Founder
Founder
Posts: 964
Joined: Sun May 24, 2015 3:14 pm
Status: Offline
Screen Resolution: 1920x1080
  • Ubuntu Chrome

Re: recent topics custom page

May 2018 23 15:59

Post by Martin » Wed May 23, 2018 3:59 pm

Post by Martin by Martin May 2018 23 15:59

There is a new version of page ext out again.

User avatar
jan_2017
Member
Member
Posts: 14
Joined: Sat May 06, 2017 6:59 am
Status: Offline
Screen Resolution: 360x640
  • Linux Chrome

Re: recent topics custom page

May 2018 23 17:48

Post by jan_2017 » Wed May 23, 2018 5:48 pm

Post by jan_2017 by jan_2017 May 2018 23 17:48

Nice....good job.

I would be happy if the QTE would appear in the Recent Topics.

But .... no updates to this issue. :cry:

Bye Jan

[ Post made via Huawei P9 EVA-L09 ]