i'm getting no error message, but it doesn't work.I can select the output function in pcp wizard but i am getting no output.
what's wrong in this code?
i have added the code to def_userfuncs_custom.php
- Code: Select all
//----------------------------------- // // skill output function // //----------------------------------- function pcp_output_skill($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata, $view_userdata; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields, $db; $txt = ''; $img = ''; $uid = 'user_id'; $sql = 'SELECT user_skill FROM phpbb_users WHERE user_id = $view_userdata[$uid]'; if ( !$result = $db->sql_query($sql) ) $wow_row = $db->sql_fetchrow($result); // txt - this is the text that's displayed $txt = '<span>' . $wow_row['user_skill'] . '</span>'; $temp_url = append_sid("./wow_char.$phpEx?mode=viewchar&" . POST_USERS_URL . '=' . $view_userdata['user_id']); // If you want to add a URL to an image or to the text above... I just made this up... // img - you can also have an image if you like, but you'll need to add it to the usermaps field as 'img' => true, to get it to display. $img = '<a><img></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); return $res; }