verified userlist

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

verified userlist

Beitrag von mayona »

Hiya Oxpus,

I am trying to just show the pending users on the list without the verified ones... like the one in the acp... how can i do that?

Thanks :)
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

There already comes an Add-On with the mod to get a list about verified and pending user for the board...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

thanks Oxpus... yes i got the verify_user_list.php. Unfortunately, what i only need is to show the pending users and not the validated users.

Thanks for answering :). I manage to find the solution to it :).
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

Hi Oxpus... Is there a way that the only verified users(once I verified them) can "suggest" (can click the verify link) the person to be verified?

Maybe we can add it to the config option :)

thanks :)

the below option in the config looks like i can use but not but not exactly what wanted to accomplish :(
Allow verified users to verify
If you enable this, verified user are able to verify other users, too. The admins alltimes can verify. If you will disable this, verify user will be handle as not verified users.

[/quote]
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Disable
Allow verified users to verify
and verified user only can suggest.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

I ticked that to "no" but still unverified users can suggest :(... I think it has to be hard coded.
Allow verified users to verify
What i wanted to do is Allow verified users to only suggest :)
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Oh yes of cause a not defined possibility.
But really wanted?
The intention of this option was to enable already verified user to verify another user, too, beside admins and (if set) mods, not to just suggest.
The suggestions should be done by all users or only admins/mods...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

But really wanted?
Yes, Please :).
The problem is that all of them keep suggesting another user and my users kinda don't like it...

If you could throw any quick code...much appreciated.

thanks
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, I will see what I can do quickly...

EDIT
I've updated the mod to 2.2.0. Update and try it out.
Please post a short feedback to publish the mod on other sides, too.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

Thanks oxpus... :)

However, I don't c any changes on the config tpl... are we missing something?

I updated it to 2.2.0 but there's some errors... example below
# ALTER TABLE phpbb_verified_config ADD COLUMN allow_verify_suggest TINYINT( 1 ) DEFAULT '0' NOT NULL
+++ Successfull

# UPDATE phpbb_users SET verify_status = , verified_by = 6, verified_by_name = 'mayona', verified_time = '', verified_suggest = 6, verified_suggest_name = 'mayona', verified_suggest_time = '' WHERE user_id = 4
+++ Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' verified_by = 6, verified_by_name = 'mayona', verifie



# DELETE FROM phpbb_verified_user WHERE verified_by = 2
+++ Successfull

# DELETE FROM phpbb_verified_user WHERE verified_by = 150
+++ Successfull

# ALTER TABLE phpbb_verified_user DROP COLUMN verified_time
+++ Error: Can't DROP 'verified_time'. Check that column/key exists

# ALTER TABLE phpbb_verified_user DROP COLUMN verify_status
+++ Error: Can't DROP 'verify_status'. Check that column/key exists

# ALTER TABLE phpbb_verified_user DROP PRIMARY KEY
+++ Successfull
[/quote]

I am afraid i might mess up things... do u happen to have patches or text that will show me which one had been change? I am seeing 3 files (lang_main, usercpviewprofile, and constants) am i right?
there's also an error on the lang file but detectable (the " ' " in "aren't able to verify and other users aren't able to suggest")
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

PS... will you, also, please check the config file... i think you forgot to update that as well :)
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

:!:
Okay, the db-update script was wrong. I fixed it know. But you must not reuse the new one!
And I changed the update script, too. Hmpf, not the file itself, just the update. Okay, be fixed, too.

Thanks for the feedback! I hope the mod is now working for you as you wanted...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

Thanks Oxpus it's working great :)...

Just one minor problem that I encountered when I submit the config...

verify_user_config.php look for

Code: Alles auswählen

$sql = "UPDATE " . VERIFY_CONFIG_TABLE . " SET admin_notify = $admin_notify, allow_verify = $allow_verify, allow_suggest = $allow_suggest, verify_both = $verify_both, verify_mod_allow = $verify_mod_allow, verify_explain = '$verify_explain', join_group = $verify_group, suggest_group = $verify_suggest_group";
I change it to... missing "allow_verify_suggest= $allow_verify_suggest"

Code: Alles auswählen

$sql = "UPDATE " . VERIFY_CONFIG_TABLE . " SET admin_notify = $admin_notify, allow_verify = $allow_verify, allow_verify_suggest= $allow_verify_suggest, allow_suggest = $allow_suggest, verify_both = $verify_both, verify_mod_allow = $verify_mod_allow, verify_explain = '$verify_explain'";
Works well.
Thank you for your help :).

PS. I am modifying the code to my site, unfortunately it's not working right... maybe you can help me again???

Mayona
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Thanks for reporting this bug. The mod is updated.
PS. I am modifying the code to my site, unfortunately it's not working right... maybe you can help me again???
What's not working?
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

Beitrag von mayona »

someone deleted my post :(
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Which post? It's no deleted post here...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
mayona
Beiträge: 19
Registriert: Sa 18.Dez, 2004 00:33

me bad...

Beitrag von mayona »

Probably I didn't submit it or pressed the wrong button... it's German :)

anyway, here's my problem.

I have profilephoto_mod installed... and instead of verifying the user... I wanna use it to verify someone else's photo....

I only wanna show the link "verify photo/verify user" (all it's function) if there's a photo. I know it has to be change something in the profilephoto_mod.php file.

I copied whatever on the usercp_viewprofile.php onto profilephoto_mod.php
and here's the part that views the profile...

Code: Alles auswählen

function perform_viewprofile()
	{
		global $HTTP_GET_VARS, $lang, $board_config, $phpbb_root_path, $phpEx, $template;
		
		if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profilephoto.'.$phpEx) )
		{
			include($phpbb_root_path . 'language/lang_english/lang_profilephoto.'.$phpEx);
		}
		else
		{
			include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_profilephoto.' . $phpEx);
		}

		if ( empty($HTTP_GET_VARS[POST_USERS_URL]) || $HTTP_GET_VARS[POST_USERS_URL] == ANONYMOUS )
		{
			message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']);
		}
		$profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL]));

		// Verify User Start
if ( $userdata['session_logged_in'] )
{
	include_once($phpbb_root_path . 'includes/functions_verify_user.'.$phpEx);

	// Get verify mode
	$verify = ( isset($HTTP_GET_VARS['verify']) ) ? $HTTP_GET_VARS['verify'] : $HTTP_POST_VARS['verify'];

	// Check if user is banned
	$verify_ban = get_verify_ban_status($userdata['user_id']);

	// Check verify status and user ban
	if ( ( $verify == 'verify' || $verify == 'pending' ) && $verify_ban == FALSE )
	{
		// Get verify status for current user
		$verify_userstatus = get_verify_user($userdata['user_id']);

		// Set verify status for profileuser
		$verify_status = ( ($verify == 'pending' && $verify_config['allow_suggest'] == 1) || ( $verify_userstatus[$userdata['user_id']]['id'] == 2 && $verify_config['allow_verify_suggest'] == 1)) ? 1 : ( ( $userdata['user_level'] == ADMIN || ( $verify_userstatus[$userdata['user_id']]['id'] == 2 && $verify_config['allow_verify'] == 1 ) ) ? 2 : 0 );

		// Save status and notify profileuser if needed
		if ( $verify_status != 0 )
		{
			// Set status check for undo verifing by admin
			$save_status_check = TRUE;

			$verify_time_now = time();

			switch ($userdata['user_level'])
			{
				case ADMIN:
					$save_status_check = FALSE;
					break;
				case MOD:
					if ( $verify_config['verify_mod_allow'] == 1 )
					{
						$save_status_check = FALSE;
					}
					else
					{
						$save_status_check = TRUE;
					}
					break;
			}
			// Save status check if needed
			if ( $save_status_check == TRUE )
			{
				$sql = "INSERT INTO " . VERIFY_USER_TABLE . " (verified_by, user_id)
					VALUES (" . $userdata['user_id'] . ", " . $profiledata['user_id'] . ")";
				if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not save verifing check', '', __LINE__, __FILE__, $sql);
				}
			}
			
			// Update verify status for user
			$sql = "UPDATE " . USERS_TABLE . " SET 
				verify_status = $verify_status, 
				verified_suggest = ".$userdata['user_id'].", 
				verified_suggest_name = '".$userdata['username']."', 
				verified_suggest_time = $verify_time_now, ";

			switch ($verify)
			{
				case 'pending':
					$sql .= "verified_by = '', 
						 verified_by_name = '', 
						 verified_time = 0";
					break;
				case 'verify':
					$sql .= "verified_by = ".$userdata['user_id'].", 
						 verified_by_name = '".$userdata['username']."', 
						 verified_time = $verify_time_now";
					break;
				default:
					break;
			}
			
			$sql .= " WHERE user_id = " . $profiledata['user_id'];
			if( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not save new verify status', '', __LINE__, __FILE__, $sql);
			}

					
		}
	}
}
// Verify User END

// Verify User START
$vy = get_verify_user($profiledata['user_id']);
$verify = $vy[$profiledata['user_id']]['id'];

$dateformat = ( $userdata['user_dateformat'] == '' ) ? $board_config['default_dateformat'] : $userdata['user_dateformat'];
$timezone = ( $userdata['user_timezone'] == '' ) ? $board_config['board_timezone'] : $userdata['user_timezone'];

$verify_status = $verify;
$verify_user_name = $vy[$profiledata['user_id']]['by_name'];
$verify_user_time = create_date($dateformat, $vy[$profiledata['user_id']]['time'], $timezone);
$verify_suggest_name = $vy[$profiledata['user_id']]['suggest_name'];
$verify_suggest_time = create_date($dateformat, $vy[$profiledata['user_id']]['suggest_time'], $timezone);

$alt_title_by = ': '.$verify_user_name.' ('.$verify_user_time.') ';
$alt_title_suggest = ': '.' ('.$verify_suggest_time.') - ';

if ( $verify_status == 1 )
{
	$verify_user = '<img src="images/haken_gelb.gif" border="0" alt="'.$lang['Suggest_by'].$alt_title_suggest.$lang['User_verify_pending'].'" title="'.$lang['Suggest_by'].$alt_title_suggest.$lang['User_verify_pending'].'" />';
}
else if ( $verify_status == 2 )
{
	$verify_user = '<img src="images/icon_verified.gif" border="0" alt="'.$lang['Suggest_by'].$alt_title_suggest.$lang['User_was_verified'].$alt_title_by.'" title="'.$lang['Suggest_by'].$alt_title_suggest.$lang['User_was_verified'].$alt_title_by.'" />';
}
else if ( $userdata['user_id'] != $profiledata['user_id'] && $userdata['session_logged_in'] )
{
	$verify_ban = get_verify_ban_status($userdata['user_id']);
	
	if ( $verify_ban == FALSE )
	{
		$verify_userstatus = get_verify_user($userdata['user_id']);
		$verify_userstatus[$userdata['user_id']]['id'] = ( $verify_userstatus[$userdata['user_id']]['id'] == '' ) ? 0 : $verify_userstatus[$userdata['user_id']]['id'];

		if ( $userdata['user_level'] == ADMIN || ( $verify_userstatus[$userdata['user_id']]['id'] == 2 && $verify_config['allow_verify'] == 1 ) )
		{
			$verify_mode = 'verify';
		}
		else if ( ($verify_config['allow_suggest'] == 1 || ($verify_userstatus[$userdata['user_id']]['id'] == 2 && $verify_config['allow_verify_suggest'] == 1)) && $userdata['user_level'] != ADMIN )
		{
			$verify_mode = 'pending';
		}
		else
		{
			$verify_mode = '';
		}

		if ( $verify_mode != '')
		{
			$sql = "SELECT * FROM " . VERIFY_USER_TABLE . "
				WHERE verified_by = " . $userdata['user_id'] . "
				AND user_id = " . $profiledata['user_id'];
			if ( !$result = $db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not check old verifing', '', __LINE__, __FILE__, $sql);
			}

			$check_old_verify = $db->sql_numrows($result);
			$db->sql_freeresult($result);

			if ( $check_old_verify == 0 )
			{
				$verify_user = '<a href="'.append_sid("profile.$phpEx?mode=viewprofile&verify=$verify_mode&".POST_USERS_URL."=".$profiledata['user_id']).'" class=mainmenu" alt="'.$verify_config['verify_explain'].'" title="'.$verify_config['verify_explain'].'">'.$lang['Verify_user'].'</a>';
			}
			else
			{
				$verify_user = '';
			}
		}
		else
		{
			$verify_user = '';
		}
	}
	else
	{
		$verify_user = '';
	}
}
// Verify User END

		$photo_img = '';
		if ( $profiledata['user_photo_type'] )
		{
			switch( $profiledata['user_photo_type'] )
			{
				case USER_AVATAR_UPLOAD:
					$photo_img = ( $board_config['allow_photo_upload'] ) ? '<img src="' . $board_config['photo_path'] . '/' . $profiledata['user_photo'] . '" alt="" border="0" />' .'<br><br>' . $verify_user: '';
					break;
				case USER_AVATAR_REMOTE:
					$photo_img = ( $board_config['allow_photo_remote'] ) ? '<img src="' . $profiledata['user_photo'] . '" alt="" border="0" />' .'<br><br>' . $verify_user: '';
					break;
			}
		}

		$template->assign_vars(array(
			'L_PHOTO' => $lang['Profile_photo'],
			'PHOTO_IMG' => $photo_img)
		);
	
	}
if you notice I added the variable verify_user into this line...

Code: Alles auswählen

$photo_img = ( $board_config['allow_photo_upload'] ) ? '<img src="' . $board_config['photo_path'] . '/' . $profiledata['user_photo'] . '" alt="" border="0" />' .'<br><br>' . $verify_user: '';
But it doesn't work... (

Please help ...
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Oh no, not deleted, splitted: http://www.oxpus.de/ftopic-2764.html

Please talk about this request in the new topic. Thanks.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten