Moderator: Integra Moderator
and if I try to register, it tells me that the info I typed doesn't match my Control image, which is BS because it does match..
"cleo";p="18345" wrote:ok, maybe i missed some edits, but how do you get the trophy king/queen rank to show, and how do you activate the trophy king/queen block?
<?php /*************************************************************************** * def_userfuncs_std.php * --------------------- * begin : 04/10/2003 * copyright : Ptirhiik * email : Ptirhiik@rpgnet.clanmckeen.com * * version : 1.0.1 - 30/10/2003 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ***************************************************************************/ if ( !defined('IN_PHPBB') ){ die('Hacking attempt'); exit;} //-----------------------------------//// user_online output function////-----------------------------------function pcp_output_user_online($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { // offline $txt = $lang['Offline']; $img = '<img>'; if ( !empty($view_userdata[$field_name]) ) { // hidden $txt = $lang['Hidden']; $img = '<img>'; // not hidden set : online if ($view_userdata['user_allow_viewonline'] == YES) { $txt = $lang['Online']; $img = '<img>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_my_friend output function////-----------------------------------function pcp_output_my_friend($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_my_ignore $txt = ''; $img = ''; $res = ''; if ( ($userdata['user_id'] != $view_userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { $from = '&from=profil'; $maps = explode('.', $map_name); if ( empty($maps) ) { $from = '&from=profil'; } if ( in_array('viewprofile', $maps) ) { $from = '&from=profil'; } else if ( in_array('viewtopic', $maps) ) { $from = '&from=topic&' . POST_POST_URL . '=' . $view_userdata['post_id']; } else if ( in_array('privmsgs', $maps) ) { $from = '&from=privmsg&' . POST_POST_URL . '=' . $view_userdata['privmsgs_id']; } if ( $view_userdata['user_my_friend'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=remove" . $from); $title = $lang['Remove_from_friend_list']; $icon = $images['icon_friend_remove']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } else if ( !$view_userdata['user_my_ignore'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=add" . $from); $title = $lang['Add_to_friend_list']; $icon = $images['icon_friend_add']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_my_friend output function for buddy list////-----------------------------------function pcp_output_my_friend_buddy($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_my_visible $txt = ''; $img = ''; $res = ''; if ( ($userdata['user_id'] != $view_userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { if ( $view_userdata['user_my_friend'] ) { $temp_url = append_sid( "./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=" . ( $view_userdata['user_my_visible'] ? 'inv' : 'vis') ); $title = $view_userdata['user_my_visible'] ? $lang['Always_visible'] : $lang['Not_always_visible']; $icon = $view_userdata['user_my_visible'] ? $images['icon_visible'] : $images['icon_not_visible']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_my_ignore output function////-----------------------------------function pcp_output_my_ignore($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // uses user_my_friend $txt = ''; $img = ''; if ( ($view_userdata['user_id'] != $userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { $from = '&from=profil'; $maps = explode('.', $map_name); if ( empty($maps) ) { $from = '&from=profil'; } if ( in_array('viewprofile', $maps) ) { $from = '&from=profil'; } else if ( in_array('viewtopic', $maps) ) { $from = '&from=topic&' . POST_POST_URL . '=' . $view_userdata['post_id']; } else if ( in_array('privmsgs', $maps) ) { $from = '&from=privmsg&' . POST_POST_URL . '=' . $view_userdata['privmsgs_id']; } if ( $view_userdata['user_my_ignore'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=ignore&b=" . $view_userdata['user_id'] . "&set=remove" . $from); $title = $lang['Remove_from_ignore_list']; $icon = $images['icon_ignore_remove']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } else if (!is_admin($userdata) && !is_admin($view_userdata) && (get_user_level($userdata) != MOD) && (get_user_level($view_userdata) != MOD) && !$view_userdata['user_my_friend']) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=ignore&b=" . $view_userdata['user_id'] . "&set=add" . $from); $title = $lang['Add_to_ignore_list']; $icon = $images['icon_ignore_add']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// username output function////-----------------------------------function pcp_output_username($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; $poster = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); $usereffects = explode("ÃÅÂ ¸", $view_userdata['user_effects']); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercustitle = explode("ÃÅÂ ¸", $view_userdata['user_custitle']); $userbs = array(); $usercount = count($userprivs); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usercount = count($usereffects); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usercount = count($usercustitle); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); $shopstatarray = array(); for ($x = 0; $x </font>'.$poster.'</span>'; $poster = $nameeffects; } if ((($userbs[24] == on) && ($shopstatarray[24] == on)) || (($userbs[20] == on) && ($shopstatarray[22] == on)) || (($userbs[22] == on) && ($shopstataray[20] = on)) || (($userbs[18] == on) && ($shopstatarray[18] == on))) { $titleeffects = '</font>'.$poster_rank.'</span>'; $poster_rank = $titleeffects; } $username = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); // txt $txt = '<span>' . $poster . '</span>'; // img /* Hide Buttons :: Altered if ( $view_userdata['user_id'] != ANONYMOUS )*/ if($userdata['user_id'] != ANONYMOUS && $view_userdata['user_id'] != ANONYMOUS ) { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res;}//----------------------------------- // // username output function with link on txt // //----------------------------------- function pcp_output_username_linked($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $username = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); // txt /* Hide Buttons :: Altered if ( $view_userdata['user_id'] != ANONYMOUS ) { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $username . '</a>'; $img = '<a><img></a>'; } else { $txt = '<span>' . $username . '</span>'; }*/ if($userdata['user_id'] == ANONYMOUS || $view_userdata['user_id'] == ANONYMOUS ) { $txt = '<span>' . $username . '</span>'; } else { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $username . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res; } //-----------------------------------//// user_pm output function////-----------------------------------function pcp_output_user_pm($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) && ($userdata['user_id'] != ANONYMOUS)) { $temp_url = append_sid("./privmsg.$phpEx?mode=post&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $lang['Send_private_message'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_email output function////-----------------------------------function pcp_output_user_email($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // add text for admin view in buddy/memberlist if ( in_array($map_name, array('PCP.buddy')) && is_admin($userdata)) { $user_maps[$map_name]['fields'][$field_name]['txt'] = true; $user_maps[$map_name]['fields'][$field_name]['crlf'] = true; } $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = ( $board_config['board_email_form'] ) ? append_sid("./profile.$phpEx?mode=email&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : 'mailto:' . $view_userdata[$field_name]; $txt_title = ( is_admin($userdata) || $user_maps[$map_name]['fields'][$field_name]['img'] || $board_config['board_email_form'] ) ? $lang['Send_email'] : $view_userdata[$field_name]; $txt_link = ( is_admin($userdata) || ($user_maps[$map_name]['fields'][$field_name]['img'] && !$board_config['board_email_form'] ))? $view_userdata[$field_name] : $lang['Send_email']; $txt = '<a>' . $txt_link . '</a>'; $txt_title = (is_admin($userdata) || !$board_config['board_email_form']) ? $view_userdata[$field_name] : $lang['Send_email']; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_icq output function////-----------------------------------function pcp_output_icq($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'http://wwp.icq.com/' . $view_userdata[$field_name] . '#pager'; $img = '<a><img></a>'; $txt = '<a>' . $lang['ICQ'] . '</a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;}//-----------------------------------//// user_aim output function////-----------------------------------function pcp_output_aim($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'aim:goim?screenname=' . $view_userdata[$field_name] . '&message=Hello+Are+you+there?'; $txt = '<a>' . $lang['AIM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_yim output function////-----------------------------------function pcp_output_yim($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'http://edit.yahoo.com/config/send_webmesg?.target=' . $view_userdata[$field_name] . '&.src=pg'; $txt = '<a>' . $lang['YIM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_msnm output function////-----------------------------------function pcp_output_msnm($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = (substr($map_name, 0, 6) == 'PHPBB.') ? append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : 'mailto:' . $view_userdata[$field_name]; $txt = '<a>' . $lang['MSNM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_timezone output function////-----------------------------------function pcp_output_timezone($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { @reset($lang['tz']); while ( list($offset, $value) = @each($lang['tz']) ) { if ( $view_userdata[$field_name] == $offset ) { $txt = $value . ' (' . create_date($userdata['user_dateformat'], time(), $view_userdata['user_timezone']) . ')'; $img = '<img>'; break; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_website output function////-----------------------------------function pcp_output_website($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { if (strtolower(substr($view_userdata[$field_name],0,7)) != 'http://'){ $view_userdata[$field_name] = 'http://'.$view_userdata[$field_name]; } if ( substr($map_name, 0, 4) == 'PCP.' ) { $link = $view_userdata[$field_name]; $title = $lang['Visit_website']; } else { $link = $lang['Visit_website']; $title = $view_userdata[$field_name]; } $txt = '<a>' . $link . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_gender output function////-----------------------------------function pcp_output_gender($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { switch ($view_userdata[$field_name]) { case 0: $txt = $lang['No_gender_specify']; $img = '<img>'; break; case 1: $txt = $lang['Male']; $img = '<img>'; break; case 2: $txt = $lang['Female']; $img = '<img>'; break; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_age output function////-----------------------------------function pcp_output_age($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_birthday $pm_display = pcp_get_class_check('pm', $view_userdata); $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata['user_birthday']) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = $pm_display ? append_sid("./privmsg.$phpEx?mode=post&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : ''; $img = ( intval(substr($view_userdata['user_birthday'], 4, 4)) == date('md', cal_date(time(),$board_config['board_timezone'])) ) ? ( $pm_display ? '<a><img></a>' : '<img>') : ''; $txt = date('Y', cal_date(time(),$board_config['board_timezone'])) - intval(substr($view_userdata['user_birthday'], 0, 4)); if ( intval(substr($view_userdata['user_birthday'], 4, 4)) > date('md', cal_date(time(),$board_config['board_timezone'])) ) { $txt--; } if ($txt < 0) { $txt = ''; $img = ''; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_rank_title output function////-----------------------------------function pcp_output_rank_title($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields, $shopstatarray; if ( $view_userdata['user_id'] != ANONYMOUS ) { $rank = get_user_rank($view_userdata); $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); for ($x = 0; $x < $shoparraycount; $x++) { $temparray = explode("ÃÅÂ ¾", $shoparray[$x]); $shopstatarray[] = $temparray[0]; $shopstatarray[] = $temparray[1]; } $userprivs = array(); $usereffects = array(); $usercustitle = array(); $userbs = array(); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercount = count($userprivs); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usereffects = explode("ÃÅÂ ¸", $view_userdata['user_effects']); $usercount = count($usereffects); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usercustitle = explode("ÃÅÂ ¸", $view_userdata['user_custitle']); $usercount = count($usercustitle); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } if ((($userbs[24] == on) && ($shopstatarray[24] == on)) || (($userbs[20] == on) && ($shopstatarray[22] == on)) || (($userbs[22] == on) && ($shopstatarray[20] = on)) || (($userbs[18] == on) && ($shopstatarray[18] == on))) { $titleeffects = '</font>'.$rank['rank_title'].'</span>'; $rank['rank_title'] = $titleeffects; } if (($shopstatarray[10] == on) && ($userbs[6] != on) && ($rank['rank_title'] != "Site Admin")) { $rank['rank_title'] = "None"; $rank['rank_image'] = ""; } $txt = $rank['rank_title']; $img = $rank['rank_image']; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //-----------------------------------//// user_avatar output function////-----------------------------------function pcp_output_avatar($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && $userdata['user_viewavatar'] && $view_userdata['user_allowavatar'] && ($view_userdata['user_id'] != ANONYMOUS) ) { switch ($view_userdata[$field_name . '_type'] ) { case USER_AVATAR_UPLOAD: $img = ( $board_config['allow_avatar_upload'] ) ? '<img>' : ''; break; case USER_AVATAR_REMOTE: $img = ( $board_config['allow_avatar_remote'] ) ? '<img>' : ''; break; case USER_AVATAR_GALLERY: $img = ( $board_config['allow_avatar_local'] ) ? '<img>' : ''; break; } if ( ($img) && ($map_name == 'PHPBB.viewtopic.left') ) { $tmp = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $view_userdata['user_id']); $img = '<a>'. $img .'</a>'; } $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); for ($x = 0; $x < $shoparraycount; $x++) { $temparray = explode("ÃÅÂ ¾", $shoparray[$x]); $shopstatarray[] = $temparray[0]; $shopstatarray[] = $temparray[1]; } $userprivs = array(); $usereffects = array(); $usercustitle = array(); $userbs = array(); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercount = count($userprivs); for ($x = 0; $x </is> 0) { $user_sig = str_replace('"', '"', substr(preg_replace('#(>(((?>([^><R>' . $user_sig . '<'), 1, -1)); } $txt = str_replace("n", "n<br>n", $user_sig); $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); for ($x = 0; $x < $shoparraycount; $x++) { $temparray = explode("ÃÅÂ ¾", $shoparray[$x]); $shopstatarray[] = $temparray[0]; $shopstatarray[] = $temparray[1]; } $userprivs = array(); $usereffects = array(); $usercustitle = array(); $userbs = array(); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercount = count($userprivs); for ($x = 0; $x </a>sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get most active topic informations', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { // Define censored word matches $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); // get the info $most_active_topic_id = $row['topic_id']; $most_active_topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $row['topic_title']) : $row['topic_title']; $most_active_topic_posts = $row['posts_count']; $most_active_topic_posts_total = $row['topic_posts']; $most_active_topic_posts_total_forum = $row['forum_posts']; } // display if ( $most_active_topic_id > -1 ) { // topic $temp_url = append_sid("./viewtopic.$phpEx?" . POST_TOPIC_URL . "=$most_active_topic_id"); $txt = '<a>' . $most_active_topic_title . '</a>'; $txt .= '<br><span>' . sprintf( '[' . $lang['Most_active_topic_stat'] . ']', $most_active_topic_posts, ( ($most_active_topic_posts*100) / $most_active_topic_posts_total ), ( ($most_active_topic_posts*100) / $most_active_topic_posts_total_forum ) ) . '</span>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_forums_stat output function////-----------------------------------function pcp_output_forums_stat($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; global $db; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata['user_posts']) && ($view_userdata['user_id'] != ANONYMOUS) ) { $most_active_forum_id = -1; $most_active_forum_name = ''; $most_active_forum_posts = 0; $most_active_forum_posts_total = 0; $total_posts = get_db_stat('postcount'); $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); $forum_ids = array(); while (list($forum_id, $auth) = @each($is_auth) ) { if ($auth['auth_view']) $forum_ids[] = $forum_id; } if ( !empty($forum_ids) ) { $s_forum_ids = implode(', ', $forum_ids); // most active forum $sql = "SELECT t.forum_id, f.forum_name, f.forum_posts, count(p.post_id) AS posts_count FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f WHERE p.poster_id = " . $view_userdata['user_id'] . " AND t.topic_id = p.topic_id AND t.forum_id IN ($s_forum_ids) AND f.forum_id = t.forum_id GROUP BY t.forum_id ORDER BY posts_count DESC LIMIT 0, 1"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get most active forum informations', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { $most_active_forum_id = $row['forum_id']; $most_active_forum_name = isset($lang[ $row['forum_name'] ]) ? $lang[ $row['forum_name'] ] : $row['forum_name']; $most_active_forum_posts = $row['posts_count']; $most_active_forum_posts_total = $row['forum_posts']; } // display if ( $most_active_forum_id > -1 ) { // forum $temp_url = append_sid("./viewforum.$phpEx?" . POST_FORUM_URL . "=$most_active_forum_id"); $txt = '<a>' . $most_active_forum_name . '</a>'; $txt .= '<br><span>' . sprintf( '[' . $lang['Most_active_forum_stat'] . ']', $most_active_forum_posts, ( ($most_active_forum_posts*100) / $most_active_forum_posts_total ), ( ($most_active_forum_posts*100) / $total_posts ) ) . '</span>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-----------------------------------//// user_groups output function////-----------------------------------function pcp_output_usergroups($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; global $db, $template; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { // save template state $sav_tpl = $template->_tpldata; // template file $template->set_filenames(array( '_box_groups' => 'profilcp/public_groups_body.tpl') ); $template->assign_block_vars('tiny_panel', array()); // groupes $sql = "SELECT g.group_id, g.group_name, g.group_description, g.group_type FROM " . USER_GROUP_TABLE . " l, " . GROUPS_TABLE . " g WHERE l.user_pending = 0 AND g.group_single_user = 0 AND l.user_id = " . $view_userdata['user_id'] . " AND g.group_id = l.group_id ORDER BY g.group_name, g.group_id"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not read groups', '', __LINE__, __FILE__, $sql); } $groups = array(); while ($row = $db->sql_fetchrow($result)) { $groups[] = $row; } $template->assign_vars(array( 'L_USERGROUPS' => $lang['Usergroups'], 'L_NO_GROUPS' => $lang['None'], 'TXTCLASS' => 'gensmall', ) ); $nb = 0; if (count($groups) > 0) { $class = false; for ($i=0; $i <count>sql_query($sql) ) { message_die(GENERAL_ERROR, 'Couldn't obtain viewer group list', '', __LINE__, __FILE__, $sql); } $is_ok = ( $row = $db->sql_fetchrow($result) ); } // group allowed : display if ($is_ok) { $nb++; $class = !$class; $u_group_name = append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . '=' . $groups[$i]['group_id']); $l_group_name = $groups[$i]['group_name']; $l_group_desc = $groups[$i]['group_description']; $template->assign_block_vars('groups',array( 'CLASS' => ($class) ? "row1" : "row2", 'U_GROUP_NAME' => $u_group_name, 'L_GROUP_NAME' => $l_group_name, 'L_GROUP_DESC' => $l_group_desc, ) ); } // end if ($is_ok) } // end for ($i=0; $i <count> 0) if ($nb == 0) { $template->assign_block_vars('no_groups', array('SPAN' => 1)); } // transfert to a var $template->assign_var_from_handle('_box', '_box_groups'); $txt = $template->_tpldata['.'][0]['_box']; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;} //-- mod : add-on country flags for pcp ------------------------------------------------------------//-- add//-----------------------------------//// user_flag output function////-----------------------------------function pcp_output_flag($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { if (!empty($view_userdata['user_flag'])) { $img = '<img>'; } else { $img = ''; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;}//-- fin mod : add-on country flags for pcp -------------------------------------------------------- //-- mod : add-on holidays for pcp -----------------------------------------------------------------//-- add//-----------------------------------//// user_holidays output function////-----------------------------------function pcp_output_holidays($field_name, $view_userdata, $map_name=''){ global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { switch ($view_userdata[$field_name]) { case 1: $txt = $lang['On_Holidays']; $img = '<img>'; break; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res;}//-- fin mod : add-on holidays for pcp ------------------------------------------------------------- ?>
"cleo";p="18383" wrote:edit: and i know this is off topic for this thread, but every time i have posted something to this thread, i get this
General Error
Failed sending email :: PHP ::
what is causing that?
<?php /*************************************************************************** * def_userfuncs_std.php * --------------------- * begin : 04/10/2003 * copyright : Ptirhiik * email : Ptirhiik@rpgnet.clanmckeen.com * * version : 1.0.1 - 30/10/2003 * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ***************************************************************************/ if ( !defined('IN_PHPBB') ) { die('Hacking attempt'); exit; } //----------------------------------- // // user_online output function // //----------------------------------- function pcp_output_user_online($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { // offline $txt = $lang['Offline']; $img = '<img>'; if ( !empty($view_userdata[$field_name]) ) { // hidden $txt = $lang['Hidden']; $img = '<img>'; // not hidden set : online if ($view_userdata['user_allow_viewonline'] == YES) { $txt = $lang['Online']; $img = '<img>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_my_friend output function // //----------------------------------- function pcp_output_my_friend($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_my_ignore $txt = ''; $img = ''; $res = ''; if ( ($userdata['user_id'] != $view_userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { $from = '&from=profil'; $maps = explode('.', $map_name); if ( empty($maps) ) { $from = '&from=profil'; } if ( in_array('viewprofile', $maps) ) { $from = '&from=profil'; } else if ( in_array('viewtopic', $maps) ) { $from = '&from=topic&' . POST_POST_URL . '=' . $view_userdata['post_id']; } else if ( in_array('privmsgs', $maps) ) { $from = '&from=privmsg&' . POST_POST_URL . '=' . $view_userdata['privmsgs_id']; } if ( $view_userdata['user_my_friend'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=remove" . $from); $title = $lang['Remove_from_friend_list']; $icon = $images['icon_friend_remove']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } else if ( !$view_userdata['user_my_ignore'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=add" . $from); $title = $lang['Add_to_friend_list']; $icon = $images['icon_friend_add']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_my_friend output function for buddy list // //----------------------------------- function pcp_output_my_friend_buddy($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_my_visible $txt = ''; $img = ''; $res = ''; if ( ($userdata['user_id'] != $view_userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { if ( $view_userdata['user_my_friend'] ) { $temp_url = append_sid( "./profile.$phpEx?mode=buddy&sub=friend&b=" . $view_userdata['user_id'] . "&set=" . ( $view_userdata['user_my_visible'] ? 'inv' : 'vis') ); $title = $view_userdata['user_my_visible'] ? $lang['Always_visible'] : $lang['Not_always_visible']; $icon = $view_userdata['user_my_visible'] ? $images['icon_visible'] : $images['icon_not_visible']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_my_ignore output function // //----------------------------------- function pcp_output_my_ignore($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // uses user_my_friend $txt = ''; $img = ''; if ( ($view_userdata['user_id'] != $userdata['user_id']) && ($view_userdata['user_id'] != ANONYMOUS) && $userdata['session_logged_in'] && ($userdata['user_id'] != ANONYMOUS) ) { $from = '&from=profil'; $maps = explode('.', $map_name); if ( empty($maps) ) { $from = '&from=profil'; } if ( in_array('viewprofile', $maps) ) { $from = '&from=profil'; } else if ( in_array('viewtopic', $maps) ) { $from = '&from=topic&' . POST_POST_URL . '=' . $view_userdata['post_id']; } else if ( in_array('privmsgs', $maps) ) { $from = '&from=privmsg&' . POST_POST_URL . '=' . $view_userdata['privmsgs_id']; } if ( $view_userdata['user_my_ignore'] ) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=ignore&b=" . $view_userdata['user_id'] . "&set=remove" . $from); $title = $lang['Remove_from_ignore_list']; $icon = $images['icon_ignore_remove']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } else if (!is_admin($userdata) && !is_admin($view_userdata) && (get_user_level($userdata) != MOD) && (get_user_level($view_userdata) != MOD) && !$view_userdata['user_my_friend']) { $temp_url = append_sid("./profile.$phpEx?mode=buddy&sub=ignore&b=" . $view_userdata['user_id'] . "&set=add" . $from); $title = $lang['Add_to_ignore_list']; $icon = $images['icon_ignore_add']; $txt = '<a>' . $title . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // username output function // //----------------------------------- function pcp_output_username($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; $poster = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); $usereffects = explode("ÃÅÂ ¸", $view_userdata['user_effects']); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercustitle = explode("ÃÅÂ ¸", $view_userdata['user_custitle']); $userbs = array(); $usercount = count($userprivs); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usercount = count($usereffects); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $usercount = count($usercustitle); for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("ÃÅÂ ¾", $usercustitle[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; } $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); $shopstatarray = array(); for ($x = 0; $x </font>'.$poster.'</span>'; $poster = $nameeffects; } if ((($userbs[24] == on) && ($shopstatarray[24] == on)) || (($userbs[20] == on) && ($shopstatarray[22] == on)) || (($userbs[22] == on) && ($shopstataray[20] = on)) || (($userbs[18] == on) && ($shopstatarray[18] == on))) { $titleeffects = '</font>'.$poster_rank.'</span>'; $poster_rank = $titleeffects; } $username = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); // txt $txt = '<span>' . $poster . '</span>'; // img /* Hide Buttons :: Altered if ( $view_userdata['user_id'] != ANONYMOUS )*/ if($userdata['user_id'] != ANONYMOUS && $view_userdata['user_id'] != ANONYMOUS ) { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res; } //----------------------------------- // // username output function with link on txt // //----------------------------------- function pcp_output_username_linked($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $username = ($view_userdata['user_id'] != ANONYMOUS) ? $view_userdata[$field_name] : ( (isset($view_userdata['post_username']) && ($view_userdata['post_username'] !='') ) ? $view_userdata['post_username'] : $lang['Guest'] ); // txt /* Hide Buttons :: Altered if ( $view_userdata['user_id'] != ANONYMOUS ) { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $username . '</a>'; $img = '<a><img></a>'; } else { $txt = '<span>' . $username . '</span>'; }*/ if($userdata['user_id'] == ANONYMOUS || $view_userdata['user_id'] == ANONYMOUS ) { $txt = '<span>' . $username . '</span>'; } else { $temp_url = append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $username . '</a>'; $img = '<a><img></a>'; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res; } //----------------------------------- // // user_pm output function // //----------------------------------- function pcp_output_user_pm($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) && ($userdata['user_id'] != ANONYMOUS)) { $temp_url = append_sid("./privmsg.$phpEx?mode=post&" . POST_USERS_URL . '=' . $view_userdata['user_id']); $txt = '<a>' . $lang['Send_private_message'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_email output function // //----------------------------------- function pcp_output_user_email($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // add text for admin view in buddy/memberlist if ( in_array($map_name, array('PCP.buddy')) && is_admin($userdata)) { $user_maps[$map_name]['fields'][$field_name]['txt'] = true; $user_maps[$map_name]['fields'][$field_name]['crlf'] = true; } $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = ( $board_config['board_email_form'] ) ? append_sid("./profile.$phpEx?mode=email&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : 'mailto:' . $view_userdata[$field_name]; $txt_title = ( is_admin($userdata) || $user_maps[$map_name]['fields'][$field_name]['img'] || $board_config['board_email_form'] ) ? $lang['Send_email'] : $view_userdata[$field_name]; $txt_link = ( is_admin($userdata) || ($user_maps[$map_name]['fields'][$field_name]['img'] && !$board_config['board_email_form'] ))? $view_userdata[$field_name] : $lang['Send_email']; $txt = '<a>' . $txt_link . '</a>'; $txt_title = (is_admin($userdata) || !$board_config['board_email_form']) ? $view_userdata[$field_name] : $lang['Send_email']; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_icq output function // //----------------------------------- function pcp_output_icq($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'http://wwp.icq.com/' . $view_userdata[$field_name] . '#pager'; $img = '<a><img></a>'; $txt = '<a>' . $lang['ICQ'] . '</a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_aim output function // //----------------------------------- function pcp_output_aim($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'aim:goim?screenname=' . $view_userdata[$field_name] . '&message=Hello+Are+you+there?'; $txt = '<a>' . $lang['AIM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_yim output function // //----------------------------------- function pcp_output_yim($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = 'http://edit.yahoo.com/config/send_webmesg?.target=' . $view_userdata[$field_name] . '&.src=pg'; $txt = '<a>' . $lang['YIM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_msnm output function // //----------------------------------- function pcp_output_msnm($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = (substr($map_name, 0, 6) == 'PHPBB.') ? append_sid("./profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : 'mailto:' . $view_userdata[$field_name]; $txt = '<a>' . $lang['MSNM'] . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_timezone output function // //----------------------------------- function pcp_output_timezone($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { @reset($lang['tz']); while ( list($offset, $value) = @each($lang['tz']) ) { if ( $view_userdata[$field_name] == $offset ) { $txt = $value . ' (' . create_date($userdata['user_dateformat'], time(), $view_userdata['user_timezone']) . ')'; $img = '<img>'; break; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_website output function // //----------------------------------- function pcp_output_website($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && ($view_userdata['user_id'] != ANONYMOUS) ) { if (strtolower(substr($view_userdata[$field_name],0,7)) != 'http://'){ $view_userdata[$field_name] = 'http://'.$view_userdata[$field_name]; } if ( substr($map_name, 0, 4) == 'PCP.' ) { $link = $view_userdata[$field_name]; $title = $lang['Visit_website']; } else { $link = $lang['Visit_website']; $title = $view_userdata[$field_name]; } $txt = '<a>' . $link . '</a>'; $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_gender output function // //----------------------------------- function pcp_output_gender($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { switch ($view_userdata[$field_name]) { case 0: $txt = $lang['No_gender_specify']; $img = '<img>'; break; case 1: $txt = $lang['Male']; $img = '<img>'; break; case 2: $txt = $lang['Female']; $img = '<img>'; break; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_age output function // //----------------------------------- function pcp_output_age($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; // use user_birthday $pm_display = pcp_get_class_check('pm', $view_userdata); $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata['user_birthday']) && ($view_userdata['user_id'] != ANONYMOUS) ) { $temp_url = $pm_display ? append_sid("./privmsg.$phpEx?mode=post&" . POST_USERS_URL . '=' . $view_userdata['user_id']) : ''; $img = ( intval(substr($view_userdata['user_birthday'], 4, 4)) == date('md', cal_date(time(),$board_config['board_timezone'])) ) ? ( $pm_display ? '<a><img></a>' : '<img>') : ''; $txt = date('Y', cal_date(time(),$board_config['board_timezone'])) - intval(substr($view_userdata['user_birthday'], 0, 4)); if ( intval(substr($view_userdata['user_birthday'], 4, 4)) > date('md', cal_date(time(),$board_config['board_timezone'])) ) { $txt--; } if ($txt < 0) { $txt = ''; $img = ''; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_rank_title output function // //----------------------------------- function pcp_output_rank_title($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; if ( $view_userdata['user_id'] != ANONYMOUS ) { $rank = get_user_rank($view_userdata); if ($board_config['ina_use_trophy']) { switch ($view_userdata['user_gender']) { case 0: $trophy_leader = $lang['Trophy_Unknown']; break; case 1: $trophy_leader = $lang['Trophy_King']; break; case 2: $trophy_leader = $lang['Trophy_Queen']; break; } include_once($phpbb_root_path .'language/lang_'. $board_config['default_lang'] .'/lang_activity.'. $phpEx); $trophy_image = '<img>'; } if ($view_userdata['user_id'] == $board_config['ina_trophy_king']) { $rank['rank_image'] = $trophy_image; $rank['rank_title'] = $trophy_leader; $txt = $rank['rank_title']; $img = $rank['rank_image']; } $txt = $rank['rank_title']; $img = $rank['rank_image']; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_avatar output function // //----------------------------------- function pcp_output_avatar($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata[$field_name]) && $userdata['user_viewavatar'] && $view_userdata['user_allowavatar'] && ($view_userdata['user_id'] != ANONYMOUS) ) { switch ($view_userdata[$field_name . '_type'] ) { case USER_AVATAR_UPLOAD: $img = ( $board_config['allow_avatar_upload'] ) ? '<img>' : ''; break; case USER_AVATAR_REMOTE: $img = ( $board_config['allow_avatar_remote'] ) ? '<img>' : ''; break; case USER_AVATAR_GALLERY: $img = ( $board_config['allow_avatar_local'] ) ? '<img>' : ''; break; } if ( ($img) && ($map_name == 'PHPBB.viewtopic.left') ) { $tmp = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $view_userdata['user_id']); $img = '<a>'. $img .'</a>'; } $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); for ($x = 0; $x < $shoparraycount; $x++) { $temparray = explode("ÃÅÂ ¾", $shoparray[$x]); $shopstatarray[] = $temparray[0]; $shopstatarray[] = $temparray[1]; } $userprivs = array(); $usereffects = array(); $usercustitle = array(); $userbs = array(); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercount = count($userprivs); for ($x = 0; $x </is> 0) { $user_sig = str_replace('"', '"', substr(preg_replace('#(>(((?>([^><R>' . $user_sig . '<'), 1, -1)); } $txt = str_replace("n", "n<br>n", $user_sig); $shoparray = explode("ÃÅÂ ¸", $board_config['specialshop']); $shoparraycount = count ($shoparray); for ($x = 0; $x < $shoparraycount; $x++) { $temparray = explode("ÃÅÂ ¾", $shoparray[$x]); $shopstatarray[] = $temparray[0]; $shopstatarray[] = $temparray[1]; } $userprivs = array(); $usereffects = array(); $usercustitle = array(); $userbs = array(); $userprivs = explode("ÃÅÂ ¸", $view_userdata['user_privs']); $usercount = count($userprivs); for ($x = 0; $x </a>sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get most active topic informations', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { // Define censored word matches $orig_word = array(); $replacement_word = array(); obtain_word_list($orig_word, $replacement_word); // get the info $most_active_topic_id = $row['topic_id']; $most_active_topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $row['topic_title']) : $row['topic_title']; $most_active_topic_posts = $row['posts_count']; $most_active_topic_posts_total = $row['topic_posts']; $most_active_topic_posts_total_forum = $row['forum_posts']; } // display if ( $most_active_topic_id > -1 ) { // topic $temp_url = append_sid("./viewtopic.$phpEx?" . POST_TOPIC_URL . "=$most_active_topic_id"); $txt = '<a>' . $most_active_topic_title . '</a>'; $txt .= '<br><span>' . sprintf( '[' . $lang['Most_active_topic_stat'] . ']', $most_active_topic_posts, ( ($most_active_topic_posts*100) / $most_active_topic_posts_total ), ( ($most_active_topic_posts*100) / $most_active_topic_posts_total_forum ) ) . '</span>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_forums_stat output function // //----------------------------------- function pcp_output_forums_stat($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; global $db; $txt = ''; $img = ''; $res = ''; if ( !empty($view_userdata['user_posts']) && ($view_userdata['user_id'] != ANONYMOUS) ) { $most_active_forum_id = -1; $most_active_forum_name = ''; $most_active_forum_posts = 0; $most_active_forum_posts_total = 0; $total_posts = get_db_stat('postcount'); $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); $forum_ids = array(); while (list($forum_id, $auth) = @each($is_auth) ) { if ($auth['auth_view']) $forum_ids[] = $forum_id; } if ( !empty($forum_ids) ) { $s_forum_ids = implode(', ', $forum_ids); // most active forum $sql = "SELECT t.forum_id, f.forum_name, f.forum_posts, count(p.post_id) AS posts_count FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f WHERE p.poster_id = " . $view_userdata['user_id'] . " AND t.topic_id = p.topic_id AND t.forum_id IN ($s_forum_ids) AND f.forum_id = t.forum_id GROUP BY t.forum_id ORDER BY posts_count DESC LIMIT 0, 1"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get most active forum informations', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { $most_active_forum_id = $row['forum_id']; $most_active_forum_name = isset($lang[ $row['forum_name'] ]) ? $lang[ $row['forum_name'] ] : $row['forum_name']; $most_active_forum_posts = $row['posts_count']; $most_active_forum_posts_total = $row['forum_posts']; } // display if ( $most_active_forum_id > -1 ) { // forum $temp_url = append_sid("./viewforum.$phpEx?" . POST_FORUM_URL . "=$most_active_forum_id"); $txt = '<a>' . $most_active_forum_name . '</a>'; $txt .= '<br><span>' . sprintf( '[' . $lang['Most_active_forum_stat'] . ']', $most_active_forum_posts, ( ($most_active_forum_posts*100) / $most_active_forum_posts_total ), ( ($most_active_forum_posts*100) / $total_posts ) ) . '</span>'; } } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //----------------------------------- // // user_groups output function // //----------------------------------- function pcp_output_usergroups($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; global $db, $template; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { // save template state $sav_tpl = $template->_tpldata; // template file $template->set_filenames(array( '_box_groups' => 'profilcp/public_groups_body.tpl') ); $template->assign_block_vars('tiny_panel', array()); // groupes $sql = "SELECT g.group_id, g.group_name, g.group_description, g.group_type FROM " . USER_GROUP_TABLE . " l, " . GROUPS_TABLE . " g WHERE l.user_pending = 0 AND g.group_single_user = 0 AND l.user_id = " . $view_userdata['user_id'] . " AND g.group_id = l.group_id ORDER BY g.group_name, g.group_id"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not read groups', '', __LINE__, __FILE__, $sql); } $groups = array(); while ($row = $db->sql_fetchrow($result)) { $groups[] = $row; } $template->assign_vars(array( 'L_USERGROUPS' => $lang['Usergroups'], 'L_NO_GROUPS' => $lang['None'], 'TXTCLASS' => 'gensmall', ) ); $nb = 0; if (count($groups) > 0) { $class = false; for ($i=0; $i <count>sql_query($sql) ) { message_die(GENERAL_ERROR, 'Couldn't obtain viewer group list', '', __LINE__, __FILE__, $sql); } $is_ok = ( $row = $db->sql_fetchrow($result) ); } // group allowed : display if ($is_ok) { $nb++; $class = !$class; $u_group_name = append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . '=' . $groups[$i]['group_id']); $l_group_name = $groups[$i]['group_name']; $l_group_desc = $groups[$i]['group_description']; $template->assign_block_vars('groups',array( 'CLASS' => ($class) ? "row1" : "row2", 'U_GROUP_NAME' => $u_group_name, 'L_GROUP_NAME' => $l_group_name, 'L_GROUP_DESC' => $l_group_desc, ) ); } // end if ($is_ok) } // end for ($i=0; $i <count> 0) if ($nb == 0) { $template->assign_block_vars('no_groups', array('SPAN' => 1)); } // transfert to a var $template->assign_var_from_handle('_box', '_box_groups'); $txt = $template->_tpldata['.'][0]['_box']; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //-- mod : add-on country flags for pcp ------------------------------------------------------------ //-- add //----------------------------------- // // user_flag output function // //----------------------------------- function pcp_output_flag($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { if (!empty($view_userdata['user_flag'])) { $img = '<img>'; } else { $img = ''; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //-- fin mod : add-on country flags for pcp -------------------------------------------------------- //-- mod : add-on holidays for pcp ----------------------------------------------------------------- //-- add //----------------------------------- // // user_holidays output function // //----------------------------------- function pcp_output_holidays($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; $txt = ''; $img = ''; $res = ''; if ( $view_userdata['user_id'] != ANONYMOUS ) { switch ($view_userdata[$field_name]) { case 1: $txt = $lang['On_Holidays']; $img = '<img>'; break; } // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } //-- fin mod : add-on holidays for pcp ------------------------------------------------------------- ?>
<table> <tr> <td> <span> <img><br><br> <BEGIN> {trophyking.BEST} <END> </span> </td> </tr> </table>
<php> * Description : Display current Trophy King * version : 1.0.0 (Oct 24, 2005) * ************************************************************/ /************************************************************ * For Security Purposes, Please Check: * [url=http://IntegraMOD-tw.net]http://IntegraMOD-tw.net[/url] or [url=http://IntegraMOD.com]http://IntegraMOD.com[/url] * for the latest version of this MOD. * Downloading this MOD from other sites could cause malicious * code to enter into your phpBB Forum. * ************************************************************/ /*********************************************************** * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; * either version 2 of the License, or (at your option) * any later version. * ************************************************************/ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } if(!function_exists(imp_trophyking_block_func)) { function imp_trophyking_block_func() { global $template, $db, $theme, $phpEx, $userdata; $q = "SELECT * FROM ". USERS_TABLE ." ORDER BY user_trophies DESC"; $best = $db -> sql_query($q); $trophyking = $db -> sql_fetchrow($best); $username = $trophyking['username']; $user_id = $trophyking['user_id']; $trophies = $trophyking['user_trophies']; $link = ($trophyking['user_id'] == ANONYMOUS) ? ". ". $trophyking['username'] : "<b><a>". $username ."</a></b>"; $template -> assign_block_vars('trophyking', array( 'BEST' => $link . "<br><b>". number_format($trophies) . "</b> Trophies" ) ); } } imp_trophyking_block_func(); ?>
"shedt_v";p="18580" wrote:I would love these blocks, would they work with arcade mod?
Could you post how you made them?
Registered users: App360MonitorBot, Bing [Bot], Google [Bot]