Problem with output function

Support for IntegraMOD 141

Moderator: Integra Moderator

Problem with output function

PostAuthor: TheJT » Wed May 30, 2007 8:20 am

i was trying to create a new output function. it's based on a post by Teelk.
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;  }  
Last edited by TheJT on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.

TheJT
Members
Members
 
Posts: 55
Likes: 0 post
Liked in: 0 post
Joined: Sat May 06, 2006 2:12 am
Cash on hand: 0.00

Return to IntegraMOD 141

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]