News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Pop up install

Started by Media-Bay, October 23, 2014, 11:34:36 AM

Previous topic - Next topic

Media-Bay

I need help,

i  have a code from a comapany i use for my advertisment for a moblie pop up code they say i need to input it into my source code index under head but i not sure where this is when useing fillezilla to access files.

My theme is cleantek by crip.

Can anyone point me in the right direction many thanks

kat

I **think** it needs to go after the <head>'; tag, in a theme's index.template.php.

Quit where, depends on where it needs to appear.

Media-Bay

Thats what i thought but everytime i put it in there it makes my website inactive and display error everytime i try to access website.


kat

Pure guess...

Look for this:

// Custom banners and shoutboxes should be placed here, before the linktree.

Try sticking it right under that.

Kindred

k@...   we should never tell someone to just paste code into the file...   because, if they are asking, it means that they don't understand php at all... and invariably, they paste code without taking into account escaped quotes and echo statements...

that's why things like the global headers and the ad manager mods work wonders for those folks...  :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

I was just relating what I'd do. (Although, I'd use a portal block, myself)

'course, if I knew what the code actually is, I'd have a better chance! :)

Media-Bay

To confirm... 

Custom banners and shoutboxes should be placed here, before the linktree. does to appear in my index.templete.php under my theme.

I do understand the basic's php and script, i am just trying to find the right location on where a pop up add code would need to be placed as i have never done this before and tried what i know with no such luck.


kat

Oh, joy...

Well, the line below that, in the same file for the default theme, is:

// Show the navigation tree.

Might be worth trying to put your code on the line just before that...

Media-Bay

#8
Sadley no such luck every time i put the code in it makes website inactive and gives me this as a error.

QuoteTemplate Parse Error!
There was a problem loading the /Themes/cleantek_20g/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.
syntax error, unexpected '<'

I input this code which was given to me by my ad company, and they said to paste in in my indextemplate.php in my theme under head which also gives me the same error code.

<!-- Start JuicyAds Mobile -->
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jam_min.js"></script>
<script type="text/javascript">window.onload=check_mobile(57815,110445)</script>
<!-- End JuicyAds Mobile -->
<!-- Begin JuicyAds PopUnder Code -->
<script type="text/javascript">juicy_code='74c423v2u256r2p2o2a413a4';</script>
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jac.js" charset="utf-8"></script>
<!-- End JuicyAds PopUnder Code -->


I have tryed installing the ad management mod and input the code in there and selecting show at top of every page but no luck there either.


kat

Hmmmm... I tried that script in various places and I always get this:

Parse error: syntax error, unexpected '<' in //public_html/Themes/Night_sky_2/index.template.php on line x

Which points to the first line. I get it when I remove that line, too.

Kindred

There is an unescaped quote in that code you cannot have single quotes in the JavaScript in the SMS code unless you  escape them
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Media-Bay

#11
So is there now way around this then?

If i just use this code..

<!-- Begin JuicyAds PopUnder Code -->
<script type="text/javascript">juicy_code='74c423v2u256r2p2o2a413a4';</script>
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jac.js" charset="utf-8"></script>
<!-- End JuicyAds PopUnder Code -->


An remove the moblie code with that work then do you think?

Kindred

first...  please use CODE tags rather than quote tags.

second... I told you, the code that you have there has unescaped single quotes....   you can not use unespecaped single quotes within a php echo statement that is defined by single quotes...

third... (just got back to a real computer - doing this on mobile would be a pain, which is why I did not do it before)


<!-- Start JuicyAds Mobile -->
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jam_min.js"></script>
<script type="text/javascript">window.onload=check_mobile(57815,110445)</script>
<!-- End JuicyAds Mobile -->
<!-- Begin JuicyAds PopUnder Code -->
<script type="text/javascript">juicy_code="74c423v2u256r2p2o2a413a4";</script>
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jac.js" charset="utf-8"></script>
<!-- End JuicyAds PopUnder Code -->

try that...

or maybe

<!-- Start JuicyAds Mobile -->
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jam_min.js"></script>
<script type="text/javascript">window.onload=check_mobile(57815,110445)</script>
<!-- End JuicyAds Mobile -->
<!-- Begin JuicyAds PopUnder Code -->
<script type="text/javascript">juicy_code=\'74c423v2u256r2p2o2a413a4\';</script>
<script type="text/javascript" src="http://ads.juicyads.com/jsclients/jac.js" charset="utf-8"></script>
<!-- End JuicyAds PopUnder Code -->
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: