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
pixelhead
Registered User
Posts: 1
Joined: Tue Sep 01, 2009 1:56 pm

Re: NV recent topics

Post by pixelhead »

First of all, thanks for that great MOD!!!

I like to keep my Recent Topics box very basic. So I wonder if I could change the Date Time style of the latest post? I'd like to show just the time not the date. It's made by LAST_POST_TIME as far as I can see. So is there a chance to chnage this just for 'Recent Topics'?

Thanx in advance
Andreas
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 »

find that string in includes/functions_recenttopics.php and adjust the $user->format_date() let it have a second parameter with the date-format you want
No Support via PM
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

Awesome mod!

I have one request though

I added the function to viewtopic.php and viewforum.php so it works in my sidebar.

When I am in the forum index it works great
but when I am in a subform or viewing a topic it shows only the topics in that subforum.

How can I show recent topics as if it was forum index?
I want users to be able to see recent topics from whole site, regardless of where they are on the site.

Any ideas?
Much appreciated!
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 »

This was asked several times, please have a look at tha last pages
No Support via PM
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

nickvergessen wrote:This was asked several times, please have a look at tha last pages
the only post I can find that sort of touches on this is
http://www.phpbb.com/community/viewtopi ... x#p9768185

it seems it is for a different version?

that exact code is missing in the version I have
my version is

Code: Select all

* @version $Id: functions_recenttopics.php 201 2009-08-03 08:37:12Z nickvergessen $
which uses this code for $spec_forum_id

Code: Select all

	if ($spec_forum_id)
	{
		// Only take a special-forum
		if (!$include_subforums)
		{
			if (!in_array($spec_forum_id, $forum_ids))
			{
				return;
			}
			$forum_ids = array();
			$sql = 'SELECT 1 as display_forum
				FROM ' . FORUMS_TABLE . '
				WHERE forum_id = ' . $spec_forum_id . '
					AND forum_recent_topics = 1';
			$result = $db->sql_query_limit($sql, 1);
			$display_forum = (bool) $db->sql_fetchfield('display_forum');
			$db->sql_freeresult($result);

			if ($display_forum)
			{
				$forum_ids = array($spec_forum_id);
			}
		}
		else
		{
			// ... and it's subforums
			$sql = 'SELECT f2.forum_id
				FROM ' . FORUMS_TABLE . ' f1
				LEFT JOIN ' . FORUMS_TABLE . " f2
					ON (f2.left_id BETWEEN f1.left_id AND f1.right_id
						AND f2.forum_recent_topics = 1)
				WHERE f1.forum_id = $spec_forum_id
					AND f1.forum_recent_topics = 1
				ORDER BY f2.left_id DESC";
			$result = $db->sql_query($sql);

			while ($row = $db->sql_fetchrow($result))
			{
				$spec_forum_ary[] = $row['forum_id'];
			}
			$db->sql_freeresult($result);

			$forum_ids = array_intersect($forum_ids, $spec_forum_ary);

			if (!sizeof($forum_ids))
			{
				return;
			}
		}
	}
	else
	{
		$sql = 'SELECT forum_id
			FROM ' . FORUMS_TABLE . '
			WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
				AND forum_recent_topics = 1';
		$result = $db->sql_query($sql);

		$forum_ids = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$forum_ids[] = $row['forum_id'];
		}
		$db->sql_freeresult($result);
	}
what do I have to edit?

much appreciated
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 »

replace by

Code: Select all

			$sql = 'SELECT forum_id
				 FROM ' . FORUMS_TABLE . '
				 WHERE ' . $db->sql_in_set('forum_id', $forum_ids) . '
					AND forum_recent_topics = 1';
			$result = $db->sql_query($sql);

			$forum_ids = array();
			while ($row = $db->sql_fetchrow($result))
			{
				 $forum_ids[] = $row['forum_id'];
			}
			$db->sql_freeresult($result);
No Support via PM
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

perfect!

thank you very much it wasn't very clear in the other post

works 100% now


thanks again, you rock!

:D
NicksNet
Registered User
Posts: 55
Joined: Sat Apr 04, 2009 1:16 pm

Re: NV recent topics

Post by NicksNet »

Hi,

i installed this mod: http://www.phpbb.com/community/viewtopi ... &t=1524575 and woulld like to add the ratings in recent topics also but i cant figured out how to do this :oops:

can anyone help me to integrate the ratings into recent topics?

Regards

PS: table is done, but no output - http://tattoo-freun.de/index.php
Sorry, my English isn't the best...
skinnycow
Registered User
Posts: 1
Joined: Wed Oct 28, 2009 9:21 am

Re: NV recent topics

Post by skinnycow »

Hi nickvergessen!

Thanks for all your time and help - this is a great mod and I appreciate it!

I was wondering - and I apologize if this has already been asked - I didn't see it in this thread:

Is it possible to select which topics appear in the list, instead of automatically just the most recent ones?

I know there was a mod for this in phpbb2 but I haven't been able to find the equivalent, seems like your mod might be capable?

Thanks again for your time!

Dave :D
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

In the next version (if there is one)
can you add ability to ignore certain forums?
Just like the ignore threads in the ACP

at the moment I do it manually

Code: Select all

	foreach ($forum_read_ary as $forum_id => $allowed)
	{
		if ($allowed['f_read']
		 && $forum_id != 85
		 && $forum_id != 25
		 && $forum_id != 44
		 && $forum_id != 76
		 && $forum_id != 46
		 && $forum_id != 26
		 && $forum_id != 51
		 && $forum_id != 89
		 && $forum_id != 87
		){
			$forum_ary[] = (int) $forum_id;
		}
	}
Pain in the butt to edit each time i add/remove a forum

:D
Last edited by waxxie on Wed Oct 28, 2009 11:36 pm, edited 1 time in total.
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 »

There's an option in the ACP > Forums > Manage forums for that.
No Support via PM
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

I assume its this?
Display active topics:?

One question, if this is selected as no, will I still have the list of recent topics under view forums?
example:

forum category -> sub forum -> sub sub forum 1
forum category -> sub forum -> sub sub forum 2
forum category -> sub forum -> sub sub forum 3

when you are viewing
forum category -> sub forum you will see the 3 sub sub forums, and under that the lastest threads/posts

so what I am asking is, if I turn off Display active topics, does it stop showing those things?

I have a large forum and can't "test" this without a sure answer so as not to disrupt the users and site
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 »

No, its:
View on "recent topics":

Maybe you need to purge your cache before you can see it.
No Support via PM
User avatar
waxxie
Registered User
Posts: 119
Joined: Fri Oct 16, 2009 5:21 pm

Re: NV recent topics

Post by waxxie »

nickvergessen wrote:No, its:
View on "recent topics":

Maybe you need to purge your cache before you can see it.
WEIRD!

I just checked the install file

Code: Select all

<dl>
			<dt><label for="forum_recent_topics">{L_RECENT_TOPICS_LIST}:</label><br /><span>{L_RECENT_TOPICS_LIST_EXPLAIN}</span></dt>
			<dd><label><input type="radio" class="radio" name="forum_recent_topics" value="1"<!-- IF RECENT_TOPICS --> id="forum_recent_topics" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
				<label><input type="radio" class="radio" name="forum_recent_topics" value="0"<!-- IF not RECENT_TOPICS --> id="forum_recent_topics" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
		</dl>
was missing in my adm/style/acp_forums.html file
but everything else is ok

wow that explains alot!
thanks man
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 »

PHPBB should have this anyways
phpBB 3.0.4, http://operation420.net/forum, download package from phpBB.com (fresh install), mods installed, British English, MySQL 4.1.14
Locked

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