Page 24 of 33

Re: NV recent topics

Posted: Mon Oct 12, 2009 2:38 pm
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

Re: NV recent topics

Posted: Mon Oct 12, 2009 4:28 pm
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

Re: NV recent topics

Posted: Thu Oct 22, 2009 2:31 am
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!

Re: NV recent topics

Posted: Thu Oct 22, 2009 7:38 am
by nickvergessen
This was asked several times, please have a look at tha last pages

Re: NV recent topics

Posted: Thu Oct 22, 2009 12:11 pm
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

Re: NV recent topics

Posted: Thu Oct 22, 2009 3:08 pm
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);

Re: NV recent topics

Posted: Thu Oct 22, 2009 4:29 pm
by waxxie
perfect!

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

works 100% now


thanks again, you rock!

:D

Re: NV recent topics

Posted: Tue Oct 27, 2009 6:21 pm
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

Re: NV recent topics

Posted: Wed Oct 28, 2009 9:27 am
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

Re: NV recent topics

Posted: Wed Oct 28, 2009 10:58 pm
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

Re: NV recent topics

Posted: Wed Oct 28, 2009 11:03 pm
by nickvergessen
There's an option in the ACP > Forums > Manage forums for that.

Re: NV recent topics

Posted: Thu Oct 29, 2009 4:31 pm
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

Re: NV recent topics

Posted: Thu Oct 29, 2009 5:43 pm
by nickvergessen
No, its:
View on "recent topics":

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

Re: NV recent topics

Posted: Thu Oct 29, 2009 9:28 pm
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

Re: NV recent topics

Posted: Tue Nov 03, 2009 2:47 am
by MPG187
PHPBB should have this anyways