Toggle navigation
Polycount
News
Forums
Patreon
Challenges
Quarterly Character Art Challenge
Bi-Monthly Environment Art Challenge
Wiki
Moar
Recent
Activity
Badges
Drafts
Store
Sign In
·
Register
Author:
Lucas Annunziata
Home
›
General Discussion
webpage auto-gallery?
blankslatejoe
polycounter lvl 19
Offline /
Send Message
blankslatejoe
polycounter lvl 19
Sep 2007
A few months ago someone posted a PHP file that would take a bunch of random images in a web directory and display them in a nice simple table with clickable thumbnails. Does anyone remember or have a link to the file?
-joe
0
·
Share on Facebook
Share on Twitter
Replies
Offline /
Send Message
thnom
polycounter lvl 18
Sep 2007
I don't think it was mine but at one point I released (I believe) the code to this.
http://www.heads.thnom.com/female.php
The code to this works like that.. I shall find the code and post that; does the job even if it isn't the one you are thinking about
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
thnom
polycounter lvl 18
Sep 2007
<font class="small">Code:</font><hr /><pre>
<?php
//for every file in IMG_DIR, export to txt and load up thumbnail
$IMG_DIR = "thumbs/female/";
$LINK_URL = "female/";
$eTxt=file('female.txt');
//$files = (scandir($LINK_URL));
$currentDir = "female";
$currentFile = fopen("female.txt", "w+");
if ($handle = opendir($currentDir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
fwrite($currentFile, "$file\n");
}
}
closedir($handle);
}
foreach ($eTxt as $imageName) {
?>
<a href="<?php echo $LINK_URL,$imageName ?>"><img src="<?php echo $IMG_DIR,$imageName ?>" width="75" height="75" border="0" alt="<?php echo $imageName ?>"></a>
<?
}
?></pre><hr />
In this instance the thumbnail directory acts as the main bit of code to displaying images.
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
Eric Chadwick
admin
Sep 2007
Hey Joe, whaddaya know...
http://boards.polycount.net/showflat.php?Cat=0&Number=177390&an=0&page=0&vc=1
0
·
Share on Facebook
Share on Twitter
Offline /
Send Message
blankslatejoe
polycounter lvl 19
Sep 2007
fannntastic. thanksto both of you--these were exactly what I was looking for!
0
·
Share on Facebook
Share on Twitter
Sign In
or
Register
to comment.
Replies
http://www.heads.thnom.com/female.php
The code to this works like that.. I shall find the code and post that; does the job even if it isn't the one you are thinking about
<?php
//for every file in IMG_DIR, export to txt and load up thumbnail
$IMG_DIR = "thumbs/female/";
$LINK_URL = "female/";
$eTxt=file('female.txt');
//$files = (scandir($LINK_URL));
$currentDir = "female";
$currentFile = fopen("female.txt", "w+");
if ($handle = opendir($currentDir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
fwrite($currentFile, "$file\n");
}
}
closedir($handle);
}
foreach ($eTxt as $imageName) {
?>
<a href="<?php echo $LINK_URL,$imageName ?>"><img src="<?php echo $IMG_DIR,$imageName ?>" width="75" height="75" border="0" alt="<?php echo $imageName ?>"></a>
<?
}
?></pre><hr />
In this instance the thumbnail directory acts as the main bit of code to displaying images.
http://boards.polycount.net/showflat.php?Cat=0&Number=177390&an=0&page=0&vc=1