![]() |
Subcategory Display in 3.1.3a
I'm looking at main/subcategories.tpl and I can't figure out what line 7 does or means....
Code:
[img]../icon.php?categoryid={$cat}[/img] Is this garbage or does it actually do something? I've never seen an img src set equal to a php page and I can't even find the php page being referenced. Could someone enlighten me? Does this have something to do with that "browse" button at the top of my "modify category" page. I'd like to have icons for various categories, but can't figure out if this functionality already exists in the cart or not. |
Hi,
This setting calls thephp file to process the catalogue image, I think this line calls the php script to produce the "No image available" icon for this item. It will produce the "default image icon" for catalogue items without images. Regards, |
img src calling php question
This is actually a pretty trick way of getting the image. The "img src" tag is expecting an argument of an image file. The image will be the results of the execution of /xcart/icon.php (at the very top level back in the 3.1.x versions). The icon.php program makes a call to the icon table in the database using the value passed in "categoryid". The resulting image is then returned to the "img src" tag, which is none the wiser that the image was extracted out of the database. Minorgod was right on the mark, with the returning of a "default image" if no match can be found in the icon database.
Hope this helps. |
All times are GMT -8. The time now is 05:21 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.