User_last_page_in_profile

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

User_last_page_in_profile

Post by Pthelovod »

Support Request Template
What version of phpBB are you using? phpBB 3.0.7-PL1
What is your board's URL? http://fotovideoforum.ru/index.php
Who do you host your board with? No answer given
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? Yes
Is registration required to reproduce this issue? Yes
What MODs do you have installed? No answer given
What styles do you currently have installed? No answer given
What language(s) is your board currently using? rus
Which database type/version are you using? I Don't Know
What is your level of experience? New to PHP and phpBB
What username can be used to view this issue?
Please do not provide this information if the user requires more than "regular user" privilages.
test
What password can be used to view this issue? welkom
When did your problem begin? No answer given
Please describe your problem. No answer given
Generated by SRT Generator ($Rev: 3988 $)

Good afternoon. Sorry for bad English beforehand.
But I have a similar problem on the forum.
When you open the list of users at the top of the Forum appears several such lines.

Code: Select all

  [phpBB Debug] PHP Notice: in file /memberlist.php on line 1797: sprintf() [function.sprintf]: Too few arguments 
Describe in detail.
All three appeared after installing mod.
User_last_page_in_profile
I can not understand what the problem is, as yet understand little about php.
The same error appears when you open a profile of only those users who currently are in any subject.
If the user is at home, in the forum, in the sub-forum, statistics, looking information "who's online, watching someone else's or my profile or anywhere else, except the topic - error when viewing his profile and list of members is not.
I enclose a portion of the file with the string 1797 ...
String itself

Code: Select all

$location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);  
part of the file

Code: Select all

 // Output the page
page_header($page_title, false);

$template->set_filenames(array(
	'body' => $template_html)
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

page_footer();

/**
* Prepare profile data
*/
function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
{
	global $config, $auth, $template, $user, $phpEx, $phpbb_root_path, $db;

	$username = $data['username'];
	$user_id = $data['user_id'];

	$rank_title = $rank_img = $rank_img_src = '';
	get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);

	if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_user'))
	{
		$email = ($config['board_email_form'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=email&u=' . $user_id) : (($config['board_hide_emails'] && !$auth->acl_get('a_user')) ? '' : 'mailto:' . $data['user_email']);
	}
	else
	{
		$email = '';
	}

	if ($config['load_onlinetrack'])
	{
		$update_time = $config['load_online_time'] * 60;
		$online = (time() - $update_time < $data['session_time'] && ((isset($data['session_viewonline']) && $data['session_viewonline']) || $auth->acl_get('u_viewonline'))) ? true : false;
	}
	else
	{
		$online = false;
	}

	if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
	{
		$last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
	}
	else
	{
		$last_visit = '';
	}

	$age = '';

	if ($config['allow_birthdays'] && $data['user_birthday'])
	{
		list($bday_day, $bday_month, $bday_year) = array_map('intval', explode('-', $data['user_birthday']));

		if ($bday_year)
		{
			$now = getdate(time() + $user->timezone + $user->dst - date('Z'));

			$diff = $now['mon'] - $bday_month;
			if ($diff == 0)
			{
				$diff = ($now['mday'] - $bday_day < 0) ? 1 : 0;
			}
			else
			{
				$diff = ($diff < 0) ? 1 : 0;
			}

			$age = (int) ($now['year'] - $bday_year - $diff);
		}
	}
	// BEGIN: User last page in profile
	$sql = 'SELECT session_page FROM ' . SESSIONS_TABLE . " WHERE session_user_id = {$data['user_id']}" . (!$auth->acl_get('u_viewonline') ? ' AND session_viewonline = 1' : '') . ' ORDER BY session_time DESC';
	$result = $db->sql_query_limit($sql, 1);
	if (($session_row = $db->sql_fetchrow($result)) !== false)
	{
		$data['user_lastpage'] = $session_row['session_page'];
	}
	$db->sql_freeresult($result);

	preg_match('#^([a-z/]+)#i', $data['user_lastpage'], $on_page);
	if (!sizeof($on_page))
	{
		$on_page[1] = '';
	}

	switch ($on_page[1])
	{
		case 'index':
			$location = $user->lang['INDEX'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		case 'adm/index':
			$location = $user->lang['ACP'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		case 'posting':
		case 'viewforum':
		case 'viewtopic':
			preg_match('#f=([0-9]+)#i', $data['user_lastpage'], $forum_id);
			$forum_id = (sizeof($forum_id)) ? $forum_id[1] : 0;

			if ($forum_id)
			{
				$sql = 'SELECT forum_name, forum_type
					FROM ' . FORUMS_TABLE . '
					WHERE forum_id = ' . $forum_id;
				$result = $db->sql_query($sql);
				$forum_data = array($forum_id => $db->sql_fetchrow($result));
				$db->sql_freeresult($result);
			}

			if ($forum_id && $auth->acl_get('f_list', $forum_id))
			{
				$location = '';
				$location_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id);

				if ($forum_data[$forum_id]['forum_type'] == FORUM_LINK)
				{
					$location = sprintf($user->lang['READING_LINK'], $forum_data[$forum_id]['forum_name']);
					break;
				}

				switch ($on_page[1])
				{
					case 'posting':
						preg_match('#mode=([a-z]+)#', $data['user_laspage'], $on_page);

						switch ($on_page[1])
						{
							case 'reply':
							case 'quote':
								$location = sprintf($user->lang['REPLYING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
							break;

							default:
								$location = sprintf($user->lang['POSTING_MESSAGE'], $forum_data[$forum_id]['forum_name']);
							break;
						}
					break;

					case 'viewtopic':
						$location = sprintf($user->lang['READING_TOPIC'], $forum_data[$forum_id]['forum_name']);
					break;

					case 'viewforum':
						$location = sprintf($user->lang['READING_FORUM'], $forum_data[$forum_id]['forum_name']);
					break;
				}
			}
			else
			{
				$location = $user->lang['INDEX'];
				$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
			}
		break;

		case 'search':
			$location = $user->lang['SEARCHING_FORUMS'];
			$location_url = append_sid("{$phpbb_root_path}search.$phpEx");
		break;

		case 'faq':
			$location = $user->lang['VIEWING_FAQ'];
			$location_url = append_sid("{$phpbb_root_path}faq.$phpEx");
		break;

		case 'viewonline':
			$location = $user->lang['VIEWING_ONLINE'];
			$location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx");
		break;

		case 'memberlist':
			$location = (strpos($data['user_lastpage'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
			$location_url = append_sid("{$phpbb_root_path}memberlist.$phpEx");
		break;

		case 'mcp':
			$location = $user->lang['VIEWING_MCP'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		case 'ucp':
			$location = $user->lang['VIEWING_UCP'];

			// Grab some common modules
			$url_params = array(
				'mode=register'		=> 'VIEWING_REGISTER',
				'i=pm&mode=compose'	=> 'POSTING_PRIVATE_MESSAGE',
				'i=pm&'				=> 'VIEWING_PRIVATE_MESSAGES',
				'i=profile&'		=> 'CHANGING_PROFILE',
				'i=prefs&'			=> 'CHANGING_PREFERENCES',
			);

			foreach ($url_params as $param => $lang)
			{
				if (strpos($data['user_lastpage'], $param) !== false)
				{
					$location = $user->lang[$lang];
					break;
				}
			}

			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		case 'download':
			$location = $user->lang['DOWNLOADING_FILE'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		case 'report':
			$location = $user->lang['REPORTING_POST'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;

		default:
			$location = $user->lang['INDEX'];
			$location_url = append_sid("{$phpbb_root_path}index.$phpEx");
		break;
	}
	// END: User last page in profile
	// Dump it out to the template
	return array( 
Help deal with the problem.

Forum 3.0.7 - PL1 rus
style prosilver
location left
The Forum is well upgraded, about 80 mods.
After installing all the mods intractable of problems almost was not.
In this issue I can not understand.
Please.

set fashion

Code: Select all

 Support Toolkit КС3
guest_hide_bbcode
Who is online
Adaptive Hide BBcodes 1.0.2 
Prime Warnings 
Activity_stats_mod 
Avatar in Who is online 
Avatar on Memberlist 
AntiBotQuestion 
Advanced similar topics 
First post on every page 
User_reputation_point  
NV newspage 
guests_online_past_24_hours 
Forum Statistics 0.3.0 
Topic text hover 
Olympus_QR v.1.6.7 
Topics_descriptions_0.4.1 
Мод popup-layer-on-new-pms-1.0.1
ajax chat v2.0.0B8 
ChangeUsersPostCount 
Forum_title_colour_101 
compacted_all-members_page 
postlink_onlick 
Add user_id in viewtopic 1.0.0
unread_color_change 
acp_announcement_centre_122
NV_usertopics_1_0_3 
list_subforums_in_columns v100
quickquote v1.0.0 
Hidden_Imageshack_uplad_bar_1_0_0
EasyScreenshotDumpster-1.0.1 
tinypicplugin_phpBB3_v1.0.7 
Search_users_posts_in_viewtopic_1.0.3 
contact_admin
Advanced BBCode Box 
MSSTI_RSS_v121 
NV_advanced_last_topic_titles_1_2_9 
Мод who_posted_1_0_0a 
Forum_Background_for_phpBB3_108 
Prime Quick Login 
Javascript Logout Confirmation 1.0.1 
avatar_index_viewforum121a 
 
Last edited by Pthelovod on Sun May 23, 2010 4:04 am, edited 1 time in total.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51931
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [phpBB Debug] PHP Notice: in file /memberlist.php

Post by Brf »

You will need to post your problem in the support topic for the mods you are having problems with.

User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: [phpBB Debug] PHP Notice: in file /memberlist.php

Post by Pthelovod »

If possible, pernesite message to the right place. I could not find an open topic of these two modes. Just not quite understand where to place your message. I found a place where they discussed problems similar to mine and posted. In addition do not speak good English, more likely to use interpreters.
Yours faithfully Alexander.

Oleg
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC
Contact:

Re: [phpBB Debug] PHP Notice: in file /memberlist.php

Post by Oleg »

"fashion" above is a gross mistranslation of "modification", and "pernesite" is move.

Pthelovod: you need to first determine which of the two modifications is responsible for the problem.
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: User_last_page_in_profile

Post by Pthelovod »

Topic title and message text has changed.
Problem of still not been solved ... I could not do anything.

Oleg
Former Team Member
Posts: 1221
Joined: Sat Jan 30, 2010 4:42 pm
Location: NYC
Contact:

Re: User_last_page_in_profile

Post by Oleg »

The proper place to ask this is in mod support for the affected mod, but it sounds like you installed a modification for an older version of phpbb and it is not compatible with 3.0.7.
Participate in phpBB development: Get involved | Issue tracker | Report a bug | Development board | [url=irc://chat.freenode.net/phpbb-dev]Development IRC chat[/url]
My stuff: mindlinkgame.com

User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: User_last_page_in_profile

Post by Pthelovod »

A new version of the mod is for 3.0.7? Prompt please. I do not find it.

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: User_last_page_in_profile

Post by tbackoff »

Again, you need to ask in the MODs CDB area. ;)
Flying is the second best thrill to cheerleaders; being caught is the first.

User avatar
Pthelovod
Registered User
Posts: 106
Joined: Mon Feb 22, 2010 1:32 am
Location: Россия
Name: Alexs Pthelovod
Contact:

Re: User_last_page_in_profile

Post by Pthelovod »

If you can - move the topic there, moderatory.Ya a little confused.

Locked

Return to “[3.0.x] Support Forum”