pippi Posted October 22, 2005 Share Posted October 22, 2005 Hey, Have previously used this code to make pictures change depending on the language... if ($languages_id == "1") { $image = "logo.jpg"; } elseif ($languages_id == "2") { $image = "logo3.jpg"; } else { $image = "logo.jpg"; } and then where the pic is... <img src="images/<? echo "$image"; ?> Now I want to make the column_left.php change and have been given the following code... if ($languages_id == "1") { include('includes/column_left.php'); } elseif ($languages_id == "4") { includes('column_left2.php'); } else { include('includes/column_left.php); } But I do not know how to change the rest... Have been experimenting a bit but cannot make it work! Also not entirely sure where to place the code... Is there anyone that could help me with this? Would be grateful!! Cheers, Filip Link to comment Share on other sites More sharing options...
niknakgroup Posted October 22, 2005 Share Posted October 22, 2005 OK, for starters you have redundant coding in here: if ($languages_id == "1") { include('includes/column_left.php'); } elseif ($languages_id == "4") { includes('column_left2.php'); } else { include('includes/column_left.php); } Try instead: if ($languages_id == "4") { include('includes/column_left2.php'); } else { include('includes/column_left.php); } This portion of code should go onto every page within your catalog directory INSTEAD of the current portion of code which simply says: include(' . DIR_WS_INCLUDES . column_left.php'); That should get you started - try putting it on a non-essential page first to ensure it works before applying to the whole site, and as always MAKE SURE YOU BACKUP FIRST so if I am completely off the mark you still have a fallback position! Good luck Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem.... Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums..... if (stumped == true) { return(square_one($start_over) } else { $random_query = tep_fetch_answer($forum_query) } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.