while surfing around found this script which imports images from a directory straight into a php table. Can this be remodded to work for threads.
if ($add == "do") {
$time = time();
$xxxx_sql->query($db, "INSERT INTO $db[prefix]_files VALUES('NULL', '$form[x]', '$form[y]', '$form[z]', '$form[v]', '$form[l]', '$form[s]', '$time', '$form[posticon]';
$fid = mysql_insert_id();
if (!empty($custom)) {
foreach ($custom as $key => $value) {
$value = trim($value);
if (!empty($value)) { $xxx_sql->query($db, "INSERT INTO $db[prefix]_customdata VALUES('$fid', '$key', '$value')", 0); }
}
}
?>
<table width="100%" border="1" cellpadding="2" cellspacing="0" class="headertable" bordercolor="#000000">
<tr><td width="100%" colspan="2" class="headercell"><center><b><?php echo $str[afile]; ?></b></center></td></tr>
<tr><td width="5%" class="datacell" align="center" valign="middle"><img src="styles/<?php echo $config[11]; ?>/images/info.gif" border="0"></td>
<td width="95%" class="datacell"><?php echo $str[fileadded]; ?></td></tr></table>
<?php
}
if (empty($add)) {
$curicons = 1;
$posticons .= "<input type="radio" name="form[posticon]" value="none" checked><a class="small">$str[none]</a> ";
$handle=opendir('./images/posticons');
while (false!==($icon = readdir($handle))) {
if ($icon !== "." && $icon !== "..") {
$posticons .= "<input type="radio" name="form[posticon]" value="$icon"><img src="images/posticons/$icon"> ";
$curicons++;
if ($curicons == 8) {
$posticons .= "<br>";
$curicons = 0;
I know diddely about programming PHP so its beyond me. I think it adds the name of the posticon to db for the post once selected and quearies db for the posticon field when editing????
$query .= "file_posticon = '$form[posticon]', ";
Could this be used for In-line images/posticon hacks?
I hope I am not breaking any rules posting this?