tobycatlin Posted July 22, 2005 Author Share Posted July 22, 2005 loving this contrib a lot mate, thanks for sharing... will install tonight :) <{POST_SNAPBACK}> No problem, nice to give something back. Let me know if it lives up to expectations. Quote I ain't got time to bleed Link to comment Share on other sites More sharing options...
snout Posted July 22, 2005 Share Posted July 22, 2005 No problem, nice to give something back. Let me know if it lives up to expectations. <{POST_SNAPBACK}> Installed ok but my files.php displays things wrong :( it doesnt appear to mix with my current skin... Quote Link to comment Share on other sites More sharing options...
snout Posted July 22, 2005 Share Posted July 22, 2005 (edited) Installed ok but my files.php displays things wrong :( it doesnt appear to mix with my current skin... <{POST_SNAPBACK}> Cant edit my post :( anyway.. figured it out, its cos im using a template system! in the end I added it in a similar way to "define mainpage" my files.php ended up looking like: <?php /* File library v1.3 files.php Copyright (t)(c) 2005 Released under the GNU General Public License Simple file listing script allowing a cover image to be attached to a file an displayed by section Changes: 31-03-2005 - minor change -added if statement in case this script is run when there are no files in the files table */ $section_query = tep_db_query("SELECT DISTINCT file_section FROM files WHERE file_status = '1'"); if ($section_query) { while ($section = tep_db_fetch_array($section_query)){ echo '<br><table align="center" ><tr><td class="infoBoxContents" colspan="2"><table width="100%" cellspacing="0" cellpadding="0"><tr> <td width="11">' . tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif') . '</td><td class="infoBoxHeading">'.$section[file_section].'</td><td width="11">' . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif') .'</td> </tr></table></td></tr>'; $file_query = tep_db_query("SELECT * FROM files WHERE file_status = '1' AND file_section = '$section[file_section]'"); while ($file = tep_db_fetch_array($file_query)){ echo '<tr valign="top">'; if ($file[file_image_path]){ echo '<td class="main" >'. tep_image( $file[file_image_path], $file[file_title], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'</td>'; }else{ echo '<td class="infoBoxContents"></td>'; } echo '<td width="400" class="infoBoxContents"><b>' . $file[file_title]. '</b><br>' . $file[file_description] .'<br><br><b><a href="' . $file[file_path] . '" target="_BLANK" class="infoBoxContents">download...</a></b></td></tr>'; echo '<tr><td></td></tr>'; }//end while }//end distinct while }else{ echo 'No files found'; } ?> </td> </tr> </table Edited July 22, 2005 by snout Quote Link to comment Share on other sites More sharing options...
kirkside Posted September 11, 2005 Share Posted September 11, 2005 I am getting the below error after installing this what looks to be a great conrtib. It appears in the admin page after clicking on files. 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select * from files order by file_title limit -20, 20 Quote Link to comment Share on other sites More sharing options...
tobycatlin Posted September 12, 2005 Author Share Posted September 12, 2005 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 What version of MySQL are you using?? Quote I ain't got time to bleed Link to comment Share on other sites More sharing options...
kirkside Posted September 12, 2005 Share Posted September 12, 2005 I am using what I believe to be the latest version - 4.1.12a Quote Link to comment Share on other sites More sharing options...
Guest Posted September 12, 2005 Share Posted September 12, 2005 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1 select * from files order by file_title limit -20, 20 its probably this bug http://www.oscommerce.com/community/bugs,1605 Quote Link to comment Share on other sites More sharing options...
kirkside Posted September 12, 2005 Share Posted September 12, 2005 Thank you so much for your help. That fixed my problem. I am now able to add files using Admin. Now, how do I download these files from the website itself. Quote Link to comment Share on other sites More sharing options...
kirkside Posted September 12, 2005 Share Posted September 12, 2005 Ignore that last comment, I actually managed to work it out. Yay. Thank you anyway. Quote Link to comment Share on other sites More sharing options...
kirkside Posted September 12, 2005 Share Posted September 12, 2005 Or not. I find that adding the file is fine. No problems. However, when I come to change the image for another, I get the below error: Warning: array_merge() [function.array-merge]: Argument #2 is not an array in c:\program files\e-novative\WAMP\www\catalog\admin\files.php on line 66 Warning: reset() [function.reset]: Passed variable is not an array or object in c:\program files\e-novative\WAMP\www\catalog\admin\includes\functions\database.php on line 55 Warning: Variable passed to each() is not an array or object in c:\program files\e-novative\WAMP\www\catalog\admin\includes\functions\database.php on line 79 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where file_id = '4'' at line 1 update files se where file_id = '4' [TEP STOP] Quote Link to comment Share on other sites More sharing options...
kirkside Posted September 12, 2005 Share Posted September 12, 2005 The previous error also appears when editing the file name. Has anyone worked out how to add the file size to the admin page? Quote Link to comment Share on other sites More sharing options...
devless Posted April 16, 2006 Share Posted April 16, 2006 Hi All, I have a FRESH install of Oscommerce 2.2ms2-051113 with only CCGV installed. Apache 2.0.55, PHP 5.1.1, MySQL 4.1 I performed the install of File Library v1.31 (31 Mar 2005). I have found numerous issues all of which have already been stated on various posts. These are all the errors summed up which need to be rectified... 1. Few Cosmetic Errors: - Please fill out the following information for the new country". - Language definitions for TEXT_FILES_COVER_IMAGE, TEXT_DELETE_IMAGE, and NAVBAR_TITLE 2. An attempt to load any file larger than 1.99MB causes the error "Warning: No file uploaded." and an empty file record to be created. I have tried this with jpg, bmp, wmv and pdf. 3. An attempt to edit an existing file in admin produces: Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Program Files\Apache Group\Apache2\htdocs\catalog\mky\files.php on line 66 Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Program Files\Apache Group\Apache2\htdocs\catalog\mky\includes\functions\database.php on line 55 Warning: Variable passed to each() is not an array or object in C:\Program Files\Apache Group\Apache2\htdocs\catalog\mky\includes\functions\database.php on line 79 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where file_id = '4'' at line 1 update files se where file_id = '4' [TEP STOP] A response to these issues would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
TriCon Posted January 25, 2014 Share Posted January 25, 2014 (edited) Someone alive here ? Get some problems.. Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /users/xxxxxx/www/shop/xxxxxx/files.php on line 66 Warning: reset() expects parameter 1 to be array, null given in /users/xxxxxx/www/shop/xxxxxx/includes/functions/database.php on line 59 Warning: Variable passed to each() is not an array or object in /users/xxxxxx/www/shop/xxxxxx/includes/functions/database.php on line 83 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where file_id = '1'' at line 1 update files se where file_id = '1' Edited January 25, 2014 by TriCon Quote SELECT signatur FROM dummesprueche WHERE forumsbezug > 0 Link to comment Share on other sites More sharing options...
Jack_mcs Posted January 25, 2014 Share Posted January 25, 2014 You will probably run into quite a few problems with an addon that has not been updated in 8+ years but for the one you mention, open the files.php line and on line 66 you will see something like array_merge(...,...). After the comma, insert (array). Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment 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.