Changeset 1328

Show
Ignore:
Timestamp:
02/09/07 19:08:04 (2 years ago)
Author:
jm3
Message:
  • implemented random sabotage icons for users without profile icons
  • implemented tiny icons for list views
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • feedmelinks/admin/snuff.php

    r1326 r1328  
    1 <% 
     1<?php 
    22        include_once( "../modules/utils.inc.php" ); 
    33        $no_base_href = true; 
     4        $nobody = true; 
    45        include( "$modules/header.inc.php" );  
    5 %
     6?
    67 
    7         <title> snuff a user </title> 
     8        <title> Snuff a user </title> 
     9        <body onLoad="document.forms.snuff_next.who.focus()"> 
    810        <h3>meat for the beast:</h3> 
    911        <p /> 
     
    4648                if( $user && !is_privileged_importer( $user ) && !isSuperUser( $user ) && $confirm == "true" ) { 
    4749 
     50                        $user = urlencode( $user ); 
    4851                        $status = snuff_user( $user ); 
    4952%> 
    5053 
    5154<h2>Who's next?</h2> 
    52 <form action="/users.php"
    53         <input name="who" /> 
     55<form action="/users.php" name="snuff_next"
     56        <input type="text" name="who" /> 
    5457</form> 
    5558 
  • feedmelinks/import/ready-to-import.php

    r1306 r1328  
    4242                                                $ls < $max_allowed_links  
    4343                                                && $ts < $max_allowed_tags 
    44                                                 && ($tr < $max_tags_to_links_ratio || $ls < 15
     44                                                && ($tr < $max_tags_to_links_ratio || $ls < 18
    4545                                        ) 
    4646                                        || is_privileged_importer( $u ) )  
  • feedmelinks/modules/recent-with-times.inc.php

    r1299 r1328  
    9494<%                      } %> 
    9595<div class="r<%= $realCount % 2 == 0 ? 1 : 0 %><%= $realCount == $limit - 1 ? " last" : "" %>"> 
    96         <%= makeNamedLinkOut( $id, getCompactString( urldecode( $name ) ) ) %> <%= makePermaLink( $id ) %> - <%= makeUserLink( $user ) %> 
     96        <%= makeNamedLinkOut( $id, getCompactString( urldecode( $name ) ) ) %> <%= makePermaLink( $id ) %> - <%= makeUserLink( urldecode( $user ) ) %> 
    9797        <% if( !$hideTimes ) { %><span class="subtle">(<%= $time %>&nbsp;ago)</span><% } %> 
    9898        in <%= getTagLink( $tagID, $tag ) %> 
  • feedmelinks/modules/utils.inc.php

    r1326 r1328  
    265265function make_thumbnail_for_user( $u ) { 
    266266  $i = get_profile_image( $u ); 
    267   $out = "/" . get_user_folder( $u ) . "/thumb.png"; 
    268   imagepng( get_png_thumbnail_from_image( $i ), get_root() . $out ); 
    269   return $out; 
     267  $path = get_root() .  "/" . get_user_folder( $u ); 
     268  imagepng( get_png_thumbnail_from_image( $i, 64 ), "$path/thumb.png"); 
     269  $tiny = imagepng( get_png_thumbnail_from_image( $i, 14 ), "$path/tiny.png" ); 
     270        exec( "mogrify -contrast $path/tiny.png" ); 
     271  return "$path/thumb.png"; 
    270272} 
    271273 
    272274# returns an image OBJECT of the newly created thumbnail 
    273 function get_png_thumbnail_from_image( $i ) { 
    274   $goal = 64; 
     275function get_png_thumbnail_from_image( $i, $goal ) { 
     276  $goal = $goal ? $goal : 64; 
    275277  list($width, $height, $type, $attr) = getimagesize( $i ); 
    276278 
     
    24312433    } 
    24322434  } 
     2435        return "/img/new-user/profile"; 
     2436} 
     2437 
     2438function get_tiny_image( $u ) { 
     2439        return get_user_image( $u, "tiny" ); 
    24332440} 
    24342441 
     
    24372444    make_thumbnail_for_user( $u ); 
    24382445  if( ! is_file( get_user_image( $u, "thumb" ))) 
    2439     return "/usr/NO_PROFILE/thumb.png"; 
     2446    return "/img/new-user/thumb"; 
    24402447  else 
    24412448    return get_user_image( $u, "thumb" ); 
     
    24642471  } else { 
    24652472%> 
    2466   <img src="/usr/NO_PROFILE/thumb.png" height="<%= $pxl_size %>" class="profileImage" alt="" border="0" > 
     2473  <img src="/img/new-user/thumb" height="<%= $pxl_size %>" class="profileImage" alt="" border="0" > 
    24672474<% 
    24682475  } 
  • feedmelinks/users.php

    r1302 r1328  
    4646        $con_users = mysql_connect(); 
    4747        mysql_selectdb( getDBName() ); 
    48         $qs = getQuery( "find_user", $userId ); 
     48        $qs = getQuery( "find_user", urlencode( $userId ) ); 
    4949        $q = mysql_query( $qs ); 
    5050        if( $q ) { 
     
    5353                # DESTROY SNUFFED USERS 
    5454                if( mysql_result($q,$i,"disabled") == 1 ) { 
    55                         if( snuffed( $userId )) { 
     55                        if( snuffed( urlencode( $userId ) )) { 
    5656%> 
    5757                        <center>