joshspies Posted April 9, 2015 Share Posted April 9, 2015 I'm having some troubles editing the footer of my website. What I want to do is to split it into thirds - the first third on the left will have some text in and links. The second third, in the middle, will be blank. Finally, the third third (hehe) will have some more text in. This is essentially to freshen up the stock layout. The most suitable thing that I thought to be was to use a table to achieve this. However, I am very confused at what is going wrong. Here is the section of my code in the file catalog>includes>languages>english.php define('FOOTER_TEXT_BODY', '<table border="0" style="width:100%">' '<td width="46%">Copyright © '' . date('Y') . ' <a href=" . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . </a></td>'' <td width="8%"></td> <td width="46%"><a href="http://localhost/oscommerce/oscommerce-2.3.4/catalog/shipping.php">Shipping & Returns</a> | <a href="http://localhost/oscommerce/oscommerce-2.3.4/catalog/privacy.php">Privacy</a> | <a href="http://localhost/oscommerce/oscommerce-2.3.4/catalog/conditions.php">Conditions of Use</a> | <a href="http://localhost/oscommerce/oscommerce-2.3.4/catalog/contact_us.php">Contact Us</a></td> </tr> <tr> <td>Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> <td></td> <td>Social Links Here</td> </tr></table>'?> Advice as to what I am doing wrong would be greatly appreciated. I am a newcomer to PHP, and as such I have little/no understanding of how it works. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 9, 2015 Share Posted April 9, 2015 ...and what is happening or going wrong? An image or link where the problem can be seen might be useful to anyone trying to help you out. Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
MrPhil Posted April 9, 2015 Share Posted April 9, 2015 I see some obvious problems. Is all this supposed to be defined as FOOTER_TEXT_BODY, or just part of it? The define would have to be in a PHP block, but the line immediately following is the start of a string. The define's second term ends at the ', but there is no closing ) or ;. You end the PHP block (which presumably started before the code you show), but the define statement is still open. What are you trying to do? At the very least, you're missing a "." at the end of the first line, to keep the second term of the define still going, and the define's closing ); before the ?>. Then you still have to output the defined term somewhere. Link to comment Share on other sites More sharing options...
joshspies Posted April 12, 2015 Author Share Posted April 12, 2015 ...and what is happening or going wrong? An image or link where the problem can be seen might be useful to anyone trying to help you out. Dan I'm currently getting this error: 'Parse error: syntax error, unexpected ''<td width="46%">Copyright &co' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\oscommerce\oscommerce-2.3.4\catalog\includes\languages\english.php on line 249' Link to comment Share on other sites More sharing options...
nigelt74 Posted April 12, 2015 Share Posted April 12, 2015 Thats exactly what mrPhil is saying basically you have your apostrophes in the wrong places and you are not closing the define Should be more something like this define('FOOTER_TEXT_BODY', '<table border="0" style="width:100%"> <td width="46%">Copyright © ' . date('Y') . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a></td> <td width="8%"></td> <td width="46%"><a href="http://localhost/osc...g.php">Shipping & Returns</a> | <a href="http://localhost/osc...php">Privacy</a> | <a href="http://localhost/osc...php">Conditions of Use</a> | <a href="http://localhost/osc...us.php">Contact Us</a></td> </tr> <tr> <td>Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> <td></td> <td>Social Links Here</td> </tr> </table>'); Link to comment Share on other sites More sharing options...
joshspies Posted June 15, 2015 Author Share Posted June 15, 2015 Thats exactly what mrPhil is saying basically you have your apostrophes in the wrong places and you are not closing the define Should be more something like this define('FOOTER_TEXT_BODY', '<table border="0" style="width:100%"> <td width="46%">Copyright © ' . date('Y') . ' <a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . STORE_NAME . '</a></td> <td width="8%"></td> <td width="46%"><a href="http://localhost/osc...g.php">Shipping & Returns</a> | <a href="http://localhost/osc...php">Privacy</a> | <a href="http://localhost/osc...php">Conditions of Use</a> | <a href="http://localhost/osc...us.php">Contact Us</a></td> </tr> <tr> <td>Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> <td></td> <td>Social Links Here</td> </tr> </table>'); Ok thanks, the amended code that you provided has worked. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.