Use Album_pic (smartor) as AVATAR for PcP (RPG.net)

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
jeffreyt
Beiträge: 8
Registriert: Fr 13.Feb, 2004 19:40
Wohnort: Netherlands
Kontaktdaten:

Use Album_pic (smartor) as AVATAR for PcP (RPG.net)

Beitrag von jeffreyt »

Hi,

is someone willing to help me out on this?

I Would like that underneight a picture (on album_showpage.tpl) a link or buttons shows up. When clicking that line or button a script adds the thumbnail size of that picture in the Profile_avatar field.

I someone willing tohelp me out on this... (i Might consider paying for it..)

Thanks in advance,
Jeffrey Treffers
http://www.jeffreyt.nl
Zuletzt geändert von jeffreyt am Mi 11.Aug, 2004 08:51, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

For unterstanding:
You will use the thumbnail, not the real picture itself, as avatar on a user profile?
When the script must copy this file to the right folder and insert this in the user table to get the thumb as avatar.

Is this your request?
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!
jeffreyt
Beiträge: 8
Registriert: Fr 13.Feb, 2004 19:40
Wohnort: Netherlands
Kontaktdaten:

Beitrag von jeffreyt »

Yes that's my requst....

The picture is shown in album_showpage.tpl.

Underneight that picture i would like a link taht says "USE THIS PIC AS YOUR AVATAR" When clicking that link a script takes the pic_thumbnail from the phpbb_album table and pust it automaticly in de phpbb_users table (user_pic field)

That's what i like!

Can You???
Zuletzt geändert von jeffreyt am Mi 11.Aug, 2004 15:57, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Yes I could, but to the moment I've much other requests to do. I'll do it in the next weeks, if you can wait.
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!
jeffreyt
Beiträge: 8
Registriert: Fr 13.Feb, 2004 19:40
Wohnort: Netherlands
Kontaktdaten:

Beitrag von jeffreyt »

Sure i can.... I wanting this for already 8 months and nobody could or was willing to help on this...

So yes.. I'll be waiting....

When starting can you c give me a signal, so i can send you my templates en php files. (because i thinks it's very personal and will probably never asked again?!

Thanks in advance.. And the Q_link works like a sharm! Great!!
Benutzeravatar
AmigaLink
Beiträge: 5843
Registriert: Mi 03.Mär, 2004 09:05
Wohnort: NRW
Kontaktdaten:

Beitrag von AmigaLink »

[quote="jeffreyt - Mi 11.Aug, 2004 16:13";p="11566"] i thinks it's very personal and will probably never asked again?![/quote]
No!
It's a great Idea! :)

I think this funktion will be usefull vor much people who use the Album!
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________

Kein Support per PM, ICQ oder eMail!!!
[/center]
jeffreyt
Beiträge: 8
Registriert: Fr 13.Feb, 2004 19:40
Wohnort: Netherlands
Kontaktdaten:

re.

Beitrag von jeffreyt »

Hi Opus,

although i know you're going to do it, this is what i had... and i was wondering iff i was thing in the right way...

Code: Alles auswählen

///
/// select pic info from table
///

$sql = "SELECT * 
      FROM ". ALBUM_TABLE ." 
      WHERE pic_id = '$pic_id'"; 
if( !$result = $db->sql_query($sql) ) 
{ 
   message_die(GENERAL_ERROR, 'Could not query pic information', '', __LINE__, __FILE__, $sql); 
} 
$thispic = $db->sql_fetchrow($result); 
$db->sql_freeresult($result); 

$cat_id = $thispic['pic_cat_id']; 
$user_id = $thispic['pic_user_id']; 

$pic_filetype = substr($thispic['pic_filename'], strlen($thispic['pic_filename']) - 4, 4); 
$pic_filename = $thispic['pic_filename']; 
$pic_thumbnail = $thispic['pic_thumbnail']; 

if( empty($thispic) or !file_exists(ALBUM_UPLOAD_PATH . $pic_filename) ) 
{ 
   message_die(GENERAL_MESSAGE, $lang['Pic_not_exist']); 
} 




///
/// write pic info on user table
///

if ($submit)
{
	$user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : '';
	$user_avatar_name = ( !empty($HTTP_POST_FILES['avatar']['name']) ) ? $HTTP_POST_FILES['avatar']['name'] : '';
	$user_avatar_size = ( !empty($HTTP_POST_FILES['avatar']['size']) ) ? $HTTP_POST_FILES['avatar']['size'] : 0;
	$user_avatar_filetype = ( !empty($HTTP_POST_FILES['avatar']['type']) ) ? $HTTP_POST_FILES['avatar']['type'] : '';

	$user_avatar = $view_userdata['user_avatar'];
	$user_avatar_type = $view_userdata['user_avatar_type'];

	// check
	$avatar_sql = '';
	if ( isset($HTTP_POST_VARS['avatardel']) )
	{
		$avatar_sql = user_avatar_delete($view_userdata['user_avatar_type'], $view_userdata['user_avatar']);
	}

	if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] )
	{
		if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $view_userdata['user_avatar'])) )
		{
			@unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $view_userdata['user_avatar']));
		}
		$avatar_sql = user_avatar_url($error, $error_msg, $user_avatar_remoteurl);
	}

	if ($error) message_die(GENERAL_ERROR, $error_msg);

	if ($avatar_sql != '')
	{
		$sql = "UPDATE " . USERS_TABLE . " SET $avatar_sql WHERE user_id=$view_user_id"; 
		if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not update user table', '', __LINE__, __FILE__, $sql);
	}

}

jeffreyt
Beiträge: 8
Registriert: Fr 13.Feb, 2004 19:40
Wohnort: Netherlands
Kontaktdaten:

Beitrag von jeffreyt »

Hey Oxpus,

Allready found some spare time for this?
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Not yet. I must done many requests before yours. Sorry...
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!
Benutzeravatar
AmigaLink
Beiträge: 5843
Registriert: Mi 03.Mär, 2004 09:05
Wohnort: NRW
Kontaktdaten:

Beitrag von AmigaLink »

I coincidentally something there found. Which does not please me personally however, that is not used the album Thumbnail, but a its own is provided.
http://smartor.is-root.com/viewtopic.php?p=49657#49657
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________

Kein Support per PM, ICQ oder eMail!!!
[/center]
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

So I cancel this for now from my todo list. The solution there might be 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!
Antworten