ComicWisdom Posted October 16, 2006 Posted October 16, 2006 It took me 3 days to solve this, but it's solved. However, I would still like to reverse the effect (read that comment out the code), so if someone out there could tell me "Why?" this causes the following result, I would be eternally grateful. To me it looks like a perfectly legal, absolutely viable, and standardly standard construction. If I do this... </tr> <tr> <!-- <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> //--> </tr> or this... <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> //--> I get this.... If I take the commenting out like this.... <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> I get this.... The question is "Why"????? Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
DarrenJMcCabe Posted October 16, 2006 Posted October 16, 2006 isnt the end of the comment meant to be --> ?
ComicWisdom Posted October 16, 2006 Author Posted October 16, 2006 isnt the end of the comment meant to be --> ? The more standard use is: //--> Scan through your .php files. Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
♥Monika in Germany Posted October 16, 2006 Posted October 16, 2006 if you open your included modules file, you will see that it has html commenting also. You are stating a comment in index.php but it's closed in the modules file already ... you may have removed the top comment <!-- new_products //--> from your file already (and thus not showing the new products, only the offending comment characters) or if you have a vanilla file, you will see the comment characters in addition to the module below. This is very common with html commenting ... i never use it for two reasons. 1) see above 2) if you view the source code, all your php code will show. I cannot stand to have my php code which can contain info that is sensitive out in the world ... use php commenting instead like here: <?php /* <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td></tr> */ ?> :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
ComicWisdom Posted October 16, 2006 Author Posted October 16, 2006 if you open your included modules file, you will see that it has html commenting also. You are stating a comment in index.php but it's closed in the modules file already ... you may have removed the top comment <!-- new_products //--> from your file already (and thus not showing the new products, only the offending comment characters) or if you have a vanilla file, you will see the comment characters in addition to the module below. This is very common with html commenting ... i never use it for two reasons. 1) see above 2) if you view the source code, all your php code will show. I cannot stand to have my php code which can contain info that is sensitive out in the world ... use php commenting instead like here: <?php /* <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td></tr> */ ?> First Effort... Guess I have to go back to the includes/modules file??!!## Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
Guest Posted October 16, 2006 Posted October 16, 2006 <?php /* <tr><td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td></tr> */ ?> Hmm, doesn't seem quite right. The <tr><td> are being enclosed in php tags. Looking back at your original code the above doesn't seem right. Try: <tr><td><?php /*include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);*/ ?></td></tr>
♥Monika in Germany Posted October 16, 2006 Posted October 16, 2006 Steve, no, my code is correct and yours leaves him with an empty cell/space. Ralph, if you have extra /* ... */ comments in your included file that can cause issues. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
ComicWisdom Posted October 16, 2006 Author Posted October 16, 2006 Hmm, doesn't seem quite right. The <tr><td> are being enclosed in php tags. Looking back at your original code the above doesn't seem right. Try: <tr><td><?php /*include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);*/ ?></td></tr> Thank you!!!! That worked!!!! Although I still believe that Monika is right that I have an error or comment-out in another file that is exacerbating the problem. I have replaced this index.php with one from a store that worked perfectly and continued to get the error. Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!! Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience. The quickest way to learn is to forget to BACKUP!
Guest Posted October 16, 2006 Posted October 16, 2006 Steve, no, my code is correct and yours leaves him with an empty cell/space. Aye, right you are. I am no 'genuis' just a 4 week PHP newbie. :P The table tags threw me; couldn't understand why that whole code block would be wrapped in external PHP tags. :blush: :)
♥Monika in Germany Posted October 16, 2006 Posted October 16, 2006 Steve, I think it's very cool that you are answering posts altready here. The design element is just a major issue often when you try to recreate a photoshop file and get empty spacer rows. In the above case I would have manually removed the code, hehe. Or set 3 commenting stages, one beore, one around (like you did) and one after the include to cover the cell elements. Ok who am I kidding, I would have just deleted the whole block. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Guest Posted October 16, 2006 Posted October 16, 2006 Ok who am I kidding, I would have just deleted the whole block. LOL! When I first started programming I used to comment out everything. No I just delete wholesale and rely on either backups or version control to get me out of any trouble. :D
Recommended Posts
Archived
This topic is now archived and is closed to further replies.