Im trying to insert a 728x15 adsense text link on the submit page of my directory. http://www.fesu.net/submit.php. Right below the continue button. heres the tpl file for the submit page can someone tell me where the adsense code would go? {capture name="title"} - {l}Submit Link{/l}{/capture} {capture assign="in_page_title"}{l}Submit Link{/l}{/capture} {capture assign="description"}{l}Submit a new link to the directory{/l}{/capture} {include file="header.tpl"} {include file="top_bar.tpl"} {strip} <table width="746" border="0" align="center" cellpadding="0" cellspacing="3" class="mainbg"> <tr> <td width="177" valign="top">{include file="sidebar.tpl"}</td> <td width="560" valign="top">{if $error} <table width="100%" align="center"> <tr> <td colspan="2" class="err">{l}An error occured while saving the link.{/l} {if !empty($sqlError)} <p>{$sqlError}</p> {/if} </td> </tr> </table> {/if} {if $posted} <table width="100%" align="center"> <tr> <td colspan="2" class="msg">{l}Link submitted and awaiting approval.{/l} {l}Submit another link.{/l}</td> </tr> </table> {/if} <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><form method="post" action=""> {if count($price) gt 0} <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bars"> <tr> <td>Pricing</td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" style="margin-top: 10px;"> {if $price.featured} <tr> <td width="48%"> <input type="radio" name="LINK_TYPE" value="featured"{if $LINK_TYPE eq 'featured'} checked="true"{/if} /> {l}Featured links{/l}</td> <td width="42%">${$price.featured}</td> </tr> {/if} {if $price.normal gt 0} <tr> <td><input type="radio" name="LINK_TYPE" value="normal"{if $LINK_TYPE eq 'normal'} checked="true"{/if} /> {l}Regular links{/l}</td> <td>${$price.normal}</td> </tr> {elseif $price.normal eq 0} <tr> <td><input type="radio" name="LINK_TYPE" value="normal"{if $LINK_TYPE eq 'normal'} checked="true"{/if} /> {l}Regular links{/l}</td> <td>{l}free{/l}</td> </tr> {/if} {if $price.reciprocal gt 0} <tr> <td><input type="radio" name="LINK_TYPE" value="reciprocal"{if $LINK_TYPE eq 'reciprocal'} checked="true"{/if} /> {l}Regular links with reciprocal{/l}</td> <td>${$price.reciprocal}</td> </tr> {elseif $price.reciprocal eq 0} <tr> <td><input type="radio" name="LINK_TYPE" value="reciprocal"{if $LINK_TYPE eq 'reciprocal'} checked="true"{/if} /> {l}Regular links with reciprocal{/l}</td> <td>{l}free{/l}</td> </tr> {/if} {if isset($price.free)} <tr> <td><input type="radio" name="LINK_TYPE" value="free"{if $LINK_TYPE eq 'free'} checked="true"{/if} /> {l}Links with nofollow attribute{/l}</td> <td>free</td> </tr> {/if} </table> {validate form="submit_link" id="v_LINK_TYPE" message=$smarty.capture.field_link_type} {/if} <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bars"> <tr> <td>Submit Link</td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" style="margin-top: 10px;"> <tr> <td width="100" class="label"><span class='req'>*</span>{l}Title{/l}:</td> <td width="400" class="field"> <input type="text" name="TITLE" value="{$TITLE|escape|trim}" size="40" maxlength="255" class="input"/> {validate form="submit_link" id="v_TITLE" message=$smarty.capture.field_char_required} {validate form="submit_link" id="v_TITLE_U" message=$smarty.capture.title_not_unique} </td> </tr> <tr> <td class="label"><span class='req'>*</span>{l}URL{/l}:</td> <td class="field"> <input type="text" name="URL" value="{$URL|escape|trim}" size="40" maxlength="255" class="input"/> {validate form="submit_link" id="v_URL" message=$smarty.capture.invalid_url} {validate form="submit_link" id="v_URL_ONLINE" message=$smarty.capture.url_not_online} {validate form="submit_link" id="v_URL_U" message=$smarty.capture.url_not_unique} </td> </tr> <tr> <td valign="top" class="label"><span class='req'>*</span>{l}Description{/l}:</td> <td class="field"> <textarea name="DESCRIPTION" rows="3" cols="37" class="input">{$DESCRIPTION|escape|trim}</textarea> </td> </tr> <tr> <td class="label"><span class='req'>*</span>{l}Name{/l}:</td> <td class="field"> <input type="text" name="OWNER_NAME" value="{$OWNER_NAME|escape|trim}" size="30" maxlength="255" class="input" /> {validate form="submit_link" id="v_OWNER_NAME" message=$smarty.capture.field_char_required} </td> </tr> <tr> <td class="label"><span class='req'>*</span>{l}Email{/l}:</td> <td class="field"> <input type="text" name="OWNER_EMAIL" value="{$OWNER_EMAIL|escape|trim}" size="30" maxlength="255" class="input" /> {validate form="submit_link" id="v_OWNER_EMAIL" message=$smarty.capture.invalid_email} </td> </tr> <tr> <td class="label"><span class='req'>*</span>{l}Category{/l}:</td> <td class="field"> {html_options options=$categs selected=$CATEGORY_ID name="CATEGORY_ID"} {validate form="submit_link" id="v_CATEGORY_ID" message=$smarty.capture.no_url_in_top} </td> </tr> <tr> <td valign="top" class="label">{if $recpr_required}<span class='req'>*</span>{/if}{l}Reciprocal URL{/l}:</td> <td class="field"> <input type="text" name="RECPR_URL" value="{$RECPR_URL|escape|trim}" size="40" maxlength="255" class="input" /> {validate form="submit_link" id="v_RECPR_URL" message=$smarty.capture.invalid_url} {validate form="submit_link" id="v_RECPR_ONLINE" message=$smarty.capture.url_not_online} {validate form="submit_link" id="v_RECPR_LINK" message=$smarty.capture.recpr_not_found|replace:'#SITE_URL#':$smarty.const.SITE_URL} <br /> <p class="small">{l}To validate the reciprocal link please include the<br /> following HTML code in the page at the URL<br /> specified above, before submiting this form:{/l}</p> <textarea name="RECPR_TEXT" rows="3" readonly="readonly" cols="37" class="input"><a href="{$smarty.const.SITE_URL}">{$smarty.const.SITE_NAME}</a></textarea> </td> </tr> {if $smarty.const.VISUAL_CONFIRM} <tr> <td valign="top" class="label"><span class='req'>*</span>{l}Enter the code shown{/l}:</td> <td class="field"> <input type="text" name="CAPTCHA" value="" size="10" maxlength="5" class="input" /> {validate form="submit_link" id="v_CAPTCHA" message=$smarty.capture.invalid_code}<br /> <p class="small">{l}This helps prevent automated registrations.{/l}</p> <img src="{$smarty.const.DOC_ROOT}/captcha.php" class="captcha" alt="{l}Visual Confirmation Security Code{/l}" title="{l}Visual Confirmation Security Code{/l}" /> </td> </tr> {/if} <tr> <td height="50"></td> <td height="50"><input type="submit" name="submit" value="{l}Continue{/l}" class="btn" /></td> </tr> </table> </form></td> </tr> </table></td> </tr> </table></td> </tr> </table> {include file="footer.tpl"} {/strip}
The PHP Page is pretty much just a HTML Page with some PHP tags. The Continue button would be the 10th line counting from the bottom up. Just adding the Javascript from Adsense anywhere after the above-stated code would do the trick. Something like should do the trick
Yes thats where i tried putting it before i posted. I figured thats where it should be but when i save the template the adsense doesnt even show up? But when i view the page source its on there.
Did you add {literal} and {/literal} around the adsense code - I think you need to in a tpl file see http://www.phplinkdirectory.com/kb/Design/page_1/How_to_Add_Adsense.html cheers
Heres the code i input but now as you can see it shows up weird: <tr> <td height="50"></td> <td height="50"><input type="submit" name="submit" value="{l}Continue{/l}" class="btn" /> <p>{literal}<script type="text/javascript"><!-- google_ad_client = ""; google_ad_width = 468; google_ad_height = 15; google_ad_format = "468x15_0ads_al"; //2007-05-12: fesusubmit google_ad_channel = "0696670757"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>{/literal}<BR> </td> </tr> </table> </form></td> </tr> </table></td> </tr> </table></td> </tr> </table> {include file="footer.tpl"} {/strip}
It seems its working now. Make it aligned to central. The "Ads by Google" will distract users and will be clear its an add
just use <left> whatever your code was there before </left> else use <center>whatever code was there </center>
heres the code i used tried center and left but still nothing changed <p>{literal}<left><script type="text/javascript"><!-- google_ad_client = " google_ad_width = 468; google_ad_height = 15; google_ad_format = "468x15_0ads_al"; //2007-05-12: fesusubmit google_ad_channel = "0696670757"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </left></script>{/literal}<BR> </td>
First of all. I would say remove our pub id of adsense from there. You should not let it out. I use the same as yours above but i am not sure why its not showing for you. Guess thats a css problem. We can wait till somebody replies back