{REQUEST} - Topics Anywhere for phpBB 3.x.

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
User avatar
murdock
Registered User
Posts: 16
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by murdock » Sun Feb 21, 2010 5:44 am

Ok...so here it goes.

The code below is to modify the Topics_Anywhere.php file from phpbb v2 to v3.

Please backup everything before you begin, and proceed at your own risk.
Please keep in mind. This modification WILL NOT allow you to change your Topics_Anywhere link. That part does not work. All this will let you do is continue using Topics_Anywhere with an existing link that you used to use on v2. If anyone figures out how to fix that part of the page, please let me know. That is what I will be working on next.
Also...I don't know, but I think the RSS part of Topics_Anywhere still doesn't work with the changes below.

Ok...with that out of the way...here we go.

Topics_Anywhere V1.11.0
Lines 70 - 80

Code: Select all

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_topics_anywhere.' . $phpEx);

$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
$script_location = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
$script_location = ($script_location == '') ? $script_location : '/' . $script_location;
Change to (2010-02-23 updated en_us to en) jsp/b

Code: Select all

$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'language/en/' . $board_config['default_lang'] . 'common.' . $phpEx);
include($phpbb_root_path . 'language/en/' . $board_config['default_lang'] . 'lang_topics_anywhere.' . $phpEx);

//$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
//$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
//$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
//$script_location = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
//$script_location = ($script_location == '') ? $script_location : '/' . $script_location;
Line 84 - 92 (be sure to take the blank line at after the last //. You need it beacuse you are replacing 2 lines with three. )

Code: Select all

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

Change to:

Code: Select all

// 
// Start session management
//
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
//
// End session management
//
Line 96
If you would like to change the version # from 1.11.0 to something else, that can be found on line 96.

Code: Select all

define('TA_VERSION', '1.11.0');
I changed mine to

Code: Select all

define('TA_VERSION', '1.11.0xxxxx');
Lines 158 - 162 (SQL )

Code: Select all

	$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
		FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f
		WHERE f.cat_id = c.cat_id
		GROUP BY c.cat_id, c.cat_title, c.cat_order
		ORDER BY c.cat_order";
Change to:

Code: Select all

$sql = "SELECT forum_id, forum_name, left_id
		FROM " . FORUMS_TABLE . "
		WHERE parent_id = 0 
		GROUP BY forum_id, forum_name, left_id
		ORDER BY left_id"; //jsp
Line 178

Code: Select all

			ORDER BY cat_id, forum_order";
Change to

Code: Select all

			ORDER BY left_id,forum_id";  //jsp
Lines 198 - 204

Code: Select all

				{
					if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'])
					{
						if (!in_array($forum_rows[$j]['forum_id'], $hide_forums))
						{
							$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '">' . $forum_rows[$j]['forum_name'] . '</option>';
						}
Change to (Update 2010-02-21: Changed parent_id to forum_id in line 203.)

Code: Select all

				{ 
					if ( $forum_rows[$j]['parent_id'] == $category_rows[$i]['forum_id']) 
					{
						if (in_array($forum_rows[$j]['forum_id'], $hide_forums))
						{
							$boxstring_forums .=  '<option value="' . $forum_rows[$j]['forum_id'] . '">' . $forum_rows[$j]['forum_name'] . '</option>';
						}  //jsp
Line 214

Code: Select all

					$boxstring .= '<option value="cat' . $category_rows[$i]['cat_id'] . '">' . $category_rows[$i]['cat_title'] . '</option>';
Change to

Code: Select all

					$boxstring .= '<option value="cat' . $category_rows[$i]['forum_id'] . '">' . $category_rows[$i]['forum_name'] . '</option>';
Line 262

Code: Select all

	global $lang;
Change to

Code: Select all

	global $user, $lang;
Line 267

Code: Select all

		$select .= '<option value="' . $i . '">' . create_date($date_formats[$i], $now, $board_config['board_timezone']) . '</option>';
Change to

Code: Select all

	   $select .= '<option value="' . $i . '">' . $user->format_date($now,$date_formats[$i],false) . '</option>';  //jsp
Lines 289 - 291

Code: Select all

	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx);

	include($phpbb_root_path . 'includes/page_header.'.$phpEx);
Change to

Code: Select all

	include($phpbb_root_path . 'language' . $board_config['default_lang'] . '/en_us/common.' . $phpEx); //jsp

page_header($user->lang['INDEX']);  //jsp
Lines 401 - 403

Code: Select all

	$template->pparse('body');

	include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
Change to

Code: Select all

	$template->display('body');

//	include($phpbb_root_path . './includes/page_tail.'.$phpEx);  rem'ed out JSP 2010-02-20
Lines 496 - 497 (one line of code and a blank line)

Code: Select all

	$auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);

Change to

Code: Select all

  $auth_ary = new auth();
  $auth_ary = $auth->acl_raw_data($userdata, 'f_read');
Line 932 (Comment out)

Code: Select all

		obtain_word_list($orig_word, $replacement_word);
Change to

Code: Select all

		//obtain_word_list($orig_word, $replacement_word); jsp
Line 940 (replace one line with two)

Code: Select all

				$data[$i]['topic_title'] = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
Change to (replace the one line above with the two lines below)

Code: Select all

				$data[$i]['topic_title'] = $topic_rowset[$i]['topic_title']; //jsp
				$data[$i]['topic_title_full'] = $data[$i]['topic_title'];   // jsp
Line 1105 (All of the lines from here on in are +1 from the original unchanged file. This used to be line 1104.)

Code: Select all

							$data[$i]['last_post_time'] = create_date($date_formats[$HTTP_GET_VARS['lpd']], $topic_rowset[$i]['post_time'], $board_config['board_timezone']);
Change to

Code: Select all

							$data[$i]['last_post_time'] = $user->format_date($topic_rowset[$i]['post_time'],$date_formats[$HTTP_GET_VARS['lpd']], false); //jsp
Line 1126 - 1127 (change 2 lines to 3)

Code: Select all

							$trans = array_flip($trans);
							$data[$i]['topic_title'] = strtr($data[$i]['topic_title'], $trans);
Change to

Code: Select all

							$trans = array_flip($trans);
							$topic_title_full = $data[$i]['topic_title']; //jsp
							$data[$i]['topic_title'] = strtr($data[$i]['topic_title'], $trans);
Lines 1298 - 1310

Code: Select all

							$url_to_topic = '<a href=\"' . $full_url . "/viewtopic.$phpEx?" . POST_POST_URL . '=' . $data[$i]['topic_last_post_id'] . '#' . $data[$i]['topic_last_post_id'] . '\"' . $css_link . $target_link . '>' . addslashes($data[$i]['topic_title']) . '</a>';
						}
						else
						{
							$url_to_topic = '<a href=\"' . $full_url . "/viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $data[$i]['topic_id'] . '\"' . $css_link . $target_link . '>' . addslashes($data[$i]['topic_title']) . '</a>';
						}
					}
					else
					{
						$url_to_topic = '<a href=\"' . $full_url . "/viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $data[$i]['topic_id'] . '\"' . $css_link . $target_link . '>' . addslashes($data[$i]['topic_title']) . '</a>';
					}

					$last_post_url = '<a href=\"' . $full_url . "/viewtopic.$phpEx?"  . POST_POST_URL . '=' . $data[$i]['topic_last_post_id'] . '#' . $data[$i]['topic_last_post_id'] . '\"' . $css_link . $target_link . '><img src=\"' . $full_url . '/' . $images['icon_latest_reply'] . '\" alt=\"' . $lang['View_latest_post'] . '\" title=\"' . $lang['View_latest_post'] . '\" border=\"0\" /></a>';
Change to

Code: Select all

							$url_to_topic = '<a href=\"' . $full_url . "/viewtopic.$phpEx?" . POST_POST_URL . '=' . $data[$i]['topic_last_post_id'] . '#' . $data[$i]['topic_last_post_id'] . '\"' . $css_link . $target_link . ' title = \"' . $data[$i]['topic_title_full'] . '\"'  . '>' . addslashes($data[$i]['topic_title']) . '</a>'; // jsp 2008-04-23 added title tag
						}
						else
						{
							$url_to_topic = '<a href=\"' . $full_url . "/viewtopic.$phpEx?" . '=' . $data[$i]['topic_id'] . '\"' . $css_link . $target_link . ' title = \"' . $data[$i]['topic_title_full'] . '\"'  . '>' . addslashes($data[$i]['topic_title']) . '</a>'; // jsp 2008-04-23 added title tag
						}
					}
					else
					{
						$url_to_topic = '<a href=\"' . $full_url . "phpBB3/viewtopic.$phpEx?" . 't=' . $data[$i]['topic_id'] . '\"' . $css_link . $target_link . ' title = \"' . $data[$i]['topic_title_full'] . '\"'  . '>' . addslashes($data[$i]['topic_title']) . '</a>';   // jsp 2008-04-23 added title tag
					}

					$last_post_url = '<a href="' . $full_url . "phpBB3/viewtopic.$phpEx?"  . 'p=' . $data[$i]['topic_last_post_id'] . '#p' . $data[$i]['topic_last_post_id'] . '\"' . $css_link . $target_link . '><img src=\"http://www.yoursite.com/phpBB3/styles/prosilver/imageset/icon_topic_latest.gif' . '\" alt=\"' . $lang['View_latest_post'] . '\" title=\"' . $lang['View_latest_post'] . '\" border=\"0\" /></a>';
Please let me know if I screwed any of the above up and I will edit and correct.
I can't see how to attach a file to the post. If there is some way to do that, let me know and I will attach the final version. Until then, you can download it from here : http://www.njlanparty.com/downloads/top ... here_5.zip

Also, let me know if this helps anyone at all...I tried.

Edit 1 : This is the link to my T_A page. All you would have to do is swap out {MY Forums} with the code for your selected forums.

Code: Select all

http://www.yoursite.com/phpBB3/topics_anywhere.php?mode=show&f={MY Forums}&n=10&a=y&s=y&l=y&m=y&h='a\'s\'m\'p\'l\&so=d&b=lpi&lpb=0&lpd=3&lpi=y&br=y&ch=35&chw=e
Edit 2: 2010-02-21 While still trying to get the setup page to work, I realized that the SQL that selected the forums was incorrect. I changed parent_id to forum_id in line 203 to correct this. Remember, when I originally came up with these code changes, my goal was just to get my Topics_Anywhere to work. The secondary goal was to get the whole page converted, but I never got to that. And now, I'm still working on that.

Edit 3: Ok, my problem was that I couldn't add a new forum I just created to the Topics_Anywhere string. I found the line that does it. Below:

Code: Select all

				$htmlstring .= '&f=u' . rawurlencode(base64_encode(implode(',', $farray)));
So I found this link : http://www.motobit.com/util/base64-decoder-encoder.asp to convert my original string of "MiwzLDQsOSwxMCwxMiwxMywxNCwxNSwxNiwxNywxOSwyMQ%3D%3D" back into "2,3,4,9,10,12,13,14,15,16,17,19,21==". Now, all I need to do is add the new "forum_id" to the end of the string, and re-encode.
(edit - Updated the link to point to Version 5 of my version)
Last edited by murdock on Sat Jun 05, 2010 11:40 pm, edited 2 times in total.

buksida
Registered User
Posts: 308
Joined: Thu Feb 04, 2010 9:11 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by buksida » Mon Feb 22, 2010 6:04 am

Thanks for your efforts, I'll give this a go and report back.

I'm finding more and more limitations with the Filipov code and work-around I have used, however it has been a good solution when there wasn't one.

buksida
Registered User
Posts: 308
Joined: Thu Feb 04, 2010 9:11 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by buksida » Tue Feb 23, 2010 7:19 am

Downloaded your file and gave it a go but no joy I'm afraid!

Ver: 3.0.6
Style: Subsilver2
Lang: English

I uploaded all of the original TA files:

lang_topics_anywhere.php > in /language/en folder
topics_anywhere_result.tpl
topics_anywhere_result_rss.tpl
topics_anywhere_body.tpl > in styles/subsilver2/template folder

First thing was a bunch of errors complaining about missing language files so I changed the /en_us/ to /en/ which worked. Then the main form came up with no formatting (this is probably because the tpl files only work on the old template), not a major problem though.

First run gave me a 404 when submitted so I renamed the topics_anywhere_v3.php back to topics_anywhere.php. This failed also, on submit it just brings back the main form page again.

Hope you can help with this because it looks like its nearly there!

User avatar
murdock
Registered User
Posts: 16
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by murdock » Tue Feb 23, 2010 1:23 pm

Sorry it didn't work, but I think we'll get there.
buksida wrote: First thing was a bunch of errors complaining about missing language files so I changed the /en_us/ to /en/ which worked. Then the main form came up with no formatting (this is probably because the tpl files only work on the old template), not a major problem though.
Yeah...I forgot I did that. Sorry about that. I should have tested it with a clean v3 install. That was the main reason I didn't release it back then. The good news is, I didn't modify other files (I think/hope?). I may have moved old v2 folders over. Also, I have updated a couple of times since, and everything has been fine.
buksida wrote:First run gave me a 404 when submitted so I renamed the topics_anywhere_v3.php back to topics_anywhere.php. This failed also, on submit it just brings back the main form page again.

Hope you can help with this because it looks like its nearly there!
I forgot about the _v3 thing. I did that when I was applying things for this post.

I just got a server error when I try the direct link. I don't know what's going on there, but it does work when the JavaScript is inline in HTML/ASP. Its on the index.asp for my main page, exactly as it was for v2.

Post or PM me a link to a copy of the page that you're trying to get working and maybe I can see something from the error message (ie, line number or missing file.) Maybe by the end of this, we'll have a repeatable process. I updated the en_us to en in the post above. Thanks,
Murdock

buksida
Registered User
Posts: 308
Joined: Thu Feb 04, 2010 9:11 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by buksida » Wed Feb 24, 2010 6:04 am

I've PMd you with the link - I don't even get to the output stage as the form just refreshes on submit!

dellos
Registered User
Posts: 19
Joined: Sat Jan 09, 2010 2:13 am

Re: [REQUEST] Recent Posts on Home Page

Post by dellos » Thu Feb 25, 2010 5:15 pm

I don't have polish letters is there some way to show polish characters like: ęąłóżźćń...
MartinWh wrote:
midwestbonsai wrote:Anyone make anything that will look like the recent posts on this page?
http://www.knowledgeofbonsai.org/index.php

Thanks
Just use this code instead of one above for lastpost.php
View Example

Code: Select all

<style>
	a.Latp2:link,a.Latp2:active,a.Latp2:visited {font-family: verdana, arial, helvetica, sans-serif; font-size: 11px;color:#0F0F0F; font-weight: bold; text-decoration:none; line-height: 14px;}
	a.Latp2:hover {font-family: verdana, arial, helvetica, sans-serif; font-size: 11px;color:#B90000; font-weight: bold; text-decoration:none}
	.Latp {font-family: verdana, arial, helvetica, sans-serif; font-size: 11px;color:#AFAFAF; font-weight: bold; text-decoration:none}
</style>
<TABLE width='200' cellpadding=2 cellspacing=0 border=0 align=center>
<?
        /*** phpBB3 - Last Active Topics System ***/

        //Author: Ioan Filipov

        //Email: jonidev@gmail.com

        //Date: 04.06.2007

        //------------------------------

        //Edit these parameters:

        //MySQL server adress
        $host="localhost";

        //Username
        $user="REMOVED";

        //Password
        $pass="REMOVED";

        //Database
        $db="REMOVED";

        //Table prefix
        $table="forum_";

        //Show last x topics
        $laforums="10";
      
   //Topic name length
        $tl="24";

        $link=mysql_connect($host, $user, $pass);
        $db=mysql_select_db($db);
        $query="select * from $table".topics."  WHERE topic_approved = '1' order by topic_last_post_time desc limit 0,$laforums";
        $query2="select config_name,config_value from $table".config." where config_name = 'server_name' limit 0,1";
        $result2=mysql_query($query2);
        $row2 = mysql_fetch_array($result2);
        extract($row2);
   $posts_per_page = $r3[1];
        $result=mysql_query($query);
        while ($row=mysql_fetch_array($result)) {
        extract($row);
        $date = date("F j, Y, g:i a", $topic_last_post_time );
       $query3="select forum_name from $table".forums." WHERE forum_id = ".$forum_id."";
       $result3=mysql_query($query3);
       $row2 = mysql_fetch_array($result3);
      if(strlen($topic_title) > $tl)
      {
      $topic_title = mb_substr($topic_title,0,$tl, 'utf-8').'...';
      }
      echo "<TR><TD class=Latp><a class=Latp2 href='http://".$config_value."/a1forum/viewtopic.php?f=".$forum_id."&t=".$topic_id."&p=".$topic_last_post_id."#p".$topic_last_post_id."'>".$topic_title."</a></TD></TR><TR><TD class=Latp>Last post: ".$topic_last_poster_name." on ".$date."<br /></TD></TR>\n";
      }
        //-------------------------- END
        ?>
</TABLE>

User avatar
murdock
Registered User
Posts: 16
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by murdock » Fri Feb 26, 2010 6:14 am

I am so close.

I had a power outage tonight and lost all my markers I created for the past few days.

So I started over and started fresh. I now have the page working from beginning to end, including the part that displays the link at the end. Right now the only problem is the part of the string that includes the selected forums is missing.

I have to call it a night right now, but I'll pick this up tomorrow night.

We're almost there....

User avatar
murdock
Registered User
Posts: 16
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by murdock » Mon Mar 01, 2010 5:16 am

Ok, I'm not done yet. I still have a problem (among others) getting the selected forums to appear in the display results page.

Let's see what I can get done tomorrow.

buksida
Registered User
Posts: 308
Joined: Thu Feb 04, 2010 9:11 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by buksida » Thu Mar 04, 2010 1:59 am

Any more progress Murdoch?

Back on the Filipov code, is there a way to make it open links in a new tab instead of a new window in IE? It works fine in Firefox but IE keeps opening windows!

Also does anyone know how to set the background colour of the IFrame in IE? Again works a treat in Firefox so I've had to add CSS to it so that the links are readable in both browsers on dark and light backgrounds.

leegt5
Registered User
Posts: 92
Joined: Wed Jan 12, 2005 12:47 pm

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by leegt5 » Thu Mar 04, 2010 9:34 pm

Heres a simple one that works perfectly in phpbb2 displaying links only to forums id's you choose. Could someone convert it to work for phpbb3 please

Code: Select all

<?php
/////////////////////////////////////////////////////////////////////////////// 
//                            ACTIVE_TOPICS.PHP 
/////////////////////////////////////////////////////////////////////////////// 
// Copyright:   (C) 2002 Matthijs van de Water <matthijs@beryllium.net>
// Version:     1.1 
// Date:        03/02/2002 
/////////////////////////////////////////////////////////////////////////////// 
// Show phpBB 2.0 Active Topics List 
// Output format can be any HTML or XML 
// This script must be able to access vital phpBB 2.0 configuration scripts 
/////////////////////////////////////////////////////////////////////////////// 

/////////////////////////////////////////////////////////////////////////////// 
// CUSTOM SETTINGS 
/////////////////////////////////////////////////////////////////////////////// 

// Amount of active topics to show 
define("TOPIC_COUNT", 7);

// Path to the phpBB 2.0 root directory 
define("PHPBB_PATH", "../phpbb2/");

// URL to the phpBB 2.0 installation 
define("PHPBB_LOCATION", "phpbb2");

// Time format to output the date/time (for format see PHP manual) 
define("TIME_FORMAT", "h.ia"); 

/////////////////////////////////////////////////////////////////////////////// 

// Includes of phpBB scripts 
$phpbb_root_path = PHPBB_PATH; 
if ( !defined('IN_PHPBB') ) 
{ 
  define('IN_PHPBB', true); 
  include(PHPBB_PATH . 'extension.inc'); 
  include(PHPBB_PATH . 'config.'.$phpEx); 
  include(PHPBB_PATH . 'includes/constants.'.$phpEx); 
  include(PHPBB_PATH . 'includes/db.'.$phpEx);
} 

/////////////////////////////////////////////////////////////////////////////// 
// HTML header start 
/////////////////////////////////////////////////////////////////////////////// 
?> 
<table border="0" cellpadding="0" cellspacing="1" align="center">
  <th> 
    <td align="center" colspan="2"></td>
  </th> 

<?php 
///////////////////////////////////////////////////////////////////////////////
// HTML header end 
/////////////////////////////////////////////////////////////////////////////// 

// sql statement to fetch active topics from forums of your choice
$sql = "SELECT DISTINCT t.topic_title, t.topic_last_post_id, p.post_time, f.forum_name 
  FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . FORUMS_TABLE . " AS f 
  WHERE 
    t.forum_id = f.forum_id 

    AND f.forum_id IN (25,1,2,29,3,4,5,6,10,11,26,15,28,18,19,20,22)
      AND f.auth_view = " . AUTH_ALL . "  
      AND p.topic_id = t.topic_id 
      AND p.post_id = t.topic_last_post_id 
  ORDER BY p.post_time DESC LIMIT " . TOPIC_COUNT; 
$nt_result = $db->sql_query($sql); 

if(!$nt_result) 
{ 
    die("Failed obtaining list of active topics".mysql_error()); 
} 
else 
{ 
    $nt_data = $db->sql_fetchrowset($af_result); 
} 
    
if ( count($nt_data) == 0 ) 
{ 
    die("No topics found"); 
} 
else 
{ 
  // $nt_data contains all interesting data 
  for ($i = 0; $i < count($nt_data); $i++) 
  { 
    $title = $nt_data[$i]['topic_title']; 
    if (strlen($title) > 17)
   {
      $title = substr($title, 0 , 17) . '...';
   } 

    $url = PHPBB_LOCATION . 'viewtopic.' . $phpEx . "?" . POST_POST_URL . "=" . $nt_data[$i]['topic_last_post_id'] . "#" . $nt_data[$i]['topic_last_post_id']; 
    $on_forum = 'In the ' . $nt_data[$i]['forum_name'] . ' forum'; 
    $post_time = date(TIME_FORMAT, $nt_data[$i]['post_time']); 
    
    // As of now you can actually do anything with the data 
    // I chose to output in XML 

/////////////////////////////////////////////////////////////////////////////// 
// Item HTML start 
/////////////////////////////////////////////////////////////////////////////// 
?> 
  <tr>

    <td><a href="<?php echo $url; ?>" title="<?php echo $on_forum; ?>" target="_top"><?php echo $title; ?></a> </td>
     <td align="center">&nbsp;Posted at: <?php echo $post_time; ?></td>
  </tr></span>
<?php
///////////////////////////////////////////////////////////////////////////////
// Item HTML end
/////////////////////////////////////////////////////////////////////////////// 

  } 
} 

/////////////////////////////////////////////////////////////////////////////// 
// Footer HTML start 
/////////////////////////////////////////////////////////////////////////////// 
?> 
</table> 
<?php 
/////////////////////////////////////////////////////////////////////////////// 
// Footer HTML end 
///////////////////////////////////////////////////////////////////////////////

// EOF 
?>

User avatar
murdock
Registered User
Posts: 16
Joined: Wed Nov 19, 2003 1:47 am
Location: New Jersey
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by murdock » Mon Mar 08, 2010 12:40 pm

Ok...I got it working!!!!

I just have to smooth out a couple of the option selections before I can post the working file...

Can anyone help with the template work?

User avatar
Jan Kohl
Registered User
Posts: 1
Joined: Thu Mar 11, 2010 1:17 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Jan Kohl » Thu Mar 11, 2010 1:34 am

Templates
These extract to the correct directory structure for phpBB v3.0 templates.

In topics_anywhere.php,

Find:

Code: Select all

topics_anywhere_body.tpl

Code: Select all

topics_anywhere_result.tpl

Code: Select all

topics_anywhere_result_rss.tpl
Replace with:

Code: Select all

topics_anywhere_body.html

Code: Select all

topics_anywhere_result.html

Code: Select all

topics_anywhere_result_rss.html
Cheers!
««« jan kohl »»»
= www.thepits.us =
www.castlegraphics.com

buksida
Registered User
Posts: 308
Joined: Thu Feb 04, 2010 9:11 am

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by buksida » Wed Mar 17, 2010 7:23 am

Jan Kohl wrote:Templates
These extract to the correct directory structure for phpBB v3.0 templates.
404 Not Found
The requested URL /files/TAtemplates.zip does not exist.

User avatar
SpongeWeb
Registered User
Posts: 766
Joined: Thu Jan 27, 2005 2:57 pm
Location: End of the Universe
Contact:

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by SpongeWeb » Tue Mar 23, 2010 4:20 pm

Dont know if anyones interested by I use my own custom code, that displays the latest x amount of topics and author and when it was posted and a link to the topic on any page outside the forum..

as per my home page at www.websponge.net there is a block on the right hand side that only requires a few lines of code and one template variable of {LATEST_TOPICS} is this what you are after?
A friend is someone who knows the song in your heart, and will sing, when you forget the words..

Dudez009
Registered User
Posts: 47
Joined: Sun Dec 20, 2009 8:57 pm

Re: {REQUEST} - Topics Anywhere for phpBB 3.x.

Post by Dudez009 » Wed Mar 24, 2010 2:53 am

Cheers for this.

Locked

Return to “[3.0.x] MOD Requests”