Your Portal Version: 1.0.2
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Basic Knowledge
What have you done before the problem was there?
Maybe mod, that just add after each 1st and last post advertisement. But i am not sure, if after that was this problem. And I have Phpgallery installed
What have you already tryed to solve the problem?
nothing, cause I dont know what
Description and Message
Hello,
my problem is, that 2 years everything works perfect, I had Phpbb3portal, and after login, I can see how much new posts are in the forum.
But now, it seems, that after login I can see only in how many topic are new posts.
So, for example, if there are 5 new posts in 1 topic, I can see that only 1 new post is in my forum.
But if these 5 posts are in 3 different topics, I can see that 3 new posts are in my forum.
It is strange...
I speak about the user menu on the main page in the portal, where is New posts (x) or something like this.
Thanks for help
New posts counter
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.
-
- Former Team Member
- Posts: 625
- Joined: 19. January 2008 23:56
- phpBB.de User: thomas.d
- phpBB.com User: thomas.d
- Contact:
Re: New posts counter
Hi ttkk,
this is by design.
It was the other way round before, but a lot of users wanted it like it is now.
this is by design.
It was the other way round before, but a lot of users wanted it like it is now.
Viele Grüße
Thomas
Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
Thomas
Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
Re: New posts counter
And what if I want to count new posts like it was?
-
- Former Team Member
- Posts: 625
- Joined: 19. January 2008 23:56
- phpBB.de User: thomas.d
- phpBB.com User: thomas.d
- Contact:
Re: New posts counter
This is the code of user_menu.php (version RC1), before the change to what it is now:
Code: Select all
<?php
/**
*
* @package - Board3portal
* @version $Id: user_menu.php 142 2008-03-09 17:19:34Z kevin74 $
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) Ice, (c) nickvergessen ( http://www.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
if (!defined('IN_PORTAL'))
{
exit;
}
//
// + new posts since last visit & you post number
//
if ($user->data['is_registered'])
{
// new posts since last visit
$sql = "SELECT COUNT(distinct post_id) as total
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $user->data['session_last_visit'];
$result = $db->sql_query($sql);
$new_posts_count = (int) $db->sql_fetchfield('total');
// your post number
$sql = "SELECT user_posts
FROM " . USERS_TABLE . "
WHERE user_id = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$you_posts_count = (int) $db->sql_fetchfield('user_posts');
}
//
// - new posts since last visit & you post number
//
// Get user...
$user_id = $user->data['user_id'];
$username = $user->data['username'];
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
$result = $db->sql_query($sql);
$member = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$avatar_img = get_user_avatar($member['user_avatar'], $member['user_avatar_type'], $member['user_avatar_width'], $member['user_avatar_height']);
$rank_title = $rank_img = '';
get_user_rank($member['user_rank'], $member['user_posts'], $rank_title, $rank_img, $rank_img_src);
$username = $member['username'];
$user_id = (int) $member['user_id'];
$colour = $member['user_colour'];
// Assign specific vars
$template->assign_vars(array(
'L_NEW_POSTS' => $user->lang['SEARCH_NEW'] . ' (' . $new_posts_count . ')',
'L_SELF_POSTS' => $user->lang['SEARCH_SELF'] . ' (' . $you_posts_count . ')',
'AVATAR_IMG' => $avatar_img,
'RANK_TITLE' => $rank_title,
'RANK_IMG' => $rank_img,
'RANK_IMG_SRC' => $rank_img_src,
'USERNAME_FULL' => get_username_string('full', $user_id, $username, $colour),
'USERNAME' => get_username_string('username', $user_id, $username, $colour),
'USER_COLOR' => get_username_string('colour', $user_id, $username, $colour),
'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $colour),
'U_NEW_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=newposts'),
'U_SELF_POSTS' => append_sid($phpbb_root_path . 'search.' . $phpEx . '?search_id=egosearch'),
'U_UM_BOOKMARKS' => ($config['allow_bookmarks']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "i=main&mode=bookmarks") : '',
'U_UM_MAIN_SUBSCRIBED' => append_sid($phpbb_root_path . 'ucp.' . $phpEx . '?i=main&mode=subscribed'),
'U_PRIVATE_MESSAGES' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') : '',
));
?>
Viele Grüße
Thomas
Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
Thomas
Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
Re: New posts counter
I changed new posts in the new version by the new posts passage from the old version in user_menu.php from /portal/block/, and it is working now.
Thank you very much.
Lock please
Thank you very much.
Lock please
Re: New posts counter
Could you pleae show me exactly which files you replaced? It would me so noce if you could use Quotesttkk wrote:I changed new posts in the new version by the new posts passage from the old version in user_menu.php from /portal/block/, and it is working now.
Thank you very much.
Lock please
Re: New posts counter
ttkk wrote:I changed new posts in the new version by the new posts passage from the old version in user_menu.php from /portal/block/, and it is working now.
Thank you very much.
Lock please
Could somebody explain me extacly which part of from old version was placed in to the new version of user_meu.php
I couldnt figure it out
thanks