Page 1 of 7

[ABD] Latest Posts

Posted: Tue Dec 04, 2007 10:38 pm
by TheUniqueTiger
MOD name : Latest Posts
MOD description : Shows a configurable number of latest posts from the forums that the user can read on the index page.
MOD version : 1.0.0 RC2
MOD author : TheUniqueTiger
phpBB3 version : 3.0.0 and RC7, RC8
MOD format : MODX

Supported styles : Prosilver, Subsilver2

MOD Features : Shows the overall x number of latest posts from the forums the user can read (the number is configured in ACP). In addition you can completely disallow display of latest posts section to guests in the ACP. Latest posts are shown from the forums that the user can read.

Some screenshots :
Prosilver:
Image

Subsilver2:
Image

Demo: Here's the link.

MOD Download: Download link

Awaiting your feedback...

(Thanks to .::Chico::. who asked me to post this MOD which I was using for myself.)

Re: [DEV] Latest Posts

Posted: Wed Dec 05, 2007 4:31 am
by .:: Chico ::.
Really Great!!!
TheUniqueTiger wrote: (Thanks to inspiration from .:: Chico ::., I decided to post it finally! :P )
haha. ;)

Re: [RC] Latest Posts

Posted: Thu Dec 06, 2007 9:52 pm
by TheUniqueTiger
Version 1.0.0 RC1 has been posted. The first post has been updated accordingly.
This is the initial but complete release...
Currently supports only prosilver, but I'll go for subsilver2 too in the next RC.
If all goes well, this MOD will be going for validation soon.

Awaiting your feedback... :P

Re: [RC] Latest Posts

Posted: Fri Dec 07, 2007 9:08 am
by saaiberke
Just installed it, it went very smoothly :) Another great mod, thank you UniqueTiger. :)
Also interested in the subsilver2 and patiently waiting the next release ;)

Grtz,

Nic

Re: [RC] Latest Posts

Posted: Fri Dec 07, 2007 9:34 am
by TheUniqueTiger
Thank you for your compliments...! :P

Re: [RC] Latest Posts

Posted: Fri Dec 07, 2007 6:36 pm
by sevsev
Demo looks great, I'll have to try this one

Re: [RC] Latest Posts

Posted: Fri Dec 07, 2007 9:42 pm
by .:: Chico ::.
Worked beautifully.

Thanks for share this mod with us!

Re: [RC] Latest Posts

Posted: Tue Dec 11, 2007 7:15 pm
by .:: Chico ::.
Just one thing, TUT, i noticed that last posts in global announcement topics doesn't show in the lastes posts list.

Bye

Re: [RC] Latest Posts

Posted: Tue Dec 11, 2007 7:59 pm
by TheUniqueTiger
The topics are selected just by their post_id and the forums which the user can read... It makes no condition on the type of the topic whether sticky/announce/global. So I can't really say... I hope you do have permissions to read in that forum.

Oh yes, I see... global topics have forum_id as 0... so it was not selecting that topic...
Its already fixed on my comp... I'll post it in the next version. Never thought about global topics which have forum_id as 0, which was the problem!

Re: [RC] Latest Posts

Posted: Wed Dec 12, 2007 2:47 am
by mzeblu
Dear Sir,

Thank you so much for making this mod!

Presently it displays the recent posts and will show the same thread multiple times if multiple posts were recently made.

Can you tell me how to change this to Recent Threads so it will only show one instance of the thread in the recent topics area?

:) Very good job sir!

Re: [RC] Latest Posts

Posted: Wed Dec 12, 2007 1:33 pm
by TheUniqueTiger
No its meant to show the latest posts and not the latest topics... If you want the latter then search for another MOD thats around...

Re: [RC] Latest Posts

Posted: Mon Dec 17, 2007 9:30 am
by simple12
I am getting following errors on the index page when i turn on the debug function in my localhost.

Code: Select all

[phpBB Debug] PHP Notice: in file /index.php on line 94: Undefined index: 0
[phpBB Debug] PHP Notice: in file /index.php on line 94: Undefined index: 0
[phpBB Debug] PHP Notice: in file /index.php on line 94: Undefined index: 0
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3424: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3426: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3427: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3428: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Also i think their is a mistake in "install file instructions".

In the install file it is mentioned that edit file board.php located at

Code: Select all

\language\acp\board.php
There is no such file.

In my view it should be

Code: Select all

\language\en\acp\board.php
This works fine.

Re: [RC] Latest Posts

Posted: Mon Dec 17, 2007 6:28 pm
by TheUniqueTiger
Can you tell me what are the contents of the line 94 in index.php and also a few lines above & below...

Thanks for informing me about the typo in install instructions...

Re: [RC] Latest Posts

Posted: Mon Dec 17, 2007 6:37 pm
by simple12
yeah sure,

Code: Select all

//query the db
	$result = $db->sql_query_limit($sql, $config['latest_posts']);
	
	$latest_posts = array();
	while ($latest_post = $db->sql_fetchrow($result))
	{
		$latest_posts[] = $latest_post;
	}
	$db->sql_freeresult($result);
	if (sizeof($latest_posts))
	{
		$template->assign_var('S_SHOW_LATEST_POSTS', true); //assign the template to show latest posts section
		//get the post icons
		$post_icons = $cache->obtain_icons();
		//loop to display each of the latest posts
		foreach ($latest_posts as $latest_post)
		{
			$template->assign_block_vars('latest_post_row', array(
			'POST_TIME' => $user->format_date($latest_post['post_time']),
			'POST_SUBJECT' => $latest_post['post_subject'] != '' ? $latest_post['post_subject'] : '(No Subject)',
	//this is 94th line	'POST_ICON_IMG' => $post_icons[$latest_post['icon_id']]['img'],
			'POST_AUTHOR_FULL' => get_username_string('full', $latest_post['poster_id'], $latest_post['username'], $latest_post['user_colour']),			
			'U_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $latest_post['forum_id'] . '&t=' . $latest_post['topic_id'] . '&p=' . $latest_post['post_id']) . '&#p' . $latest_post['post_id'],
			'FORUM_NAME' => $latest_post['forum_name'],
			'U_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $latest_post['forum_id']),
			));		
		}
		unset($post_icons);
		unset($latest_posts);
		unset($latest_post);
	}	
}
//end MOD

// 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';
}

Re: [RC] Latest Posts

Posted: Mon Dec 17, 2007 6:56 pm
by Amphor
I think it should be in header, not footer
because like when you come to the page, you can see them without scrolling down. User might not know there is such MOD installed.