public static function getImageLink($record, $field, $classes) { $table = All::tableName($record); // $img = All::getImage($record); $img = All::getUpload($record, $field); $i_link = "{$table}/{$record->id}"; $i_link = $table == 'eventts' || $table == 'stories' ? "users/" . All::getCreator($record) : $i_link; //using creator pic for eventts and stories if ($img == '/images/users/user.png' || $img == '/images/symbols/star.gif') { $classes = $classes . ' _fade-3'; $img_link = "<a href=\"/{$i_link}\"><img src=\"{$img}\" class=\"{$classes}\" /></a>"; if (All::hasEditRight($record)) { return $img_link . "<script> myalert = 'Add an image to " . All::getNamedEditLink($record, All::getName($record)) . "' </script>"; } } // return var_dump($classes); return "<a href=\"/{$i_link}\"><img src=\"{$img}\" class=\"{$classes}\" /></a>"; }