Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: tylerd213 - helmikuu 28, 2005, 04:58:23 IP

Otsikko: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 04:58:23 IP
How do i putt a add right under the info box  (just above the search box) Im not good with html so i dont know where to put it  :(  I would really appreciate the help ;)

Here is the code i need to add

<center><script language='JavaScript' type='text/javascript' src='http://x10hosting.com/advert/adx.js'></script>

<script language='JavaScript' type='text/javascript'>
<!--
    if (!document.phpAds_used) document.phpAds_used = ',';
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
    document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
       document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://x10hosting.com/advert/adclick.php?n=a1dbc885' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a1dbc885' border='0' alt=''></a></noscript></center>

Thanks,

Tyler
Otsikko: Re: I blues theme help
Kirjoitti: Oldiesmann - helmikuu 28, 2005, 06:07:26 IP
index.template.php

Find
echo '
</td></tr></table>
</div>

Add it right after that.
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 06:14:45 IP
when i do that then try to access the forum it says:

Template Parse Error!
There was a problem loading the /Themes/iblue/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
Otsikko: Re: I blues theme help
Kirjoitti: Oldiesmann - helmikuu 28, 2005, 06:19:39 IP
Ok... Didn't see all those ticks (the "techy term" for a single quote mark) in the JavaScript... hang on...

Try this code instead:

<center><script language="JavaScript" type="text/javascript" src="http://x10hosting.com/advert/adx.js"></script>

<script language="JavaScript" type="text/javascript">
<!--
    if (!document.phpAds_used) document.phpAds_used = ",";
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
    document.write ("<" + \'script language="JavaScript" type="text/javascript" src="\');
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
       document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
//-->
</script><noscript><a href="http://x10hosting.com/advert/adclick.php?n=a1dbc885" target="_blank"><img src="http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a1dbc885" border="0" alt=""></a></noscript></center>
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 06:29:21 IP
Still not working do here is the code closest to it to see if im doing it right Thanks for ur help


   echo '
                  </td></tr></table>
               </div><center><script language="JavaScript" type="text/javascript" src="http://x10hosting.com/advert/adx.js"></script>

<script language="JavaScript" type="text/javascript">
<!--
    if (!document.phpAds_used) document.phpAds_used = ",";
    phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   
    document.write ("<" + \'script language="JavaScript" type="text/javascript" src="\');
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
       document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");
//-->
</script><noscript><a href="http://x10hosting.com/advert/adclick.php?n=a1dbc885" target="_blank"><img src="http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a1dbc885" border="0" alt=""></a></noscript></center>


               <form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 7px;">
                  <b>', $txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex;" />&nbsp;
                  <a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
                  <input type="hidden"
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 06:38:49 IP
also when i click on Access this file directly it says :

Parse error: parse error, unexpected '<' in /home/ts2e/public_html/smf/Themes/iblue/index.template.php on line 246
Otsikko: Re: I blues theme help
Kirjoitti: Oldiesmann - helmikuu 28, 2005, 06:53:57 IP
Can you post line 246 and a few lines above and below it?
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 06:57:11 IP
  document.write ("<" + \'script language="JavaScript" type="text/javascript" src="\');
    document.write ("http://x10hosting.com/advert/adjs.php?n=" + phpAds_random);
    document.write ("&amp;what=zone:1&amp;target=_blank");
    document.write ("&amp;exclude=" + document.phpAds_used);
    if (document.referrer)
       document.write ("&amp;referer=" + escape(document.referrer));
    document.write ("'><" + "/script>");   --LINE 246--
//-->
</script><noscript><a href="http://x10hosting.com/advert/adclick.php?n=a1dbc885" target="_blank"><img src="http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a1dbc885" border="0" alt=""></a></noscript></center>


               <form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 7px;">
                  <b>', $txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex;" />&nbsp;
                  <a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
                  <input type="hidden" name="advanced" value="0" />';

   // If we're on a certain board, limit it to this board ;).
Otsikko: Re: I blues theme help
Kirjoitti: Oldiesmann - helmikuu 28, 2005, 07:03:33 IP
Get rid of the ' after the ( on line 246
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - helmikuu 28, 2005, 07:11:23 IP
Ok got the ad working :) but the rest of the forum is not showing up :'( here is the site http://ts2e.x10hosting.com/smf

Here is the code  from the very end of the add to where the forum should start is there anything wrong with it?

</script><noscript><a href="http://x10hosting.com/advert/adclick.php?n=a1dbc885" target="_blank"><img src="http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a1dbc885" border="0" alt=""></a></noscript></center>  END ADD CODE

<form action="', $scripturl, '?action=search2" method="post" style="margin: 0; margin-top: 7px;">
                  <b>', $txt[182], ': </b><input type="text" name="search" value="" style="width: 190px;" />&nbsp;
                  <input type="submit" name="submit" value="', $txt[182], '" style="width: 8ex;" />&nbsp;
                  <a href="', $scripturl, '?action=search;advanced">', $txt['smf298'], '</a>
                  <input type="hidden" name="advanced" value="0" />';
Otsikko: Re: I blues theme help
Kirjoitti: tylerd213 - maaliskuu 01, 2005, 04:25:18 IP
can anyone help,Thanks :D