bnovak Posted June 13, 2010 Share Posted June 13, 2010 Does anyone have any experience with Easysearch directory that can lend a hand? I'm lost in this smarty tags world of html templates & php. I got most of the site working correctly, but would like to add the google translate bar. Problem is - if I add it to the html template where I want it, the page goes to white. I think it has to do with the <div> tags? I've tried to work it backwards, create a .js just for the google code, and call it with the {$javascript_translate} (I called the file translate.js) - nothing seems to work. (but again I don't exactly know what I'm doing here..... ) i'm trying to get this code <div id="google_translate_element"></div><script> function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', includedLanguages: 'es' }, 'google_translate_element'); } </script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> to work inside this code (this is the html template file) - look for the string of XXXXXXXX's - that's where I'd like this thing to end up. <head><link rel="shortcut icon" type="image/x-icon" href="http://www.portlandquinceanera.com/images/favicon.ico"></head> <tr> <td> </td> <td colspan="5"> <table width="100%" cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td colspan="3" bgcolor="#E92727" height="6"><img src="images/spacer.gif" border="0" width="1" height="1"></td> </tr> <tr> <td colspan="3" background="images/bg_topblue.gif" height="54"> <table cellpadding="0" cellspacing="0" border="0" class="normal_12_black"> <tr> <td width="80%"> {if $clogin_member != ""} <table width="80%" cellpadding="0" cellspacing="0" border="0" class="normal_12_black"> <tr> <td> <table cellpadding="2" cellspacing="0" border="0" class="normal_12_black"> <tr> <td valign="middle"><strong>MY ACCOUNT : </strong></td> <td valign="middle"><a href="member_profile.php" class="normal_12_red">My Profile</a></td> <td valign="middle"> | </td> <td valign="middle"><a href="member_listing.php" class="normal_12_red">My Business Listings</a></td> <td valign="middle"> | </td> <td valign="middle"><a href="member_favourite.php" class="normal_12_red">My Favorite Listings</a></td> <td valign="middle"> | </td> <td valign="middle"><a href="system_member_logout.php" class="normal_12_red">Logout</a></td> </tr> </table> </td> <td align="right" class="normal_12_blue_verdana"><strong>Welcome, <u>{$clogin_member_firstname} {$clogin_member_lastname}</u>!</strong></td> </tr> </table> {else} <img src="images/spacer.gif" border="0" width="100%" height="1"> {/if} </td> <td width="20%"> <form action="site_search.php" method="get" style="margin:0px"> <table cellpadding="2" cellspacing="0" border="0" class="normal_12_black"> <tr> <td valign="middle"><strong>FIND BUSINESS</strong></td> <td valign="middle"><input type="text" name="search_keyword" value="" style="width:120px" class="textbox"></td> <td valign="middle"><input type="image" src="images/icon_search.gif" vspace="2"></td> </tr> </table> </form> </td> <td width="230" align="right"> <br> </td> <td width="20"><img src="images/spacer.gif" border="0" width="1" height="1"></td> </tr> </table> </td> </tr> <tr> <td colspan="3" bgcolor="#FFFFFF" height="3"><img src="images/spacer.gif" border="0" width="1" height="1"></td> </tr> <tr> <td colspan="3" > <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><img src="http://www.portlandquinceanera.com/images/large_banner.jpg" border="0"></td> <td><a href="member_register.php"><img src="images/picture_right.gif" width="201" height="240" border="0"></a></td> </tr> </table> </td> </tr> <tr> <td colspan="5" bgcolor="#FFFFFF" height="3"><img src="images/spacer.gif" border="0" width="1" height="1"></td> </tr> <tr> <td colspan="3"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="1%" align="left" style="height: 37px"><img src="images/nav_left.gif" width="20" height="37"></td> <td background="images/nav_bg_blue.gif" style="width: 100%; height: 37px;"> <table cellspacing="0" cellpadding="0" class="normal_12_white_verdana" align="center"> <tr> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="100" align="center" class="{$nav_class_home}" onclick="location.href='index.php'"> <a href="index.php" class="normal_12_blue_verdana"><strong>Home</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="100" align="center" class="{$nav_class_about}" onclick="location.href='site_about.php'"> <a href="site_about.php" class="normal_12_blue_verdana"><strong>The Party</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="150" align="center" class="{$nav_class_calendar}" onclick="location.href='site_calendar.php'"> <a href="site_calendar.php" class="normal_12_blue_verdana"><strong>Events Calendar</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="150" align="center" class="{$nav_class_account}" onclick="location.href='member_login.php'"> <a href="member_login.php" class="normal_12_blue_verdana"><strong>My Account</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="100" align="center" class="{$nav_class_contact}" onclick="location.href='site_contact.php'"> <a href="site_contact.php" class="normal_12_blue_verdana"><strong>Contact Us</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td width="150" align="center" class="{$nav_class_terms}" onclick="location.href='site_terms.php'"> <a href="site_terms.php" class="normal_12_blue_verdana"><strong>Terms of Use</strong></a> </td> <td><img src="images/nav_divider.gif" width="2" height="37"></td> <td> XXXXXXXXXXXXXXXXXXXXXXX Google Translater Here XXXXXXXXXXXXXXXX </td> </tr> </table> </td> <td width="1%" align="right" style="height: 37px"><img src="images/nav_right.gif" width="20" height="37"></td> </tr> </table> </td> </tr> <tr> <td colspan="2" bgcolor="#FFFFFF" height="3"><img src="images/spacer.gif" border="0" width="1" height="1"></td> </tr> </table> </td> <td> </td> </tr> and, here's the php file that is associated with the html template.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>{$meta_title}</title> <meta http-equiv="Content-Type" content="text/html; charset={$meta_encoding}"> <meta name="keywords" content="{$meta_keyword}"> <meta name="description" content="{$meta_description}"> {$javascript_rightclick} <script language="javascript" type="text/javascript" src="javascript.js"></script> <link href="class.css" type="text/css" rel="stylesheet"> </head> <body> <table cellpadding="0" cellspacing="0" border="0" align="center"> <!-- global_top.html --> {include file="global_top.html"} <!-- global_top.html --> <tr> <td width="10"><img src="images/spacer.gif" border="0" width="10" height="1"></td> <td valign="top"> <!-- global_left.html --> {include file="global_left.html"} <!-- global_left.html --> </td> <td width="5"><img src="images/spacer.gif" border="0" width="5" height="1"></td> <td valign="top"> <!-- center for content --> <table cellpadding="0" cellspacing="0" border="0" align="center"> <tr> <td><img src="images/center_left_top.gif" width="10" height="6"></td> <td background="images/center_hor_top.gif"><img src="images/spacer.gif" width="1" height="1"></td> <td><img src="images/center_right_top.gif" width="10" height="6"></td> </tr> <tr> <td width="10" background="images/center_ver_left.gif"><img src="images/spacer.gif" width="1" height="1"></td> <td width="560" height="650" valign="top" style="padding-left:5px; padding-right:5px; padding-top:20px; padding-bottom:20px"> <table width="560" cellpadding="0" cellspacing="0" class="normal_12_black" border="0"> <tr> <td><font class="title_large">Welcome to The Quinceanera Directory!</font></td> </tr> <tr> <td height="20"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td> .<strong>....where you can find listings for all things Quince! We have bakeries for quinceanera cakes, where to find the perfect quinceanera dress, event spaces and rentals, even where to get your hair and makeup done</strong>! </td> </tr> <!-- the tab --> <tr> <td height="30"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="28" background="images/bg_tab.gif" style="background-repeat:no-repeat; padding-left:28px; padding-top:5px" class="normal_12_blue_verdana" valign="top"> <strong>Find a business in our directory</strong> </td> </tr> <!-- the tab --> <tr> <td> <table cellpadding="5" cellspacing="0" border="0" class="normal_12_black"> <tr> <td colspan="2" height="5"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td colspan="2" valign="top" style="padding-left:28px"> <form action="site_search.php" method="get" style="margin:0px"> <table cellpadding="2" cellspacing="0" class="normal_12_black"> <tr> <td colspan="7"> You can easily search our directory here. If you want to do search by radius, please enter the zipcode and choose the distance ... </td> </tr> <tr> <td height="5" colspan="6"><img src="images/spacer.gif" width="28" height="1"></td> </tr> <tr> <td><strong>Category</strong> </td> <td><strong>:</strong></td> <td> <select name="search_cat" style="width:265px" class="textbox_home"> <option value="0">Any Categories</option> {section name=var loop=$search_cat_id} <option value="{$search_cat_id[var]}" {if $search_cat == $search_cat_id[var]} selected {/if}>{$search_cat_name[var]}</option> {/section} </select> </td> <td width="10"> </td> <td><strong>ZIP Code</strong></td> <td><strong>:</strong></td> <td><input type="text" name="search_zip" value="{$search_zip}" style="width:95px" class="textbox_home"></td> </tr> <tr> <td><strong>Keyword</strong></td> <td><strong>:</strong></td> <td><input type="text" name="search_keyword" value="{$search_keyword}" style="width:260px" class="textbox_home"></td> <td width="10"> </td> <td><strong>Radius / Range</strong> </td> <td><strong>:</strong></td> <td> <select name="search_distance" style="width:100px;" class="textbox_home"> {section name=var loop=$search_distance_value} <option value="{$search_distance_value[var]}" {if $search_distance == $search_distance_value[var]} selected {/if} >{$search_distance_name[var]}</option> {/section} </select> </td> </tr> <tr> <td></td> <td></td> <td><input type="submit" value="Search" style="width:96px"></td> </tr> </table> </form> </td> </tr> </table> </td> </tr> <!-- some highlights here --> <tr> <td height="30"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="28" background="images/bg_tab.gif" style="background-repeat:no-repeat; padding-left:28px; padding-top:5px" class="normal_12_blue_verdana" valign="top"> <strong>New Businesses in Our Directory</strong> </td> </tr> <!-- some highlights here --> <tr> <td height="15"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="normal_12_black"> {section name=var loop=$listing_id} <tr> <td height="10" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td width="28"><img src="images/spacer.gif" width="28" height="1"></td> <td width="470" valign="bottom" style="padding-right:20px"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="normal_11_black"> <tr> <td colspan="4"> <a href="{$listing_url[var]}" class="normal_12_blue_verdana"><strong>{$listing_title[var]}</strong></a> </td> </tr> <tr> <td colspan="4" class="normal_12_black"> {$listing_brief_desc[var]} </td> </tr> <tr> <td height="10" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td><a href="{$listing_url_contact[var]}" class="normal_11_red"><img src="images/mail.png" hspace="5" vspace="0" border="0" align="left"><strong>Email</strong></a></td> <td><a href="{$listing_url[var]}" class="normal_11_red"><img src="images/zoom-in.png" hspace="5" vspace="0" border="0" align="left"><strong>Details</strong></a></td> {if $show_distance == "yes"} <td><strong>Distance :</strong> <font class="normal_11_red">15 miles</font></td> {/if} <td align="right"> {if $listing_rating[var]} <img src="images/pic_star{$listing_rating[var]}.gif" width="83" height="13"> {else} <img src="images/spacer.gif" width="83" height="1"> {/if} </td> </tr> </table> </td> <td width="120"> <table bgcolor="#FFFFFF" border="0" cellpadding="2" cellspacing="0" style="border:0px solid #bf0000" class="list_picture_status"> <tr> <td width="{$photo_width_thumb}" height="{$photo_height_thumb}" align="center" valign="middle"><a href="{$listing_url[var]}"><img src="photo_view_logo.php?listing={$listing_id[var]}" border="0"></a></td> </tr> </table> </td> </tr> <tr> <td height="15" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> {if $listing_rank[var] < $front_home_rows} <tr> <td bgcolor="#A3CAF1" height="1" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> {/if} {/section} <tr> <td height="20" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td> </tr> </table> <script type="text/javascript"><!-- google_ad_client = "pub-0764369212254213"; /* shopping directory banner ad */ google_ad_slot = "2896103409"; google_ad_width = 468; google_ad_height = 60; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><div> </div> </td> </tr> </table> </td> <td width="10" background="images/center_ver_right.gif"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td><img src="images/center_left_bottom.gif" width="10" height="6"></td> <td background="images/center_hor_bottom.gif"><img src="images/spacer.gif" width="1" height="1"></td> <td><img src="images/center_right_bottom.gif" width="10" height="6"></td> </tr> </table> <!-- center for content --> </td> <td width="5"><img src="images/spacer.gif" border="0" width="5" height="1"></td> <td valign="top"> <!-- global_right.html --> {include file="global_right.html"} <!-- global_right.html --> </td> <td width="10"><img src="images/spacer.gif" border="0" width="10" height="1"></td> </tr> <!-- global_bottom.html --> {include file="global_bottom.html"} <!-- global_bottom.html --> </table> </body> </html> any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/204627-easysearch-directory-smarty-tags-javascript-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.