Changeset 579 for trunk/picture.php
- Timestamp:
- Oct 23, 2004, 7:56:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/picture.php
r576 r579 182 182 } 183 183 184 if (isset($row['tn_ext']) and $row['tn_ext'] != '') 185 { 186 $picture[$i]['thumbnail'] = $cat_directory.'thumbnail/'; 187 $picture[$i]['thumbnail'].= $conf['prefix_thumbnail'].$file_wo_ext; 188 $picture[$i]['thumbnail'].= '.'.$row['tn_ext']; 189 } 190 else 191 { 192 $picture[$i]['thumbnail'] = $icon; 193 } 184 $picture[$i]['thumbnail'] = get_thumbnail_src($row['file'], 185 $row['storage_category_id'], 186 @$row['tn_ext']); 194 187 195 188 if ( !empty( $row['name'] ) ) … … 962 955 while ( $row = mysql_fetch_array( $result ) ) 963 956 { 964 $content = nl2br( $row['content'] ); 965 966 // replace _word_ by an underlined word 967 $pattern = '/_([^\s]*)_/'; 968 $replacement = '<span style="text-decoration:underline;">\1</span>'; 969 $content = preg_replace( $pattern, $replacement, $content ); 970 971 // replace *word* by a bolded word 972 $pattern = '/\*([^\s]*)\*/'; 973 $replacement = '<span style="font-weight:bold;">\1</span>'; 974 $content = preg_replace( $pattern, $replacement, $content ); 975 976 // replace /word/ by an italic word 977 $pattern = '/\/([^\s]*)\//'; 978 $replacement = '<span style="font-style:italic;">\1</span>'; 979 $content = preg_replace( $pattern, $replacement, $content ); 980 981 $template->assign_block_vars('comments.comment', array( 982 'COMMENT_AUTHOR'=>empty($row['author'])?$lang['guest']:$row['author'], 983 'COMMENT_DATE'=>format_date( $row['date'], 'mysql_datetime', true ), 984 'COMMENT'=>$content 957 $template->assign_block_vars( 958 'comments.comment', 959 array( 960 'COMMENT_AUTHOR'=>empty($row['author'])?$lang['guest']:$row['author'], 961 'COMMENT_DATE'=>format_date($row['date'], 'mysql_datetime', true), 962 'COMMENT'=>parse_comment_content($row['content']) 985 963 )); 986 964 987 965 if ( $user['status'] == 'admin' ) 988 966 { 989 $template->assign_block_vars('comments.comment.delete', array('U_COMMENT_DELETE'=>add_session_id( $url.'&del='.$row['id'] ))); 990 } 991 } 992 993 if ( !$user['is_the_guest']||( $user['is_the_guest'] and $conf['comments_forall'] ) ) 967 $template->assign_block_vars( 968 'comments.comment.delete', 969 array('U_COMMENT_DELETE'=>add_session_id( $url.'&del='.$row['id']) 970 )); 971 } 972 } 973 974 if (!$user['is_the_guest'] 975 or ($user['is_the_guest'] and $conf['comments_forall'])) 994 976 { 995 977 $template->assign_block_vars('comments.add_comment', array()); 996 978 // display author field if the user is not logged in 997 if ( !$user['is_the_guest'] ) 998 { 999 $template->assign_block_vars('comments.add_comment.author_known', array('KNOWN_AUTHOR'=>$user['username'])); 1000 } 979 if (!$user['is_the_guest']) 980 { 981 $template->assign_block_vars( 982 'comments.add_comment.author_known', 983 array('KNOWN_AUTHOR'=>$user['username']) 984 ); 985 } 1001 986 else 1002 987 { 1003 $template->assign_block_vars('comments.add_comment.author_field', array()); 988 $template->assign_block_vars( 989 'comments.add_comment.author_field', array() 990 ); 1004 991 } 1005 992 }
Note: See TracChangeset
for help on using the changeset viewer.