Page 48 of 52

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 10:38 am
by martti
tony kiteboarder wrote:Thanks for your reply.
I tried what you suggested, I wanted it in overall_header_navbar_before
so i created a file with that name (.html) and added the code above, but it just displays the code?
I guess I'm missing something!

Many thanks

Tony
Normally it should work. Your code is inside <code> tags or something?

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 11:24 am
by tony kiteboarder
Its just displaying the code, I cant try anything until later, but maybe chnaging this would work

so now I have

Code: Select all

<!--/*
  *
  * Revive Adserver Asynchronous JS Tag
  * - Generated with Revive Adserver v3.2.1
  *
  */-->

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>
move to this...

Code: Select all

<!--/*
  *
  * Revive Adserver Asynchronous JS Tag
  * - Generated with Revive Adserver v3.2.1
  *
  *

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>/-->
its now all inside

Code: Select all

<!--/ ............/-->
Many thanks

Tony

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 11:30 am
by tony kiteboarder
may be better to use the local mode code

Code: Select all

<?php
  //<!--/*
  *
  * Revive Adserver Local Mode Tag
  * - Generated with Revive Adserver v3.2.1
  *
  */-->

  // The MAX_PATH below should point to the base of your Revive Adserver installation
  define('MAX_PATH', '/var/www/vhosts/kiteboarder.co.uk/httpdocs/revive');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    // function view_local($what, $zoneid=0, $campaignid=0, $bannerid=0, $target='', $source='', $withtext='', $context='', $charset='')
    $phpAds_raw = view_local('', 1, 0, 0, '', '', '0', $phpAds_context, '');
  }
  echo $phpAds_raw['html'];
?>

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 11:33 am
by martti
The code should certainly not be inside a html comment. You can leave out the comment alltogether. So the inserted code becomes:

Code: Select all

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 2:59 pm
by cece74
No works for 3.1.8?
thanks

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 6:02 pm
by tony kiteboarder
martti wrote:The code should certainly not be inside a html comment. You can leave out the comment alltogether. So the inserted code becomes:

Code: Select all

<ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins>
<script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script>
Its not working1 The process is working as the text is showing up after I purge the cache

can be seen on my forum

http://www.kiteboarder.co.uk/kitesurfing/index.php

Many thanks

Tony

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 6:15 pm
by Solidjeuh
I tried this, and added the code to overall_footer
And don't see the code, so I guess it works, you must be doing something wrong

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 6:19 pm
by tony kiteboarder
Did you see an image?

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 6:36 pm
by tony kiteboarder
its very frustrating!
I was running 3.1.5 since last year and had several banners running on the site using custom code
So I installed another 3.1.5 board so I could reuse the custom code ext and now thats not working either. Trying to retrace my steps, but failing at that as well
Upgrading to 3.1.8 at weekend has kicked my arse!

Many thanks

Tony

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 7:47 pm
by tony kiteboarder
Hi

I'm doing something very wrong here!
I just tested using the "Use case: Message on the contact page" example shown on the first page of this thread
Tried it on a 3.1.5 board (which Im running to test the old custom code extension) and used insert template code and it doesn't work, nothing showing
Tried it in 3.1.8 and I can see the text in the .html file
I'm editing the files on a mac in text edit and it asks me if I want to overwrite the formatting, so not sure if I'm screwing something up as it just looks like a regular text file
Really can't think of anything else so going for a pint of fine lager at my local pub

Many thanks

Tony

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 9:44 pm
by martti
You just need to use a plain text editor. Not something that converts your text into a html page.

http://stackoverflow.com/questions/6758 ... eb-browser

This is what your inserted text looks like at the moment:

Code: Select all

		<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1404.11">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 12.0px Monaco; color: #2f8b57; -webkit-text-stroke: #2f8b57}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 16.0px; font: 12.0px Monaco; color: #2f8b57; -webkit-text-stroke: #2f8b57; min-height: 16.0px}
    span.s1 {font-kerning: none}
  </style>
</head>
<body>
<p class="p1"><span class="s1"><ins data-revive-zoneid="1" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins></span></p>
<p class="p1"><span class="s1"><script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script></span></p>
<p class="p1"><span class="s1"><!--/*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>* Revive Adserver Asynchronous JS Tag</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>* - Generated with Revive Adserver v3.2.1</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*</span></p>
<p class="p1"><span class="s1"><span class="Apple-converted-space">  </span>*/--></span></p>
<p class="p1"><span class="s1"><br>
</span></p>
<p class="p1"><span class="s1"><ins data-revive-zoneid="7" data-revive-id="f47602ccf85ad6338dc66631c7e31bee"></ins></span></p>
<p class="p1"><span class="s1"><script async src="//www.kiteboarder.co.uk/revive/www/delivery/asyncjs.php"></script></span></p>
<p class="p2"><span class="s1"></span><br></p>
</body>
</html>

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 9:53 pm
by Solidjeuh
I installed WINE on my linux server. I can open windows software like notepad++ with that.
Or you can try some alternatives: http://formac.informer.com/notepad

Re: [RC] Custom Code

Posted: Tue Mar 01, 2016 10:17 pm
by GoBieN
Leave it to Apple software to try to know better than what the user wants.

Re: [RC] Custom Code

Posted: Sat Mar 05, 2016 11:55 am
by rrbailey89
Wow I thought this extension was gone.. I was sad. Is it working with 3.1.7 and up now?

Re: [RC] Custom Code

Posted: Sat Mar 05, 2016 6:27 pm
by Puchahawa
No, Custom Code isn't working on 3.1.7 or 8. Check out martti's post on page 38 for a work around so you can continue to use the functionality. :)