Ian-San Posted December 7, 2002 Posted December 7, 2002 Here is a great little open source utility that allows you to create a library of all your images: http://www.jab.nu/dappg/ By changing lines 369 onwards to the following, plus switching on 'index_page="true"' with the configuration tool supplied, you can get an opening gallery page as well: <table border="0" width="100%" height="100%" cellspacing="2" cellpadding="5"> <tr> <td valign="top" bgcolor="' . $config["bgcolor"] . '"> <center> <table border="1" cellspacing="0" cellpadding="0"> <font face="tahoma" size="2">'; $a=1; $zz=0; $indexcols=6; while ($a < $n) { print '<tr>'; while ($zz < $indexcols) { print '<td align="center">'; if ($config["numbered"]) { $adir[$a]=pchop($adir[$a]); } if ($config["strip_jpg"]) { $adir[$a]=jchop($adir[$a]); } print "<a href="?pic=$a"><img src=" . $adir[$a] . " width="90" height="60" border="0"><br>"; print "<font face="tahoma" size="1" color="#0000FF">" . $adir[$a] . "</font></a></td>"; $zz++; } print ' </tr>'; $zz=0; $a++; } print ' </table></center></td> </tr> </table> This would be a great addition to Admin to allow you to drag and drop images straight into the product description - if you have this installed as well, you can do it easiliy by using copy and paste: http://www.oscommerce.com/downloads.php/co...ions,478/type,3 Quote Ian-san Flawlessnet
Ian-San Posted December 7, 2002 Author Posted December 7, 2002 Ooops! Slight problem with the mod above, should be: <table border="0" width="100%" height="100%" cellspacing="2" cellpadding="5"> <tr> <td valign="top" bgcolor="' . $config["bgcolor"] . '"> <center> <table border="1" cellspacing="2" cellpadding="2"> <font face="tahoma" size="2">'; $a=1; $zz=0; $indexcols=8; $picwidth=90; $picheight=60; while ($a < $n) { print '<tr>'; while ($zz < $indexcols) { print '<td align="center">'; if ($config["numbered"]) { $adir[$a]=pchop($adir[$a]); } if ($config["strip_jpg"]) { $adir[$a]=jchop($adir[$a]); } print "<a href="?pic=$a"><img src=" . $adir[$a] . " width=" . $picwidth . " height=". $picheight . " border="0"><br>"; print "<font face="tahoma" size="1" color="#0000FF">" . $adir[$a] . "</font></a></td>"; $zz++; $a++; } print ' </tr>'; $zz=0; } print ' </table></center></td> </tr> </table> Quote Ian-san Flawlessnet
ukracer Posted December 9, 2002 Posted December 9, 2002 Here is a great little open source utility that allows you to create a library of all your images: http://www.jab.nu/dappg/ By changing lines 369 onwards to the following, plus switching on 'index_page="true"' with the configuration tool supplied, you can get an opening gallery page as well: http://www.oscommerce.com/downloads.php/co...ions,478/type,3 I am a bit unsure if you emant insert that code after line 369 and leave the reat of the code that comes in as well?? or remove everything after 369. Apart from that I get an error when using the PHP config util and I suppose I need to contact the author about this? Did you get propblems at all?? Warning: fopen("./pic.conf","w") - Permission denied in /home/examsyou/public_html/main_images/index.php on line 296 Warning: Supplied argument is not a valid File-Handle resource in /home/examsyou/public_html/main_images/index.php on line 297 Warning: Supplied argument is not a valid File-Handle resource in /home/examsyou/public_html/main_images/index.php on line 331 Warning: Supplied argument is not a valid File-Handle resource in /home/examsyou/public_html/main_images/index.php on line 332 Warning: Cannot add header information - headers already sent by (output started at /home/examsyou/public_html/main_images/index.php:296) in /home/examsyou/public_html/main_images/index.php on line 334 thanks for any info in advance this coukld save me hours of work if I can get it working :) Quote
Ian-San Posted December 9, 2002 Author Posted December 9, 2002 ukracer My mod replaces the code that forms the table starting line 369 - maybe a good idea to get it working first before changing the code. I found it easier to create a blank text file pic.conf and load t to the site (same directory as the main file, same as images) with global write enabled permissions. Then run the config option once and see what you then have in the file - it is easy to modify with a text editor after that. Quote Ian-san Flawlessnet
ukracer Posted December 10, 2002 Posted December 10, 2002 ukracer My mod replaces the code that forms the table starting line 369 - maybe a good idea to get it working first before changing the code. I found it easier to create a blank text file pic.conf and load t to the site (same directory as the main file, same as images) with global write enabled permissions. Then run the config option once and see what you then have in the file - it is easy to modify with a text editor after that. Ok that worked. I left the code in and just added the blank file and that worked.....:) so all I need to know is what you mean by "This would be a great addition to Admin to allow you to drag and drop images straight into the product description - if you have this installed as well, you can do it easiliy by using copy and paste: " I cant seem to follow what you mean. or what your mod did although I might edit the file again one day and see what the standard version produces that is different :) What I am after is the ability to drag and drop an image from either a web server or from a local drive without messing about typing paths...I have seen reference to an ongoing contribution that would seem to be the solution but not seen a final offerening yet. I do have the wysiwyg contribution installed but sadly its still not what I need just yet <grin> Thanks for your help! Quote
Ian-San Posted December 10, 2002 Author Posted December 10, 2002 ukracer The standard version just gives a list of filenames like an index. Well, I was hoping to integrate the image library into the wysiwyg editor to allow you to drag and drop. Initially, I found that you can do this by just cutting and pasting the images from the image library straight into the textarea box in Admin/edit product. However, I then realised that you can do it better by changing one word in the wysiwyg editor as follows: In insert_image.html, change line 166 from type=text to type=file as follows: <INPUT ID=txtFileName type=file style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()"> Now you can browse for images and if you have XP or similar, you can can set the view to show Icons or thumbnails and so you can see the images, select them and upload them to the product description textarea without typing any filenames at all. Quote Ian-san Flawlessnet
ukracer Posted December 10, 2002 Posted December 10, 2002 ukracer The standard version just gives a list of filenames like an index. Well, I was hoping to integrate the image library into the wysiwyg editor to allow you to drag and drop. Initially, I found that you can do this by just cutting and pasting the images from the image library straight into the textarea box in Admin/edit product. However, I then realised that you can do it better by changing one word in the wysiwyg editor as follows: In insert_image.html, change line 166 from type=text to type=file as follows: <INPUT ID=txtFileName type=file style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()"> Now you can browse for images and if you have XP or similar, you can can set the view to show Icons or thumbnails and so you can see the images, select them and upload them to the product description textarea without typing any filenames at all. I think thats exactly what I wanted <grin> Must go and check that out now sleep will have to wait :) What is supposed to happen as all I get is the gallery unlike their demo which gives you a list of images on the same page. The way mine is working now is that it only moved to another image when I click next. perhaps I have not altered the config file the way I should have and selected the wrong options. Can you upload then to the image boxes as well?? When you have altered that one word :) getting interesting now thanks again Quote
Ian-San Posted December 10, 2002 Author Posted December 10, 2002 To see the image library as a table of images, set this line in pic.conf: ,"index_page"=>"true" The other 'one word' mod I mentioned to wysiwyg editor is not related to the image library but allows you to select and upload images - not file names. With the two contributions, you can use the picture library to scan and manage all your pictures like a photo album and use the wysiwyg editor to select and upload them to your product descriptions. Quote Ian-san Flawlessnet
ukracer Posted December 10, 2002 Posted December 10, 2002 To see the image library as a table of images, set this line in pic.conf: ,"index_page"=>"true" The other 'one word' mod I mentioned to wysiwyg editor is not related to the image library but allows you to select and upload images - not file names. With the two contributions, you can use the picture library to scan and manage all your pictures like a photo album and use the wysiwyg editor to select and upload them to your product descriptions. Ok so thats much clearer now :) My main problem is that despite changing the upload_images.html from text to file and confirming deletion via FTP and uploading new version the site still throws up the old wysiwyg without file selector even though run locally I CAN see file selector has now been included. How do I force a refresh of a PHP page :) If you see what I mean? Thanks muchly! Quote
Ian-San Posted December 10, 2002 Author Posted December 10, 2002 It should work if you close down all browser windows and start Admin again. If not then ???? Quote Ian-san Flawlessnet
ukracer Posted December 10, 2002 Posted December 10, 2002 It should work if you close down all browser windows and start Admin again. If not then ???? did that but it never altered. so I shut down the machine and now I get a blank window instead of the file selector etc its has web page dialogue at te top of the box. whats annoying is I know I havwe got it right as it displays locally but when being combined into PHP pages it gets muddled up somehow. Perhaps a PHP guru might have a gues at what is happening. You sure there was only one occurnace of that word I need to change <grin> Thnaks muchly Quote
ukracer Posted December 10, 2002 Posted December 10, 2002 It should work if you close down all browser windows and start Admin again. If not then ???? did that but it never altered. so I shut down the machine and now I get a blank window instead of the file selector etc its has web page dialogue at te top of the box. whats annoying is I know I havwe got it right as it displays locally but when being combined into PHP pages it gets muddled up somehow. Perhaps a PHP guru might have a gues at what is happening. You sure there was only one occurnace of that word I need to change <grin> Thnaks muchly Guess what!.... I did nothing except go to bed and be out all day so I think it was a problem with the cache at my ISP. When you say you can cut and paste but using the file selector you can just select the image instead can I confirm this relies on you having uploaded exactly the same images with the same names to your remore FTP site as those in your local folder?? Otherwise I cant see how it works........especially with regard to paths? Thanks in advance Quote
Ian-San Posted December 13, 2002 Author Posted December 13, 2002 When you say you can cut and paste but using the file selector you can just select the image instead can I confirm this relies on you having uploaded exactly the same images with the same names to your remore FTP site as those in your local folder?? Good point - yes, you a) need to manually upload the images to the server using the same names and then B) edit the image path. Editing the path is very easy as it just means changing all images in exactly the same way. I am still working on the code to do the upload and path change. Quote Ian-san Flawlessnet
Ian-San Posted December 13, 2002 Author Posted December 13, 2002 re the path - to make it clear: if you cut and paste from the image library on your server then there should be no problem with the path, But if you cut and paste from your hard drive, or use browse on the wysiwyg editor to find the images, then you need to change the path. Quote Ian-san Flawlessnet
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.
Note: Your post will require moderator approval before it will be visible.