Goins Posted March 15, 2008 Share Posted March 15, 2008 ??? Im Stuck! I been stuck for a long time :'( Okay im trying to add keywords/categories. Right Now i got a Multi upload image hoster. When you upload images it gose to a page that displays links. On that page i am trying to put a box with Keyword input box and a List box with the categories. When a user uploads more than one image code below is just repeted. I finished the part to search the database but i cant add the keywords to the database i keep failing. The Database is called mmh_file_storage -file_id -filename -gallery_id -album_id -file_title -keyword -categories <if="is_file($mmhclass->info->root_path.$mmhclass->info->config['upload_path'].$mmhclass->funcs->thumbnail_name("<# FILENAME #>")) == false && preg_match("/links|viewer/", $mmhclass->input->server_vars['php_self']) == false && $mmhclass->templ->templ_globals['extension'] != "bmp" && $mmhclass->templ->templ_globals['extension'] != "ico""> <div style="text-align: center;"> <b>Notice</b>: Failed to generate thumbnail for file <b><# FILENAME #></b> because of an internal error. <br /><br /> </div> </endif> <if="preg_match("/viewer/", $mmhclass->input->server_vars['php_self']) == false"> <div style="text-align: center;"> <a href="viewer.php?file=<# FILENAME #>" class="button1">View Full Image</a> </div> <br /> </endif> <table cellpadding="5" cellspacing="0" width="100%"> <tr> <td style="width: 80%;"> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" /></td> <td>Direct Link</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>viewer.php?file=<# FILENAME #>"><img src="<# THUMBNAIL #>" border="0" alt="<# FILENAME #>" /></a>" /></td> <td>Thumbnail for Websites</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>viewer.php?file=<# FILENAME #>][img=<# THUMBNAIL #>][/url]" /></td> <td>Thumbnail for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="Thanks to <# SITE_NAME #> for <a href="<# BASE_URL #>">Free image hosting</a>" /></td> <td>Link to us</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>][img=<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>][/url]" /></td> <td>Hotlink for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>"><img src="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" border="0" alt="<# SITE_NAME #>" /></a>" /></td> <td>Hotlink for Websites</td> </tr> </table> </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/ Share on other sites More sharing options...
Goins Posted March 15, 2008 Author Share Posted March 15, 2008 Anyone? Trying to stay uplate and get this.. ??? Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492746 Share on other sites More sharing options...
helraizer Posted March 15, 2008 Share Posted March 15, 2008 ??? Im Stuck! I been stuck for a long time :'( Okay im trying to add keywords/categories. Right Now i got a Multi upload image hoster. When you upload images it gose to a page that displays links. On that page i am trying to put a box with Keyword input box and a List box with the categories. When a user uploads more than one image code below is just repeted. I finished the part to search the database but i cant add the keywords to the database i keep failing. The Database is called mmh_file_storage -file_id -filename -gallery_id -album_id -file_title -keyword -categories <if="is_file($mmhclass->info->root_path.$mmhclass->info->config['upload_path'].$mmhclass->funcs->thumbnail_name("<# FILENAME #>")) == false && preg_match("/links|viewer/", $mmhclass->input->server_vars['php_self']) == false && $mmhclass->templ->templ_globals['extension'] != "bmp" && $mmhclass->templ->templ_globals['extension'] != "ico""> <div style="text-align: center;"> <b>Notice</b>: Failed to generate thumbnail for file <b><# FILENAME #></b> because of an internal error. <br /><br /> </div> </endif> <if="preg_match("/viewer/", $mmhclass->input->server_vars['php_self']) == false"> <div style="text-align: center;"> <a href="viewer.php?file=<# FILENAME #>" class="button1">View Full Image</a> </div> <br /> </endif> <table cellpadding="5" cellspacing="0" width="100%"> <tr> <td style="width: 80%;"> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" /></td> <td>Direct Link</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>viewer.php?file=<# FILENAME #>"><img src="<# THUMBNAIL #>" border="0" alt="<# FILENAME #>" /></a>" /></td> <td>Thumbnail for Websites</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>viewer.php?file=<# FILENAME #>][img=<# THUMBNAIL #>][/url]" /></td> <td>Thumbnail for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="Thanks to <# SITE_NAME #> for <a href="<# BASE_URL #>">Free image hosting</a>" /></td> <td>Link to us</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>][img=<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>][/url]" /></td> <td>Hotlink for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>"><img src="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" border="0" alt="<# SITE_NAME #>" /></a>" /></td> <td>Hotlink for Websites</td> </tr> </table> </td> </tr> </table> Why on Earth have you used all your php in < > tags? <if=.. </endif>.. i've never seen that syntax before... that could just be me but still.. To add the keywords in php use <?php $sql = "INSERT INTO (`file_id`,`filename`,`gallery_id`,`album_id`,`file_title`,`keyword`,`categories`) VALUES (NULL,'$filename','$gallery_id','$album_id','$file_title','$keyword','$category')"; //NULL assuming the id is auto_increment $result = mysql_query($sql) or die("Error in sql: ".mysql_error()); ?> Sam Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492801 Share on other sites More sharing options...
lordfrikk Posted March 15, 2008 Share Posted March 15, 2008 ^ I think it might be a template tags, Sam. Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492802 Share on other sites More sharing options...
Goins Posted March 15, 2008 Author Share Posted March 15, 2008 Hey Sorry About that lordfrikk is correct that is a template tag. Thanks For the Reply Helraizer But i know how to put keywords into the database. But The Values For -file_id -filename -gallery_id -album_id -file_title Are Inserted when you upload the file, But now what i want to do is upload keywords and Categories if you under stand. Something Like This. <?php $sql = "INSERT INTO (`keyword`,`categories`) VALUES ('$keyword','$category')"; //NULL assuming the id is auto_increment $result = mysql_query($sql) or die("Error in sql: ".mysql_error()); ?> But This I Dont Understand How to do this. This Code Here Is repeated. So if you upload more than 1 image it just repeats itself. I want to add a List box that has predefined categories and a Input Field for the keywords. But just one submit button if you understand. I dont know how to submit all the fields and how to get it to submit to switch image. <if="is_file($mmhclass->info->root_path.$mmhclass->info->config['upload_path'].$mmhclass->funcs->thumbnail_name("<# FILENAME #>")) == false && preg_match("/links|viewer/", $mmhclass->input->server_vars['php_self']) == false && $mmhclass->templ->templ_globals['extension'] != "bmp" && $mmhclass->templ->templ_globals['extension'] != "ico""> <div style="text-align: center;"> <b>Notice</b>: Failed to generate thumbnail for file <b><# FILENAME #></b> because of an internal error. <br /><br /> </div> </endif> <if="preg_match("/viewer/", $mmhclass->input->server_vars['php_self']) == false"> <div style="text-align: center;"> <a href="viewer.php?file=<# FILENAME #>" class="button1">View Full Image</a> </div> <br /> </endif> <table cellpadding="5" cellspacing="0" width="100%"> <tr> <td style="width: 80%;"> <table width="100%" border="0" cellspacing="1" cellpadding="0"> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" /></td> <td>Direct Link</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>viewer.php?file=<# FILENAME #>"><img src="<# THUMBNAIL #>" border="0" alt="<# FILENAME #>" /></a>" /></td> <td>Thumbnail for Websites</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>viewer.php?file=<# FILENAME #>][img=<# THUMBNAIL #>][/url]" /></td> <td>Thumbnail for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="Thanks to <# SITE_NAME #> for <a href="<# BASE_URL #>">Free image hosting</a>" /></td> <td>Link to us</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="[url=<# BASE_URL #>][img=<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>][/url]" /></td> <td>Hotlink for forums</td> </tr> <tr> <td><input readonly="readonly" class="input_field" onclick="javascript:highlight(this);" type="text" style="width: 310px" name="option" value="<a href="<# BASE_URL #>"><img src="<# BASE_URL #><# UPLOAD_PATH #><# FILENAME #>" border="0" alt="<# SITE_NAME #>" /></a>" /></td> <td>Hotlink for Websites</td> </tr> </table> </td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492911 Share on other sites More sharing options...
Goins Posted March 15, 2008 Author Share Posted March 15, 2008 Here Some More Help. Right Now This Is How It Is. But This Is How I am trying to get it to be. Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492928 Share on other sites More sharing options...
Goins Posted March 15, 2008 Author Share Posted March 15, 2008 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-492976 Share on other sites More sharing options...
Goins Posted March 16, 2008 Author Share Posted March 16, 2008 I really need help, this is the last part that i need done Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-493189 Share on other sites More sharing options...
Goins Posted March 16, 2008 Author Share Posted March 16, 2008 No one going to help? I really need help bad... Just this one time, I been Trying to DO it my self but i cant get it. Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-493376 Share on other sites More sharing options...
kenrbnsn Posted March 16, 2008 Share Posted March 16, 2008 The problem is that you're using a templating system that nobody here is familiar with. If there is a help forum for that system, ask your question there. Ken Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-493387 Share on other sites More sharing options...
Goins Posted March 16, 2008 Author Share Posted March 16, 2008 They dont help on the support forum, Thats why its so retarted Quote Link to comment https://forums.phpfreaks.com/topic/96250-php-help/#findComment-493389 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.