View Full Version : Limit Ads in Upload and Edit product templates
June 13th, 2006, 01:59 PM
I have tried to restrict the number of photos per ad to 3 on each of the uploadproduct and editproduct templates. The uploadproduct restriction appears to work fine. The edit looks like it works ok, but if I ad a photo using edit ad instead of during the initial load, the process appears to work, but the image comes up empty when you look at the recent ads or the ad itself in showproduct.php.
I've attached my editproduct template in hopes someone can spot what I've done wrong.
Thank you in advance for any help that may be rendered.
June 13th, 2006, 02:53 PM
Here's a link to the "Recent Ads".
You can see that the link behaves as if an image is there, but there isn't one there to display.
June 13th, 2006, 03:28 PM
This is weird. The image that is produced when uploaded using editproduct.php seems to produce an imgage alt tag with the entire URL to the image, but the same process in uploadproduct.php simply displays the alt image tag as the base filename.
To see what I mean, mouse over the missing image thumb on the Recent Ads link I sent. Note the URL. Now mouse over the thumb (it actaully has an image) of the image to the right. It shows as the alt tag the name of the file. The only difference between these two thumbs is the missing one was uploaded using the editproduct.php and the good one using uploadproduct.php.
June 14th, 2006, 11:09 AM
Is this something you can help with. I used the standard editproduct.tmpl file as the basis for my template and simply trimmed the image section to allow for only three images. I don't understand the variance I noted between the alt tags, and of course the missing image. I suspect the alt tag will tell us something, if I could get a little help.
June 14th, 2006, 11:16 AM
honestly dont know what to tell you. However you can ask mod questions in our modifications forums
The base code definately allows you to replace photos so it would appear your issue is with your modification to the code.
June 14th, 2006, 11:30 AM
Do you mean the template? I haven't touched the script. Just want to clarify this so I at least know where to look.
June 14th, 2006, 11:32 AM
Can't say as but as long as your only removing the image tags in the template you should be fine.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.