NV recent topics

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
drtran
Registered User
Posts: 60
Joined: Sat May 02, 2009 3:15 pm

Re: NV recent topics

Post by drtran »

Hi,

I have this installed on one of my theme and it work perfectly, but when I tried to install this on my other theme that based on prosilver, it doesnt show up.

On my Prosilver folder, i have a index_body and on my Versatility theme folder, i also have another index_body file.

I tried entering the code

Code: Select all

<!-- IF RECENT_TOPICS_DISPLAY --><!-- INCLUDE recent_topics_body.html --><!-- ENDIF -->
To my Prosilver folder because the theme is based off that, I get nothing. Won't show on the forum.

When I enter my Versatility theme folder index_body file, this is what I see only...

Code: Select all

<!-- INCLUDE overall_header.html -->
<!-- INCLUDE forumlist_body.html -->
<!-- INCLUDE overall_footer.html -->
I added <!-- INCLUDE recent_topics_body.html --> to it also, but it didnt work..instead it gave me a message on the index: There are no topics or posts in this forum.


Could you diagnose where I should enter the code? The problem lies in the template that I know..because other templates work with it.
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: NV recent topics

Post by nickvergessen »

Looks like you didn't select any forum.
No Support via PM
wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: NV recent topics

Post by wired076 »

I have installed this mod on 3.0.6 RC 4 and am receiving the following error:

Code: Select all

Fatal error: Call to undefined function display_recent_topics() in /var/www/monkeygun/php/index.php on line 147
Please advise.

How do I fix this?
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: NV recent topics

Post by nickvergessen »

seems like you didn't follow the instructions for the index.php correctly.
No Support via PM
wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: NV recent topics

Post by wired076 »

nickvergessen wrote:seems like you didn't follow the instructions for the index.php correctly.
I have double checked my edits for this file and I can verify that they are correct.

I have attached it here.

Please advise.

Code: Select all

<?php
/**
*
* @package phpBB3
* @version $Id: index.php 9614 2009-06-18 11:04:54Z nickvergessen $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
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);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
// BEG MyCalendar3 MOD
include($phpbb_root_path . 'mini_calendar.' . $phpEx);
// END MyCalendar3 MOD

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts	= $config['num_posts'];
$total_topics	= $config['num_topics'];
$total_users	= $config['num_users'];
//phpbb gallery mod
$total_images	= $config['num_images'];
$user->add_lang('mods/info_acp_gallery');
$l_total_image_s = ($total_images == 0) ? 'TOTAL_IMAGES_ZERO' : 'TOTAL_IMAGES_OTHER';
//phpbb gallery mod

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
	$sql = 'SELECT group_id, group_name, group_colour, group_type
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend = 1
		ORDER BY group_name ASC';
}
else
{
	$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
			)
		WHERE g.group_legend = 1
			AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
		ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
	$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
	$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

	if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
	{
		$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
	}
	else
	{
		$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
	}
}
$db->sql_freeresult($result);

$legend = implode(', ', $legend);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
	$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
	$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
		FROM ' . USERS_TABLE . ' u
		LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
		WHERE (b.ban_id IS NULL
			OR b.ban_exclude = 1)
			AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
			AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
	$result = $db->sql_query($sql);

	while ($row = $db->sql_fetchrow($result))
	{
		$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

		if ($age = (int) substr($row['user_birthday'], -4))
		{
			$birthday_list .= ' (' . ($now['year'] - $age) . ')';
		}
	}
	$db->sql_freeresult($result);
}

// Assign index specific vars
$template->assign_vars(array(
	'TOTAL_POSTS'	=> sprintf($user->lang[$l_total_post_s], $total_posts),
	'TOTAL_TOPICS'	=> sprintf($user->lang[$l_total_topic_s], $total_topics),
	'TOTAL_USERS'	=> sprintf($user->lang[$l_total_user_s], $total_users),
	//phpbb gallery mod
	'TOTAL_IMAGES'	=> ($config['gallery_total_images']) ? sprintf($user->lang[$l_total_image_s], $total_images) : '',
	//phpbb gallery mod
	'NEWEST_USER'	=> sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),

	'LEGEND'		=> $legend,
	'BIRTHDAY_LIST'	=> $birthday_list,

	'FORUM_IMG'				=> $user->img('forum_read', 'NO_NEW_POSTS'),
	'FORUM_NEW_IMG'			=> $user->img('forum_unread', 'NEW_POSTS'),
	'FORUM_LOCKED_IMG'		=> $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
	'FORUM_NEW_LOCKED_IMG'	=> $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),

	'S_LOGIN_ACTION'			=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
	'S_DISPLAY_BIRTHDAY_LIST'	=> ($config['load_birthdays']) ? true : false,

	'U_MARK_FORUMS'		=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);
//NV RT MOD

if ($config['rt_index'])
{
	if (!function_exists('display_recent_topics'))
	{
		include($phpbb_root_path . 'includes/functions_recenttopics.' . $phpEx);
	}
	display_recent_topics($config['rt_number'], $config['rt_page_number'], $config['rt_anti_topics'], 'recent_topics', request_var('f', 0), true);
}
//NV RT MOD
// Output page
page_header($user->lang['INDEX']);

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

page_footer();

?>
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: NV recent topics

Post by nickvergessen »

did you upload the includes/functions_recenttopics.php
No Support via PM
wired076
Registered User
Posts: 1441
Joined: Mon May 21, 2007 10:19 am

Re: NV recent topics

Post by wired076 »

nickvergessen wrote:did you upload the includes/functions_recenttopics.php
Yes I had but I accidentally uploaded the wrong functions_recenttopics.php file from an older version I have on my pc.

Thanks it is working again now.

Will test it further later tonight!
User avatar
JesusADS
Registered User
Posts: 140
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela

Re: NV recent topics

Post by JesusADS »

Hi, i'm trying to add this mod on a center block of my Board3, but it tell me this:

"There are no topics or posts in this forum"

I assume that it doesn't find information because it is't on the index, how can I do to bring data from the index.php to the portal.php??

Thanks :D
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: NV recent topics

Post by nickvergessen »

Add the code that is added to index.php to the portal.php?
No Support via PM
User avatar
JesusADS
Registered User
Posts: 140
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela

Re: NV recent topics

Post by JesusADS »

nickvergessen wrote:Add the code that is added to index.php to the portal.php?
Thanks!!!! :D now works perfect :D
User avatar
JesusADS
Registered User
Posts: 140
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela

Re: NV recent topics

Post by JesusADS »

Hi!! i want than all topic for certain forum don't be displayed on the recent topics, but i don't want to be entering to the config of the mod to add de topic id every time a post a new one on that forum...

So, is there a way to exclude a complete forum and not just a topic??

Thanks :D
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: NV recent topics

Post by nickvergessen »

Go to ACP > Forums > Manage Forum >
there's an option for it.
No Support via PM
User avatar
JesusADS
Registered User
Posts: 140
Joined: Tue Oct 27, 2009 2:26 pm
Location: Venezuela

Re: NV recent topics

Post by JesusADS »

nickvergessen wrote:Go to ACP > Forums > Manage Forum >
there's an option for it.
Thanks, I didn't noticed that option :D
User avatar
MPG187
Registered User
Posts: 519
Joined: Sun Apr 12, 2009 7:39 pm
Location: Operation420.net
Name: Operation 420
Contact:

Re: NV recent topics

Post by MPG187 »

How can I make it appear on the main page.

For example, my forum is located at http://operation420.net/forum and I want the recent tpics list to appear on http://operation420.net
phpBB 3.0.4, http://operation420.net/forum, download package from phpBB.com (fresh install), mods installed, British English, MySQL 4.1.14
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: NV recent topics

Post by DoYouSpeakWak »

MPG187 wrote:How can I make it appear on the main page.

For example, my forum is located at http://operation420.net/forum and I want the recent tpics list to appear on http://operation420.net
Have you tried to look in the contrib folder ?
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
Locked

Return to “[3.0.x] MOD Database Releases”