The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl eAuction 1.6.1.x >> Discussion of Functions >> Display Item https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1070078453 Message started by thisolddoll on 11/29/03 at 05:00:53 |
Title: Display Item Post by thisolddoll on 11/29/03 at 05:00:53 Hello, Dieter! Don't know if you celebrate anything like Thanksgiving in Germany, but if you do, hope it was nice, and if not, here's wishing you a nice weekend. The auction is up and it's great! There is one issue, though that might interest everyone. On the item display, the description doesn't wrap when viewed at less than full screen. Is there some way to make it do this? http://www.todauction.com/cgi-bin/dieter/dieter.pl?action=dispitem&category=30&item=1069926563&lang=1 Thanks for all your help! Michele |
Title: Re: Display Item Post by Forum Admin on 11/30/03 at 15:02:01 Hello Michele, you should use HTML tags with your description. If you want to do that, you have to replace sub enable_html with this: sub enable_html { my $line = shift || return 0; $line =~ s/(\&\;)/\&/gi; $line =~ s/(\"\;)/\"/gi; $line =~ s/(\<\;)/\</gi; $line =~ s/(\>\;)/\>/gi; return $line; } |
Title: Re: Display Item Post by floinfo on 12/28/03 at 01:48:44 hello, I just checking your auction site... http://www.todauction.com/cgi-bin/dieter/dieter.pl?action=new&lang=1 And I see you could do 3 more pictures... so 6 together. WooW! I'd like to do this on my auction site too, give more pictures upload option. Could you tell me how can change the script to allow to upload 5-6 pictures. thanks, Balint |
Title: Re: Display Item Post by thisolddoll on 12/28/03 at 04:59:44 Dear Balint, To display items, the items have to be there, first. When the user enters an item with images, the data file has an array of urls that point to each image. This line in the display subroutine: @image = split /\s/, $image || (push @image, $image); breaks up the array of urls. And this block foreach (@image) { $_ !~ /\.\w{3,}$/ && next; $_ =~ /http:\/\//i ? ($img_info .= qq|<tr>\n<td><img src="$_"></td>\n</tr>\n|) : ($img_info .= qq|<tr>\n<td><img src="$config{'img_url'}/$_"></td>\n</tr>\n|); } will read each image in the array - whether it's three or thirty. So the trick is to get more image urls into that image array at the time the item is entered. First you have to give the user a place to enter more pictures: in sub new { search for this: $form{"IMAGE$_"} = "" for 0 .. 3 and change the 3 to 6 like so: $form{"IMAGE$_"} = "" for 0 .. 6; or any number of images you want your user to be able to enter. do the same in sub proc_new { so all the images make it to the data files: where it says for (1 .. 3) change it to for (1 .. 6) (there are two places to change this in this subroutine) Back in sub new { Find the html table that displays the form to input the images. Here's the block that shows the input line for image #3: <tr bgcolor="$config{colortablebody}" rowspan="3"> <td colspan="3" nowrap><b>$txt{'Image'} 3:</b> </font><input type="file" name="UploadFile2" size="38"> </td> </tr> So it's a matter here of adding a copy of this block - one for each additional image you want. To make the image input column on the right line up with the images that Dieter has in his table, put in a dummy data entry after the bgcolor line. So your copies will look like this (I changed the image sizes so your code might not look exactly like this) <tr bgcolor="$config{colortablebody}" rowspan="5"> <td></td> <td colspan="3" nowrap><b>$txt{'Image'} 4:</b> </font><input type="file" name="UploadFile2" size="38"> </td> As I was writing this, I changed the number of images on my auction from 6 to 8, so I'm pretty sure this is all there is to it. If you'd like to see the text of the code in full, here's a link to it as a text file that you can download and examine: http://www.todauction.com/examcode/dieter.txt The only changes I made were in thise two subroutines: sub new sub proc_new Good luck and thanks for asking! Michele |
Title: Re: Display Item Post by Forum Admin on 12/28/03 at 11:20:05 Very good Michele :) |
Title: Re: Display Item Post by floinfo on 12/28/03 at 19:44:33 O, I forget! Also, it is great on your auction site the "description" area. When I see for example the: http://www.todauction.com/cgi-bin/dieter/ended.pl?action=dispitem&category=closed&item=301069926576&lang=1 Your item description is in a nice table, cool! How did you do that? Just used a html table copy/paste or did you modified the script, so anybody could write text in the table format when post an item ? Thanks, Balint |
Title: Re: Display Item Post by iopsrb1 on 01/28/04 at 02:23:10 Michelle I've tried the modifications you mention and cannot get the items to display. Just so we're on the same page...this IS for displaying featured items, is it not? Thanks in advance for any help you may provide, Ron |
The eAuction Support Forums » Powered by YaBB 2.2! YaBB © 2000-2007. All Rights Reserved. |