View Single Post
Pfsm999
Senior Member
Join Date: Sep 2009
Old 11-26-2009 , 17:54   Re: [TF2][BETA] Custom Achievement Kill Manager With MYSQL (0.5)
Reply With Quote #83

Quote:
Originally Posted by DarthNinja View Post
Here's some code you might want to add to an index.php for your /images/ folder:

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Image Icons</title>
</head>

<body>

<table width="100%" border="0">
    <tr>
    <td id="header" height="90" colspan="3">
        <h1>
Achievement Icons:
</h1>
<h4>          <em><hr>Click to view.<hr /><br /></em></h4>    </td>
    </tr> 
    
</table>

<?php
$path 
'./';
$dir_handle = @opendir($path) or die('Unable to open ' $path);
$array = array();
while ((
$file readdir($dir_handle)) !== false)
{
if (
$file != '.' && $file != '..')
{
$pathinfo pathinfo($file);
if (isset(
$pathinfo['extension'])) {$ext strtolower($pathinfo['extension']);} else {$ext '';}
if (
$ext == 'png' || $ext == 'jpg') {$array[] = $file;}
}
}

if (
$array)
{
sort($array);

echo 
'<ul>';
foreach (
$array as $value)
{
echo 
'<li><font face="tahoma"><a href="' $path $value '">' $value '</a></li>' "\n</font>";
}
echo 
'</ul>';
}
?>
</body>
</html>
On some servers (like mine), listing of directory/file trees is turned off by default.

Later I'll add some code to that so it shows a thumbnail of each icon...
That's true ! I will include this file on the next version. But i will rename this file :
index.php on images folder !

I will do my best to give you the 0.6 version of plugin in the next week, Monday evening (in France) perhaps : If i have time to test it ! But i'm not sure !
__________________
Pfsm999 is offline